/* ============================================================
   AI秒试衣 · 官方使用说明与操作手册样式表
   视觉体系：门店智控清爽蓝白 (Light) / 深空夜幕 (Dark)
   ============================================================ */

:root {
  /* 基础底色与层次（对齐 AI秒试衣 后台与手机端界面） */
  --bg: #f8fafc;
  --bg-translucent: rgba(248, 250, 252, 0.88);
  --surface: #ffffff;
  --surface-dim: #f1f5f9;
  --surface-deep: #e2e8f0;
  --surface-hover: #f8fafc;

  /* 文字层次 */
  --text: #334155;
  --text-strong: #0f172a;
  --text-soft: #475569;
  --text-faint: #94a3b8;

  /* 边框与分割线 */
  --hairline: #e2e8f0;
  --hairline-strong: #cbd5e1;

  /* AI秒试衣 品牌主色（科技蓝） */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-wash: #eff6ff;
  --accent-wash-border: #bfdbfe;

  /* 状态辅助色（对应界面中的“大屏已开启”翠绿与大屏暖橙） */
  --status-green: #10b981;
  --status-green-wash: #ecfdf5;
  --status-green-border: #a7f3d0;
  --warn: #d97706;
  --warn-wash: #fffbeb;
  --warn-border: #fde68a;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
  --shadow-img: 0 4px 20px rgba(15, 23, 42, 0.07);

  /* 字体与尺寸 */
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "MiSans", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --sidebar-w: 272px;
  --header-h: 60px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-translucent: rgba(11, 17, 32, 0.88);
  --surface: #111827;
  --surface-dim: #1e293b;
  --surface-deep: #334155;
  --surface-hover: #172033;

  --text: #cbd5e1;
  --text-strong: #f8fafc;
  --text-soft: #94a3b8;
  --text-faint: #64748b;

  --hairline: #1e293b;
  --hairline-strong: #334155;

  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-wash: rgba(59, 130, 246, 0.14);
  --accent-wash-border: rgba(59, 130, 246, 0.32);

  --status-green: #34d399;
  --status-green-wash: rgba(16, 185, 129, 0.14);
  --status-green-border: rgba(16, 185, 129, 0.3);
  --warn: #fbbf24;
  --warn-wash: rgba(245, 158, 11, 0.14);
  --warn-border: rgba(245, 158, 11, 0.3);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-img: 0 8px 28px rgba(0, 0, 0, 0.45);
}

/* ================= 全局重置 ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.75;
  letter-spacing: 0.01em;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ================= 顶栏 Header ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background-color: var(--bg-translucent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  color: var(--text-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-sub {
  font-weight: 500;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.badge-version {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
  background-color: var(--accent-wash);
  color: var(--accent);
  border: 1px solid var(--accent-wash-border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--status-green-wash);
  color: var(--status-green);
  border: 1px solid var(--status-green-border);
}

.status-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-green);
}

.btn-icon {
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.18s ease;
}

.btn-icon:hover {
  color: var(--accent);
  border-color: var(--hairline-strong);
}

.btn-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.mobile-nav-toggle {
  display: none;
}

/* ================= 主布局 Layout ================= */
.layout-container {
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  position: relative;
}

/* 左侧栏 Sidebar */
.site-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: calc(100vh - var(--header-h));
  position: sticky;
  top: var(--header-h);
  overflow-y: auto;
  padding: 24px 16px 40px;
  border-right: 1px solid var(--hairline);
  scrollbar-width: thin;
}

.sidebar-heading {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 8px 12px 4px;
  font-weight: 700;
}

.nav-list {
  list-style: none;
  margin-bottom: 18px;
}

.nav-item {
  margin-bottom: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.nav-link:hover {
  background-color: var(--surface-dim);
  color: var(--text-strong);
}

.nav-link.active {
  background-color: var(--accent-wash);
  color: var(--accent);
  font-weight: 600;
  border-left: 3px solid var(--accent);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.nav-badge {
  font-size: 0.7rem;
  color: var(--text-faint);
  background: var(--surface-dim);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.nav-link.active .nav-badge {
  background: var(--surface);
  color: var(--accent);
}

/* 右侧正文 Content */
.site-main {
  flex: 1;
  min-width: 0;
  padding: 36px 48px 80px;
}

.doc-article {
  max-width: 880px;
  margin: 0 auto;
}

/* ================= 文章头部 Hero ================= */
.doc-hero {
  padding: 24px 0 36px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 44px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--accent);
  background: var(--accent-wash);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  font-weight: 600;
  border: 1px solid var(--accent-wash-border);
}

.hero-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.hero-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.meta-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.meta-card-label {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.meta-card-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-strong);
}

/* ================= 章节样式 Section ================= */
.doc-section {
  margin-bottom: 60px;
  padding-top: 12px;
}

.section-header {
  margin-bottom: 22px;
}

.section-num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  display: block;
}

