/* =========================================================================
   fy.xinj.top 控制台主题覆盖
   策略：用 !important 覆盖 new-api（shadcn 语义变量）的 :root(light) 与 .dark
   - light  => 扁平柔和渐变（靛紫 / 淡彩）
   - dark   => 毒液（近黑底 + 酸性绿）
   仅通过 nginx sub_filter 注入 <link>，不动容器/源码。
   ========================================================================= */

/* ---------- LIGHT：扁平柔和渐变 ---------- */
:root {
  --background: #f6f3ff !important;
  --foreground: #2e1065 !important;
  --card: #ffffff !important;
  --card-foreground: #2e1065 !important;
  --popover: #ffffff !important;
  --popover-foreground: #2e1065 !important;
  --primary: #7c3aed !important;
  --primary-foreground: #ffffff !important;
  --secondary: #ede9fe !important;
  --secondary-foreground: #5b21b6 !important;
  --muted: #f1eefe !important;
  --muted-foreground: #7c7a99 !important;
  --accent: #e0e7ff !important;
  --accent-foreground: #4338ca !important;
  --destructive: #ef4444 !important;
  --destructive-foreground: #ffffff !important;
  --border: #e6e1f7 !important;
  --input: #e6e1f7 !important;
  --ring: #8b5cf6 !important;
  --sidebar: #f3effe !important;
  --sidebar-foreground: #4c1d95 !important;
  --sidebar-primary: #7c3aed !important;
  --sidebar-primary-foreground: #ffffff !important;
  --sidebar-accent: #ece7ff !important;
  --sidebar-accent-foreground: #5b21b6 !important;
  --sidebar-border: #e6e1f7 !important;
  --sidebar-ring: #8b5cf6 !important;
}

/* 柔和渐变底（覆盖 body/根容器背景） */
:root body,
:root #root,
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, #efe7ff 0%, rgba(239,231,255,0) 55%),
    radial-gradient(1000px 500px at 110% 10%, #e3ecff 0%, rgba(227,236,255,0) 50%),
    linear-gradient(135deg, #f7f4ff 0%, #eef2ff 45%, #fdf2f8 100%) !important;
  background-attachment: fixed !important;
}

/* 卡片轻微提亮 + 柔和阴影 */
:root .card,
:root [class*="card"] {
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.08) !important;
  border-color: #ece6fb !important;
}

/* ---------- DARK：毒液 ---------- */
.dark {
  --background: #0a0e0a !important;
  --foreground: #d6ffdd !important;
  --card: #0f150f !important;
  --card-foreground: #d6ffdd !important;
  --popover: #0c120c !important;
  --popover-foreground: #d6ffdd !important;
  --primary: #39ff14 !important;
  --primary-foreground: #04140a !important;
  --secondary: #14241a !important;
  --secondary-foreground: #9affb0 !important;
  --muted: #122017 !important;
  --muted-foreground: #6fae84 !important;
  --accent: #16291d !important;
  --accent-foreground: #aaffc0 !important;
  --destructive: #ff4d4d !important;
  --destructive-foreground: #1a0303 !important;
  --border: #1e3a2a !important;
  --input: #1e3a2a !important;
  --ring: #39ff14 !important;
  --sidebar: #08100a !important;
  --sidebar-foreground: #bff7c8 !important;
  --sidebar-primary: #39ff14 !important;
  --sidebar-primary-foreground: #04140a !important;
  --sidebar-accent: #122a1c !important;
  --sidebar-accent-foreground: #aaffc0 !important;
  --sidebar-border: #1e3a2a !important;
  --sidebar-ring: #39ff14 !important;
}

/* 毒液暗底 + 酸性绿微光 */
.dark body,
.dark #root,
.dark {
  background:
    radial-gradient(900px 500px at 8% -8%, rgba(57,255,20,0.10) 0%, rgba(57,255,20,0) 55%),
    radial-gradient(800px 420px at 110% 8%, rgba(20,120,60,0.12) 0%, rgba(20,120,60,0) 50%),
    #0a0e0a !important;
  background-attachment: fixed !important;
}

/* 毒液主色发光描边 */
.dark .card,
.dark [class*="card"],
.dark [class*="border"] {
  border-color: #1f3a2a !important;
  box-shadow: 0 0 0 1px rgba(57,255,20,0.06), 0 10px 30px rgba(0,0,0,0.55) !important;
}

/* 主按钮酸性绿辉光 */
.dark button[class*="primary"],
.dark [class*="btn"][class*="primary"],
.dark .bg-primary {
  box-shadow: 0 0 14px rgba(57,255,20,0.35) !important;
}

/* 链接 / 高亮统一酸性绿 */
.dark a,
.dark .text-primary,
.dark [class*="primary"] {
  color: #5dff3a !important;
}

/* =========================================================================
   顶部导航：靠左 + 加粗加大（JS 运行时打标 fy-topbar / fy-navbox，此处兜底）
   ========================================================================= */
.fy-topbar {
  justify-content: flex-start !important;
}
.fy-navbox {
  display: flex !important;
  align-items: center !important;
  margin-left: 26px !important;
  margin-right: auto !important;
}
.fy-navbox a,
.fy-navbox button,
.fy-navbox span {
  font-weight: 800 !important;
  font-size: 15px !important;
  letter-spacing: 0.2px !important;
}
