/* =============================
   现代 CSS 初始化文件 (2026)
   - 兼容移动端 & PC
   - 移除默认样式干扰
   - 设置基础排版与响应式单位
   ============================= */

/* 1. 盒模型全局重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. 移除默认 margin/padding */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
main,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* 3. HTML 基础设置 */
html {
  /* 1rem = 10px（便于计算），后续可通过媒体查询调整 */
  font-size: 62.5%; /* 16px * 62.5% = 10px */
  scroll-behavior: smooth; /* 平滑滚动 */
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 1.6rem; /* = 16px */
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 4. 响应式视口支持 */
@media screen and (max-width: 480px) {
  html {
    font-size: 56.25%; /* 9px → 1rem=9px，适合小屏 */
  }
}

/* 5. 常用元素重置 */
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
  padding: 0;
  outline: none;
  border: none;
  background: transparent;
}

button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}

ul,
ol {
  list-style: none;
}

/* 6. 表单元素基础样式（可选增强） */
input,
textarea,
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* 7. 隐藏元素语义化处理 */
[hidden] {
  display: none !important;
}

/* 8. 焦点轮廓（无障碍访问） */
:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
}

/* 9. 移动端点击高亮去除 */
* {
  -webkit-tap-highlight-color: transparent;
}

/* 10. 滚动条美化（可选） */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* 11. single-spa 全局样式 */
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* single-spa 子应用容器高度 */
.single-spa-container,
[id^="single-spa-application:"] {
  display: block;
  width: 100%;
  height: 100%;
}
