/* ===========================================================
   幕栈 · 主题集  （通过 <html data-theme="xxx"> 切换）
   只覆盖设计变量，不动布局，后端升级不受影响
   =========================================================== */

/* ---------- 1. 靛蓝 INDIGO（默认，极简商务） ---------- */
:root {
  --radius: 0.7rem;
  --font-ui-sans: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: var(--font-ui-sans);

  --primary: #4b62f5;
  --primary-foreground: #ffffff;
  --ring: #4b62f5;

  --background: #ffffff;
  --foreground: #0e1122;
  --card: #ffffff;
  --card-foreground: #0e1122;
  --popover: #ffffff;
  --popover-foreground: #0e1122;

  --secondary: #f0f2fa;
  --secondary-foreground: #2a3050;
  --muted: #f5f6fb;
  --muted-foreground: #5d6380;
  --accent-foreground: #0e1122;

  --border: #e6e8f3;
  --input: #e6e8f3;
  --sidebar: #f7f8fd;
  --sidebar-foreground: #2a3050;

  --success: #0e9f74;
  --warning: #c98a00;
  --info: #2b7fff;
  --destructive: #e0464b;

  --chart-1: #4b62f5;
  --chart-2: #22b8cf;
  --chart-3: #7c5cff;
  --chart-4: #0e9f74;
  --chart-5: #f0a02a;
}

html.dark {
  --background: #0a0c14;
  --foreground: #e9ecf7;
  --card: #11141f;
  --card-foreground: #e9ecf7;
  --popover: #11141f;
  --popover-foreground: #e9ecf7;
  --primary: #6c81ff;
  --primary-foreground: #ffffff;
  --ring: #6c81ff;
  --secondary: #1a1e2d;
  --secondary-foreground: #cbd0e4;
  --muted: #171b28;
  --muted-foreground: #9aa1b8;
  --accent-foreground: #e9ecf7;
  --border: #232838;
  --input: #232838;
  --sidebar: #0d101a;
  --sidebar-foreground: #c7cce0;
  --chart-1: #6c81ff;
  --chart-2: #2fc9dd;
  --chart-3: #9b7cff;
  --chart-4: #23c08c;
  --chart-5: #f0b048;
}

/* ---------- 2. 青碧 TEAL（清爽，大圆角） ---------- */
html[data-theme="teal"] {
  --radius: 1.05rem;
  --primary: #0d9488;
  --primary-foreground: #ffffff;
  --ring: #0d9488;
  --background: #fbfefd;
  --foreground: #0a1f1d;
  --card: #ffffff;
  --card-foreground: #0a1f1d;
  --popover: #ffffff;
  --popover-foreground: #0a1f1d;
  --secondary: #e6f5f2;
  --secondary-foreground: #0c4a44;
  --muted: #f2f9f8;
  --muted-foreground: #4f6f6b;
  --accent-foreground: #0a1f1d;
  --border: #dcefe9;
  --input: #dcefe9;
  --sidebar: #eff8f6;
  --sidebar-foreground: #0c4a44;
  --chart-1: #0d9488;
  --chart-2: #0ea5e9;
  --chart-3: #14b8a6;
  --chart-4: #84cc16;
  --chart-5: #f59e0b;
}
html.dark[data-theme="teal"] {
  --background: #05100f;
  --foreground: #e3f4f1;
  --card: #0a1a18;
  --card-foreground: #e3f4f1;
  --popover: #0a1a18;
  --popover-foreground: #e3f4f1;
  --primary: #2dd4bf;
  --primary-foreground: #03201d;
  --ring: #2dd4bf;
  --secondary: #122523;
  --secondary-foreground: #bfe9e3;
  --muted: #0f1f1d;
  --muted-foreground: #8fb3ae;
  --accent-foreground: #e3f4f1;
  --border: #1c322f;
  --input: #1c322f;
  --sidebar: #071513;
  --sidebar-foreground: #bfe9e3;
  --chart-1: #2dd4bf;
  --chart-2: #38bdf8;
  --chart-3: #5eead4;
  --chart-4: #a3e635;
  --chart-5: #fbbf24;
}

