/* 萌兔星港 统一皮肤 — 深色（对齐模型广场 / arcrouter.ai 风格）
   通过 Nginx sub_filter 注入，不修改 new-api 构建产物；删除本文件或回滚 Nginx 配置即恢复原样 */

:root,
:host,
html {
  /* 字体 */
  --font-ui-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-sans: var(--font-ui-sans);
  --font-body: var(--font-ui-sans);

  /* 品牌色 */
  --primary: #6467f2;
  --primary-foreground: #ffffff;
  --ring: #6467f2;
  --accent: #171e30;
  --accent-foreground: #ffffff;

  /* 中性色（深色） */
  --background: #030712;
  --foreground: #e5e7eb;
  --card: #0b1120;
  --card-foreground: #e5e7eb;
  --popover: #0d1424;
  --popover-foreground: #e5e7eb;
  --muted: #111827;
  --muted-foreground: #8b93a3;
  --secondary: #131a2a;
  --secondary-foreground: #e5e7eb;
  --border: rgba(255, 255, 255, 0.1);
  --input: rgba(255, 255, 255, 0.14);
  --sidebar: #060b16;
  --sidebar-foreground: #c3c9d5;

  /* 圆角与状态色 */
  --radius: 0.7rem;
  --success: #34d399;
  --success-foreground: #04120c;
  --destructive: #f87171;

  /* 图表 */
  --chart-1: #60a5fa;
  --chart-2: #34d399;
  --chart-3: #fbbf24;
  --chart-4: #f87171;
  --chart-5: #a78bfa;

  color-scheme: dark;
}

html.dark,
.dark {
  --primary: #7b7df5;
  --background: #030712;
  --foreground: #e5e7eb;
  --card: #0b1120;
  --card-foreground: #e5e7eb;
  --muted: #111827;
  --muted-foreground: #8b93a3;
  --border: rgba(255, 255, 255, 0.1);
  --input: rgba(255, 255, 255, 0.14);
  --ring: #7b7df5;
}

/* ---------- 基础 ---------- */
html,
body {
  background: #030712 !important;
  color: #e5e7eb;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(100, 103, 242, 0.35);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #253049;
  border: 2px solid transparent;
  background-clip: content-box;
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
  background-clip: content-box;
}

*:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* 白色/浅色表面统一压成深色 */
.bg-white,
.bg-gray-50,
.bg-gray-100,
.bg-neutral-50,
.bg-slate-50,
.bg-zinc-50 {
  background-color: #0b1120 !important;
}
.bg-gray-200,
.bg-neutral-100,
.bg-slate-100 {
  background-color: #131a2a !important;
}
.text-black,
.text-gray-900,
.text-neutral-900,
.text-slate-900 {
  color: #e5e7eb !important;
}
.text-gray-500,
.text-gray-600,
.text-neutral-500,
.text-neutral-600,
.text-slate-500,
.text-slate-600 {
  color: #8b93a3 !important;
}

/* 链接与强调色统一成品牌紫 */
a:not([class]) {
  color: #a5b4fc;
}
.text-blue-500,
.text-blue-600,
.text-sky-500,
.text-sky-600,
.text-indigo-500,
.text-indigo-600 {
  color: #a5b4fc !important;
}
.bg-blue-500,
.bg-sky-500,
.bg-indigo-500 {
  background-color: var(--primary) !important;
}

/* 输入框 / 下拉 / 弹层 */
input,
textarea,
select {
  color: #e5e7eb !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}
input::placeholder,
textarea::placeholder {
  color: #6a7282 !important;
}

/* 表格 */
.table thead tr,
thead {
  background-color: #070b16 !important;
}
thead th {
  color: #8b93a3 !important;
}
tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.035) !important;
}

/* 分页 / 徽章等浅底元素 */
.bg-gray-50.text-gray-600,
.badge {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #c3c9d5 !important;
}

/* 带透明度的浅色类（bg-white/80、bg-gray-100/60 等）统一压深 */
[class*="bg-white"],
[class*="bg-\[#fff"],
[class*="bg-\[#ffffff"] {
  background-color: #0b1120 !important;
  backdrop-filter: none !important;
}
[class*="bg-gray-100"],
[class*="bg-gray-200"],
[class*="bg-neutral-100"],
[class*="bg-slate-100"],
[class*="bg-zinc-100"] {
  background-color: #131a2a !important;
}
[class*="bg-gray-50"],
[class*="bg-neutral-50"],
[class*="bg-slate-50"] {
  background-color: #0b1120 !important;
}
[class*="bg-background"] {
  background-color: #030712 !important;
}

/* 分段控件 / 视图切换等按钮 */
button,
[role="button"] {
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #c3c9d5 !important;
}
button:hover,
[role="button"]:hover {
  color: #ffffff !important;
}

/* 头部 / 吸顶区域：去掉毛玻璃白底，改成深色 + 细描边 */
header,
[class*="sticky"] {
  background-color: rgba(3, 7, 18, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