h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.35;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 32px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.05em;
  background-color: var(--accent);
  border-radius: 2px;
}

p {
  margin-bottom: 14px;
  color: var(--text);
  font-size: 0.98rem;
}

ul, ol {
  margin: 0 0 18px 22px;
  color: var(--text);
}

li {
  margin-bottom: 6px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background-color: var(--surface-dim);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--hairline);
}

/* ================= 图解容器 Screen Card ================= */
.screen-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 20px 0 32px;
  box-shadow: var(--shadow-img);
}

.screen-card-header {
  background: var(--surface-dim);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.85rem;
}

.screen-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-strong);
  font-weight: 600;
}

.screen-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

.screen-hint {
  color: var(--text-faint);
  font-size: 0.76rem;
}

.screen-img-wrap {
  position: relative;
  cursor: zoom-in;
  background: var(--surface-dim);
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid var(--hairline);
}

.screen-img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 540px;
  object-fit: contain;
}

.screen-img.mobile-shot {
  max-height: 600px;
  width: auto;
  max-width: 100%;
  padding: 16px 0;
}

.screen-card-body {
  padding: 20px 24px;
}

.screen-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 12px;
}

.keypoints-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.keypoint-item {
  background: var(--surface-dim);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  font-size: 0.88rem;
  line-height: 1.55;
}

.keypoint-item strong {
  color: var(--text-strong);
  display: block;
  margin-bottom: 3px;
}

/* ================= 提示卡片 Callout ================= */
.callout {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin: 18px 0;
  font-size: 0.92rem;
  line-height: 1.6;
  border-left: 4px solid;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.callout-tip {
  background-color: var(--accent-wash);
  border-color: var(--accent);
  color: var(--text);
}
.callout-tip .callout-title {
  color: var(--accent);
}

.callout-warn {
  background-color: var(--warn-wash);
  border-color: var(--warn);
  color: var(--text);
}
.callout-warn .callout-title {
  color: var(--warn);
}

/* ================= 数据表格 Table ================= */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th, td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--hairline);
}

th {
  background-color: var(--surface-dim);
  color: var(--text-strong);
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) td {
  background-color: var(--surface-hover);
}

/* ================= 步骤指引 Step List ================= */
.steps-container {
  margin: 22px 0;
  counter-reset: step-counter;
}

.step-item {
  position: relative;
  padding-left: 40px;
  margin-bottom: 22px;
}

.step-item::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 4px;
}

/* ================= 常见问题 FAQ 手风琴 ================= */
.faq-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0 36px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-item[open] {
  border-color: var(--accent-wash-border);
}

.faq-summary {
  padding: 15px 18px;
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
}

.faq-item[open] .faq-summary::after {
  content: "−";
}

.faq-content {
  padding: 12px 18px 16px;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.65;
  border-top: 1px dashed var(--hairline);
}

/* ================= 图片灯箱 Lightbox ================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 92vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -36px;
  right: 0;
  color: #fff;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
}

/* ================= 浮动返回顶部 ================= */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  color: var(--accent);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ================= 页脚 Footer ================= */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 28px 24px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-faint);
  background: var(--bg);
}

/* ================= 响应式适配 Responsive ================= */
@media (max-width: 960px) {
  .site-sidebar {
    position: fixed;
    top: var(--header-h);
    left: -100%;
    z-index: 99;
    width: 272px;
    background: var(--surface);
    transition: left 0.25s ease;
    box-shadow: var(--shadow-lg);
  }

  .site-sidebar.mobile-open {
    left: 0;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .site-main {
    padding: 24px 20px 60px;
  }

  .hero-title {
    font-size: 1.85rem;
  }

  .status-pill {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 1.55rem;
  }
  .keypoints-list {
    grid-template-columns: 1fr;
  }
}