/* ---------- 3. 紫罗兰 VIOLET（锐利，小圆角） ---------- */
html[data-theme="violet"] {
  --radius: 0.45rem;
  --primary: #7c3aed;
  --primary-foreground: #ffffff;
  --ring: #7c3aed;
  --background: #fdfcff;
  --foreground: #140f24;
  --card: #ffffff;
  --card-foreground: #140f24;
  --popover: #ffffff;
  --popover-foreground: #140f24;
  --secondary: #f1ebff;
  --secondary-foreground: #4c1d95;
  --muted: #f7f3ff;
  --muted-foreground: #635b7a;
  --accent-foreground: #140f24;
  --border: #e8e1f7;
  --input: #e8e1f7;
  --sidebar: #f6f2ff;
  --sidebar-foreground: #4c1d95;
  --chart-1: #7c3aed;
  --chart-2: #db2777;
  --chart-3: #6366f1;
  --chart-4: #0ea5e9;
  --chart-5: #f59e0b;
}
html.dark[data-theme="violet"] {
  --background: #0a0613;
  --foreground: #ece8fb;
  --card: #120b21;
  --card-foreground: #ece8fb;
  --popover: #120b21;
  --popover-foreground: #ece8fb;
  --primary: #a78bfa;
  --primary-foreground: #1a0b33;
  --ring: #a78bfa;
  --secondary: #1d1330;
  --secondary-foreground: #d6c9f7;
  --muted: #171029;
  --muted-foreground: #a196bd;
  --accent-foreground: #ece8fb;
  --border: #2a1d42;
  --input: #2a1d42;
  --sidebar: #0d0819;
  --sidebar-foreground: #d6c9f7;
  --chart-1: #a78bfa;
  --chart-2: #f472b6;
  --chart-3: #818cf8;
  --chart-4: #38bdf8;
  --chart-5: #fbbf24;
}

/* ---------- 4. 暖橙 AMBER（亲和，大圆角） ---------- */
html[data-theme="amber"] {
  --radius: 1rem;
  --primary: #e2680f;
  --primary-foreground: #ffffff;
  --ring: #e2680f;
  --background: #fffdf8;
  --foreground: #231608;
  --card: #ffffff;
  --card-foreground: #231608;
  --popover: #ffffff;
  --popover-foreground: #231608;
  --secondary: #fdf0e0;
  --secondary-foreground: #7c3f0a;
  --muted: #fbf5ea;
  --muted-foreground: #7a6a55;
  --accent-foreground: #231608;
  --border: #f2e4d1;
  --input: #f2e4d1;
  --sidebar: #fdf7ee;
  --sidebar-foreground: #7c3f0a;
  --chart-1: #e2680f;
  --chart-2: #d97706;
  --chart-3: #ef4444;
  --chart-4: #65a30d;
  --chart-5: #0891b2;
}
html.dark[data-theme="amber"] {
  --background: #100c07;
  --foreground: #f6ece0;
  --card: #1a1410;
  --card-foreground: #f6ece0;
  --popover: #1a1410;
  --popover-foreground: #f6ece0;
  --primary: #f59e42;
  --primary-foreground: #2a1503;
  --ring: #f59e42;
  --secondary: #241a12;
  --secondary-foreground: #f0d8bb;
  --muted: #1d1611;
  --muted-foreground: #b39c85;
  --accent-foreground: #f6ece0;
  --border: #33261a;
  --input: #33261a;
  --sidebar: #130e09;
  --sidebar-foreground: #f0d8bb;
  --chart-1: #f59e42;
  --chart-2: #fbbf24;
  --chart-3: #f87171;
  --chart-4: #a3e635;
  --chart-5: #22d3ee;
}

/* ---------- 5. 深邃 CYBER（科技感，中性灰） ---------- */
html[data-theme="cyber"] {
  --radius: 0.5rem;
  --primary: #0e7490;
  --primary-foreground: #ffffff;
  --ring: #0e7490;
  --background: #f6f8fa;
  --foreground: #0b1418;
  --card: #ffffff;
  --card-foreground: #0b1418;
  --popover: #ffffff;
  --popover-foreground: #0b1418;
  --secondary: #e7edf1;
  --secondary-foreground: #0f3a45;
  --muted: #eff3f6;
  --muted-foreground: #566a72;
  --accent-foreground: #0b1418;
  --border: #dde5ea;
  --input: #dde5ea;
  --sidebar: #eef2f5;
  --sidebar-foreground: #0f3a45;
  --chart-1: #0e7490;
  --chart-2: #22d3ee;
  --chart-3: #6366f1;
  --chart-4: #10b981;
  --chart-5: #f43f5e;
}
html.dark[data-theme="cyber"] {
  --background: #06090c;
  --foreground: #dfe9ef;
  --card: #0c1216;
  --card-foreground: #dfe9ef;
  --popover: #0c1216;
  --popover-foreground: #dfe9ef;
  --primary: #22d3ee;
  --primary-foreground: #04161b;
  --ring: #22d3ee;
  --secondary: #111a20;
  --secondary-foreground: #b9cdd6;
  --muted: #0e161b;
  --muted-foreground: #8aa1ac;
  --accent-foreground: #dfe9ef;
  --border: #1a262d;
  --input: #1a262d;
  --sidebar: #080d10;
  --sidebar-foreground: #b9cdd6;
  --chart-1: #22d3ee;
  --chart-2: #60a5fa;
  --chart-3: #a78bfa;
  --chart-4: #34d399;
  --chart-5: #fb7185;
}

