/* ===== 大白饭API 玻璃主题 v9（修正：深色优先） ===== */
html, body { background: #0b0f18 !important; }

body::before{
  content:""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url("/glass/bg1.jpg") center/cover no-repeat fixed;
  filter: saturate(1.05) brightness(.78);
}
body::after{
  content:""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,9,16,.70), rgba(6,9,16,.50) 45%, rgba(6,9,16,.76));
}
#root { position: relative; z-index: 1; }

/* ---------- 浅色主题（仅当 html 没有 .dark 时） ---------- */
html:not(.dark){
  --background: transparent;
  --foreground: #10131a;
  --card: rgba(255,255,255,0.88);
  --card-foreground: #10131a;
  --popover: rgba(255,255,255,0.95);
  --popover-foreground: #10131a;
  --muted: rgba(0,0,0,0.05);
  --muted-foreground: rgba(16,19,26,0.62);
  --secondary: rgba(0,0,0,0.05);
  --border: rgba(0,0,0,0.10);
  --input: rgba(0,0,0,0.06);
  --sidebar: rgba(255,255,255,0.86);
  --sidebar-foreground: #10131a;
}

/* ---------- 深色主题（放最后，确保覆盖） ---------- */
html.dark, .dark{
  --background: transparent;
  --foreground: #eaeef7;
  --card: rgba(20,24,34,0.62);
  --card-foreground: #eaeef7;
  --popover: rgba(24,28,40,0.88);
  --popover-foreground: #eaeef7;
  --muted: rgba(255,255,255,0.07);
  --muted-foreground: rgba(234,238,247,0.68);
  --secondary: rgba(255,255,255,0.09);
  --secondary-foreground: #dbe7ff;
  --accent: rgba(255,255,255,0.10);
  --accent-foreground: #ffffff;
  --border: rgba(255,255,255,0.14);
  --input: rgba(255,255,255,0.10);
  --ring: #2f8fe0;
  --sidebar: rgba(11,15,22,0.66);
  --sidebar-foreground: #e6ecf8;
}

[class*="bg-card"], [class*="bg-popover"], [class*="bg-sidebar"],
[class*="bg-background"], [class*="bg-muted"], [class*="bg-secondary"]{
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}
header, [class*="sticky"], aside{
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}
input, textarea, select{
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:rgba(255,255,255,.20);border-radius:8px}
::-webkit-scrollbar-track{background:transparent}
