/* ============================================================
   themes.css - 六套彩色模式主题
   网站：kidsshoeshop.com
   主题：晨光/正午/黄昏/夜读/静默/活力
   生成：建站AI · 2026-10-13
   ============================================================ */

/* ===== M1 晨光（Dawn）— 默认主题 ===== */
[data-theme="dawn"] {
  --color-bg: hsl(35, 30%, 98%);
  --color-surface: hsl(35, 25%, 96%);
  --color-surface-hover: hsl(35, 25%, 93%);
  --color-text-primary: hsl(30, 15%, 15%);
  --color-text-secondary: hsl(30, 10%, 45%);
  --color-text-tertiary: hsl(30, 10%, 60%);
  --color-accent: hsl(25, 70%, 55%);
  --color-border: hsl(35, 20%, 88%);
  --color-border-strong: hsl(35, 20%, 80%);
}

/* ===== M2 正午（Noon） ===== */
[data-theme="noon"] {
  --color-bg: hsl(0, 0%, 100%);
  --color-surface: hsl(0, 0%, 97%);
  --color-surface-hover: hsl(0, 0%, 94%);
  --color-text-primary: hsl(220, 15%, 12%);
  --color-text-secondary: hsl(220, 10%, 45%);
  --color-text-tertiary: hsl(220, 10%, 62%);
  --color-accent: hsl(220, 65%, 45%);
  --color-border: hsl(220, 15%, 90%);
  --color-border-strong: hsl(220, 15%, 82%);
}

/* ===== M3 黄昏（Dusk） ===== */
[data-theme="dusk"] {
  --color-bg: hsl(38, 25%, 94%);
  --color-surface: hsl(38, 20%, 90%);
  --color-surface-hover: hsl(38, 20%, 86%);
  --color-text-primary: hsl(30, 20%, 18%);
  --color-text-secondary: hsl(30, 15%, 45%);
  --color-text-tertiary: hsl(30, 15%, 58%);
  --color-accent: hsl(35, 65%, 50%);
  --color-border: hsl(38, 18%, 84%);
  --color-border-strong: hsl(38, 18%, 76%);
}

/* ===== M4 夜读（Night） ===== */
[data-theme="night"] {
  --color-bg: hsl(220, 15%, 10%);
  --color-surface: hsl(220, 12%, 14%);
  --color-surface-hover: hsl(220, 12%, 18%);
  --color-text-primary: hsl(35, 15%, 85%);
  --color-text-secondary: hsl(35, 10%, 60%);
  --color-text-tertiary: hsl(35, 10%, 48%);
  --color-accent: hsl(35, 70%, 60%);
  --color-border: hsl(220, 12%, 22%);
  --color-border-strong: hsl(220, 12%, 30%);
  --color-l3-bg: hsl(220, 12%, 16%);
}

/* ===== M5 静默（Silent） ===== */
[data-theme="silent"] {
  --color-bg: hsl(0, 0%, 96%);
  --color-surface: hsl(0, 0%, 93%);
  --color-surface-hover: hsl(0, 0%, 89%);
  --color-text-primary: hsl(0, 0%, 15%);
  --color-text-secondary: hsl(0, 0%, 45%);
  --color-text-tertiary: hsl(0, 0%, 60%);
  --color-accent: hsl(0, 0%, 35%);
  --color-border: hsl(0, 0%, 88%);
  --color-border-strong: hsl(0, 0%, 78%);
}

/* ===== M6 活力（Vivid） ===== */
[data-theme="vivid"] {
  --color-bg: hsl(0, 0%, 100%);
  --color-surface: hsl(280, 20%, 97%);
  --color-surface-hover: hsl(280, 20%, 94%);
  --color-text-primary: hsl(260, 20%, 12%);
  --color-text-secondary: hsl(260, 15%, 45%);
  --color-text-tertiary: hsl(260, 15%, 60%);
  --color-accent: hsl(320, 80%, 50%);
  --color-border: hsl(280, 15%, 90%);
  --color-border-strong: hsl(280, 15%, 82%);
}

/* ===== OLED 夜读优化（移动端） ===== */
@media (max-width: 768px) {
  [data-theme="night"] {
    --color-bg: hsl(0, 0%, 0%);
    --color-surface: hsl(220, 10%, 8%);
    --color-surface-hover: hsl(220, 10%, 12%);
    --color-text-primary: hsl(35, 12%, 80%);
    --color-text-secondary: hsl(35, 10%, 55%);
    --color-accent: hsl(35, 60%, 55%);
    --color-border: hsl(220, 10%, 18%);
  }
}

/* ===== 户外高对比度模式 ===== */
[data-theme="dawn"][data-outdoor="true"],
[data-theme="noon"][data-outdoor="true"] {
  --color-text-primary: hsl(30, 20%, 5%);
  --color-bg: hsl(0, 0%, 100%);
  --color-accent: hsl(25, 85%, 45%);
}

/* ===== P3 广色域适配 ===== */
@media (color-gamut: p3) {
  :root {
    --color-primary-500: color(display-p3 0.95 0.45 0.15);
    --color-accent-500: color(display-p3 0.98 0.35 0.10);
  }
}

/* ===== 主题切换过渡 ===== */
html {
  transition: background-color var(--duration-slow) var(--ease-in-out),
              color var(--duration-slow) var(--ease-in-out);
}

/* ===== 首屏防闪烁（内联脚本的兜底） ===== */
html:not([data-theme]) {
  visibility: hidden;
}