/* ---------- 6. 曜黑 · 荧光青 MIDNIGHT-CYAN（强制深色） ---------- */
html.dark[data-theme="midnight"],
html[data-theme="midnight"] {
  --radius: 0.55rem;
  --background: #000000;
  --foreground: #e8f7fa;
  --card: #0a0e10;
  --card-foreground: #e8f7fa;
  --popover: #0a0e10;
  --popover-foreground: #e8f7fa;
  --primary: #00e5ff;
  --primary-foreground: #00161b;
  --ring: #00e5ff;
  --secondary: #101a1e;
  --secondary-foreground: #b9e9f1;
  --muted: #0c1417;
  --muted-foreground: #86a7ae;
  --accent-foreground: #e8f7fa;
  --border: #1b2a2f;
  --input: #1b2a2f;
  --sidebar: #04070a;
  --sidebar-foreground: #b9e9f1;
  --success: #00e08a;
  --warning: #ffc247;
  --info: #00e5ff;
  --destructive: #ff5470;
  --chart-1: #00e5ff;
  --chart-2: #00e08a;
  --chart-3: #7c5cff;
  --chart-4: #ffc247;
  --chart-5: #ff5470;
}

/* ---------- 7. 黑金 MIDNIGHT-GOLD（强制深色 · 完整质感） ---------- */
html.dark[data-theme="gold"],
html[data-theme="gold"] {
  --radius: 0.55rem;
  --background: #07060a;
  --foreground: #f4ecdc;
  --card: #12100c;
  --card-foreground: #f4ecdc;
  --popover: #12100c;
  --popover-foreground: #f4ecdc;
  --primary: #e8b44a;
  --primary-foreground: #231803;
  --ring: #e8b44a;
  --secondary: #1a1610;
  --secondary-foreground: #e7d6b4;
  --muted: #131009;
  --muted-foreground: #a3916f;
  --accent-foreground: #f4ecdc;
  --border: #2a2318;
  --input: #2a2318;
  --sidebar: #0a0806;
  --sidebar-foreground: #e7d6b4;
  --success: #3fbf7f;
  --warning: #e8b44a;
  --info: #6fa8ff;
  --destructive: #e2564f;
  --chart-1: #e8b44a;
  --chart-2: #c98a2e;
  --chart-3: #8d7bff;
  --chart-4: #3fbf7f;
  --chart-5: #e2564f;
}

/* ---------- 8. 黑紫 MIDNIGHT-VIOLET（强制深色） ---------- */
html.dark[data-theme="neon"],
html[data-theme="neon"] {
  --radius: 0.55rem;
  --background: #050308;
  --foreground: #f0e9ff;
  --card: #100a17;
  --card-foreground: #f0e9ff;
  --popover: #100a17;
  --popover-foreground: #f0e9ff;
  --primary: #b026ff;
  --primary-foreground: #ffffff;
  --ring: #b026ff;
  --secondary: #180f22;
  --secondary-foreground: #d9c6f2;
  --muted: #0f0916;
  --muted-foreground: #9a86b3;
  --accent-foreground: #f0e9ff;
  --border: #2a1638;
  --input: #2a1638;
  --sidebar: #08040d;
  --sidebar-foreground: #d9c6f2;
  --success: #00e08a;
  --warning: #ffc247;
  --info: #6fa8ff;
  --destructive: #ff4d7d;
  --chart-1: #b026ff;
  --chart-2: #ff4d7d;
  --chart-3: #00e5ff;
  --chart-4: #00e08a;
  --chart-5: #ffc247;
}

/* ---------- 黑金专属质感（在变量之上再叠加） ---------- */
html[data-theme="gold"] body,
html.dark[data-theme="gold"] body {
  background-color: #050405;
  background-image:
    radial-gradient(900px 420px at 12% -6%, rgba(232, 180, 74, 0.16), transparent 62%),
    radial-gradient(720px 380px at 88% 0%, rgba(232, 180, 74, 0.09), transparent 60%);
  background-attachment: fixed;
}

