/* 设计变量 */
:root {
  --color-dark: #121531;
  --color-paper: #E8E9EA;
  --color-text: #151723;
  --color-brand: #142CEB;
  --color-accent: #ED7D6E;
  --color-text-on-dark: #E8E9EA;
  --color-link-on-dark: #ED7D6E;
  --color-link-on-paper: #142CEB;
  --color-bg-lighter: #F0F1F2;
  --color-bg-darker: #0D0F22;
  --color-border-subtle: rgba(21, 23, 35, 0.08);

  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: none;

  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;

  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --lh-base: 1.65;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: var(--lh-base);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-link-on-paper); text-decoration: none; transition: color 0.2s ease; }
ul, ol { padding-left: 1.2em; margin: 0; }
li { margin-bottom: calc(var(--gap) * 0.5); }

/* 容器与区块 */
.container { max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gap); }
section { padding-block: var(--section-y); }
.section-header { margin-bottom: calc(var(--gap) * 2); }
.breadcrumb {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: calc(var(--gap) * 0.5);
  color: var(--color-brand);
}
.dark-face .breadcrumb { color: var(--color-accent); }

/* 标题与文本 */
h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  margin: 0 0 var(--gap) 0;
  word-break: break-word;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 calc(var(--gap) * 1.5) 0;
  word-break: break-word;
  text-wrap: balance;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 calc(var(--gap) * 0.5) 0;
}
p { margin: 0 0 var(--gap) 0; max-width: 38em; }
.hl { color: var(--color-brand); }
.dark-face .hl { color: var(--color-accent); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 28px;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  border: none;
  text-align: center;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); background: #d96b5c; }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-text);
}
.dark-face .btn-secondary { color: var(--color-text-on-dark); border-color: var(--color-text-on-dark); }
.btn-secondary:hover { background: rgba(21, 23, 35, 0.05); }
.dark-face .btn-secondary:hover { background: rgba(232, 233, 234, 0.08); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* 对比度修复：Windows 下载按钮在深色背景上的文字颜色 */
#windows-main-btn { color: #121531 !important; -webkit-text-fill-color: #121531 !important; }

/* 卡片与面板 */
.card {
  background: var(--color-bg-lighter);
  border-radius: var(--radius-card);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: background 0.2s ease;
}
.panel {
  background: var(--color-dark);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
  overflow: hidden;
}
.dark-face .card { background: var(--color-bg-darker); }

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.flex-col { display: flex; flex-direction: column; gap: var(--gap); }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-bottom: var(--gap);
}
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border-subtle); }
th { font-weight: 600; }
td a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
tr:last-child td { border-bottom: none; }

/* 步骤与时间线 */
.step-list { list-style: none; padding: 0; counter-reset: step-counter; }
.step-item {
  position: relative;
  padding-left: 48px;
  margin-bottom: var(--gap);
}
.step-item::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0; top: 0;
  width: 36px; height: 36px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.step-line {
  position: absolute;
  left: 17px; top: 40px; bottom: -16px;
  width: 2px;
  background: var(--color-border-subtle);
}
.step-item:last-child .step-line { display: none; }

/* 列表标记 */
.check-list { list-style: none; padding-left: 0; }
.check-list li { position: relative; padding-left: 24px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-brand);
}
.dark-face .check-list li::before { background: var(--color-accent); }

/* 页头与页脚 */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(232, 233, 234, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border-subtle);
}
.dark-face .header { background: rgba(18, 21, 49, 0.9); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { opacity: 0.8; }
.nav-links a[aria-current="page"] { color: var(--color-accent); font-weight: 600; }
.footer {
  background: var(--color-dark);
  color: var(--color-text-on-dark);
  padding: 48px 0;
  margin-top: auto;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--color-text-on-dark); opacity: 0.8; }
.footer-links a:hover { opacity: 1; }

/* SVG 动效关键帧 */
@keyframes orbit-breathe-1 {
  0%, 100% { transform: scale(0.96); opacity: 0.4; }
  50% { transform: scale(1.04); opacity: 0.8; }
}
@keyframes orbit-breathe-2 {
  0%, 100% { transform: scale(1.02); opacity: 0.6; }
  50% { transform: scale(0.98); opacity: 1; }
}
@keyframes bubble-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes input-dots {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
@keyframes notify-slide {
  0%, 100% { transform: translateX(0); opacity: 1; }
  30% { transform: translateX(-6px); opacity: 0.7; }
  60% { transform: translateX(4px); opacity: 0.9; }
}
@keyframes line-flow {
  to { stroke-dashoffset: -12; }
}

/* 动效类应用 */
.anim-orbit-1 { animation: orbit-breathe-1 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-orbit-2 { animation: orbit-breathe-2 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-bubble { animation: bubble-float 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-bubble-delayed { animation: bubble-float 5.5s ease-in-out infinite 1.2s; transform-box: fill-box; transform-origin: center; }
.anim-dot-1 { animation: input-dots 2s ease-in-out infinite; }
.anim-dot-2 { animation: input-dots 2s ease-in-out infinite 0.4s; }
.anim-dot-3 { animation: input-dots 2s ease-in-out infinite 0.8s; }
.anim-notify { animation: notify-slide 7s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: line-flow 3s linear infinite; }

/* 焦点与无障碍 */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }
details { border: none; padding: 0; margin: 0; }
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-subtle);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { margin-top: var(--gap); margin-bottom: 0; }

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