/* 顶部导航：细金线 + 金色悬停 */
html[data-theme="gold"] header,
html[data-theme="gold"] [data-slot="header"] {
  border-bottom: 1px solid rgba(232, 180, 74, 0.22);
  background-image: linear-gradient(180deg, rgba(232, 180, 74, 0.05), transparent);
}
html[data-theme="gold"] header a:hover,
html[data-theme="gold"] header button:hover {
  color: #e8b44a;
}

/* 首屏大标题渐变改成金色 */
html[data-theme="gold"] [class*="bg-clip-text"],
html[data-theme="gold"] .text-transparent {
  background-image: linear-gradient(100deg, #f7d98b 0%, #e8b44a 45%, #b8862e 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

/* 主按钮：金色渐变 + 光晕 */
html[data-theme="gold"] button[data-variant="default"],
html[data-theme="gold"] a[data-variant="default"] {
  background-image: linear-gradient(135deg, #f3cd76 0%, #e8b44a 55%, #c8912f 100%);
  color: #1d1302 !important;
  border: 1px solid rgba(255, 226, 160, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), 0 10px 26px -10px rgba(232, 180, 74, 0.55);
}
html[data-theme="gold"] button[data-variant="default"]:hover,
html[data-theme="gold"] a[data-variant="default"]:hover {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4), 0 16px 34px -12px rgba(232, 180, 74, 0.75);
}

/* 卡片 / 面板：金边微光，悬停更亮 */
html[data-theme="gold"] [data-slot="card"],
html[data-theme="gold"] .rounded-xl,
html[data-theme="gold"] .rounded-2xl {
  border-color: rgba(232, 180, 74, 0.2) !important;
  box-shadow: inset 0 1px 0 rgba(255, 226, 160, 0.05);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
html[data-theme="gold"] [data-slot="card"]:hover {
  border-color: rgba(232, 180, 74, 0.42) !important;
  box-shadow: 0 18px 40px -22px rgba(232, 180, 74, 0.55), inset 0 1px 0 rgba(255, 226, 160, 0.09);
}

/* 数字/统计与强调文字染金 */
html[data-theme="gold"] .font-bold,
html[data-theme="gold"] .font-semibold {
  letter-spacing: -0.015em;
}

/* 表格行悬停 */
html[data-theme="gold"] tbody tr:hover {
  background-color: rgba(232, 180, 74, 0.06) !important;
}

/* 输入框聚焦 */
html[data-theme="gold"] input:focus,
html[data-theme="gold"] textarea:focus {
  border-color: rgba(232, 180, 74, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(232, 180, 74, 0.16);
}

/* 选中文字与滚动条 */
html[data-theme="gold"] ::selection {
  background: rgba(232, 180, 74, 0.32);
  color: #fff7e4;
}
html[data-theme="gold"] *::-webkit-scrollbar-thumb {
  background: rgba(232, 180, 74, 0.38);
}
html[data-theme="gold"] *::-webkit-scrollbar-thumb:hover {
  background: rgba(232, 180, 74, 0.6);
}

/* 分隔线染金 */
html[data-theme="gold"] hr {
  border-color: rgba(232, 180, 74, 0.18);
}

/* Logo 金色滤镜 */
html[data-theme="gold"] header img,
html[data-theme="gold"] [data-slot="header"] img {
  filter: sepia(0.92) saturate(2.3) hue-rotate(-14deg) brightness(1.06);
}

/* 页面顶部一条金色光线 */
html[data-theme="gold"] body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(232, 180, 74, 0.85) 35%, rgba(255, 226, 160, 1) 50%, rgba(232, 180, 74, 0.85) 65%, transparent);
  z-index: 2147483002;
  pointer-events: none;
}

/* 代码/请求面板的柔光 */
html[data-theme="gold"] pre,
html[data-theme="gold"] code {
  text-shadow: 0 0 18px rgba(232, 180, 74, 0.12);
}

/* ---------- 通用细节 ---------- */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  letter-spacing: -0.01em;
}
button:not(:disabled)[data-variant="default"],
a[data-variant="default"] {
  box-shadow: 0 1px 2px rgba(15, 18, 40, 0.08), 0 4px 14px -6px color-mix(in oklab, var(--primary) 60%, transparent);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
button:not(:disabled)[data-variant="default"]:hover,
a[data-variant="default"]:hover {
  transform: translateY(-1px);
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--muted-foreground) 35%, transparent);
  border-radius: 999px;
}