/* ============================================================
   BaiNingApi · Lemon Liquid Glass Theme (v2)
   注入式主题层：在应用 Tailwind CSS 之后加载
   ============================================================ */

:root {
  --bn-50:  #fffdf2;
  --bn-100: #fff8cc;
  --bn-200: #ffe98f;
  --bn-300: #ffdd5c;
  --bn-400: #ffd11a;
  --bn-500: #ffc300;
  --bn-600: #d99f00;
  --bn-700: #a67c00;
  --bn-ink: #33290a;
  --bn-ink-soft: #7a6620;
  --bn-shadow: 0 18px 48px rgba(163, 124, 0, 0.16), 0 2px 10px rgba(163, 124, 0, 0.08);
  --bn-shadow-lift: 0 28px 74px rgba(163, 124, 0, 0.24), 0 4px 14px rgba(163, 124, 0, 0.10);
  --bn-radius: 22px;
}

/* ---------- 底色：奶油柠檬 + 细网格 ---------- */
html { background: #fffdf6 !important; }

body {
  background:
    linear-gradient(rgba(198, 152, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198, 152, 0, 0.05) 1px, transparent 1px),
    radial-gradient(1200px 700px at -6% -14%, #ffef9e 0%, rgba(255, 239, 158, 0) 58%),
    radial-gradient(1000px 620px at 106% -6%, #ffe27a 0%, rgba(255, 226, 122, 0) 56%),
    radial-gradient(1000px 700px at 52% 118%, #fff6c9 0%, rgba(255, 246, 201, 0) 58%),
    linear-gradient(168deg, #ffffff 0%, #fffdf6 42%, #fffbee 100%) !important;
  background-size: 54px 54px, 54px 54px, auto, auto, auto, auto !important;
  background-attachment: fixed !important;
  color: var(--bn-ink) !important;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 流动的柠檬光斑（玻璃后面要有东西才显玻璃感） ---------- */
#bn-aura {
  position: fixed;
  inset: -18vmax;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(30vmax 24vmax at 16% 20%, rgba(255, 205, 20, 0.55), rgba(255, 205, 20, 0) 62%),
    radial-gradient(26vmax 22vmax at 78% 16%, rgba(255, 232, 120, 0.75), rgba(255, 232, 120, 0) 64%),
    radial-gradient(24vmax 20vmax at 88% 62%, rgba(255, 176, 0, 0.34), rgba(255, 176, 0, 0) 66%),
    radial-gradient(34vmax 26vmax at 42% 96%, rgba(255, 214, 60, 0.5), rgba(255, 214, 60, 0) 66%);
    radial-gradient(20vmax 16vmax at 68% 88%, rgba(226, 255, 130, 0.42), rgba(226, 255, 130, 0) 62%);
  filter: blur(34px) saturate(140%);
  animation: bn-drift 26s ease-in-out infinite alternate;
}

@keyframes bn-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  50%  { transform: translate3d(2.4vmax, -1.8vmax, 0) scale(1.05) rotate(1.5deg); }
  100% { transform: translate3d(-2vmax, 2.6vmax, 0) scale(1.08) rotate(-1.5deg); }
}

#app { position: relative; z-index: 1; }

/* 去掉应用自带的 fixed 叠层（会整页发黄、盖住内容） */
.min-h-screen,
.bg-gray-50 { background-color: transparent !important; }

.bg-mesh-gradient {
  background-image: none !important;
  background-color: transparent !important;
}

/* ---------- 玻璃卡片 ---------- */
.card,
.card-glass,
.stat-card,
.panel {
  position: relative;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 253, 240, 0.40) 52%, rgba(255, 244, 186, 0.30) 100%) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  border-radius: var(--bn-radius) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 40px rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(224, 168, 0, 0.07),
    var(--bn-shadow) !important;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, background 0.3s ease;
}

/* 左上角一层高光，模拟玻璃折射 */
.card::after,
.card-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 8% 0%, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 42%);
  opacity: 0.9;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 0 0 1px rgba(224, 168, 0, 0.12),
    var(--bn-shadow-lift) !important;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 251, 226, 0.55)) !important;
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  backdrop-filter: blur(30px) saturate(190%);
  border-right: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: 16px 0 54px rgba(168, 130, 0, 0.12), inset -1px 0 0 rgba(255, 255, 255, 0.6) !important;
}

.sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.7) !important;
  background: transparent !important;
}

.sidebar-brand-title {
  color: var(--bn-ink) !important;
  letter-spacing: 0.01em;
}

.sidebar-link {
  color: #5c4c14 !important;
  border: 1px solid transparent;
  border-radius: 14px !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.sidebar-link:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 233, 143, 0.62)) !important;
  border-color: rgba(255, 255, 255, 0.95) !important;
  color: #4a3a06 !important;
  transform: translateX(2px);
  box-shadow: 0 10px 24px rgba(200, 160, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.sidebar-link.router-link-active,
.sidebar-link.router-link-exact-active,
.sidebar-link.sidebar-link-active,
.sidebar-link.active,
.sidebar-link[aria-current="page"] {
  background: linear-gradient(135deg, #ffdf5c 0%, #ffc300 52%, #f2a900 100%) !important;
  color: #3a2c00 !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -6px 16px rgba(190, 130, 0, 0.2),
    0 12px 28px rgba(214, 165, 0, 0.34) !important;
  font-weight: 600;
}

/* ---------- 顶栏 ---------- */
header,
.topbar,
.navbar {
  background: rgba(255, 255, 255, 0.55) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 10px 30px rgba(168, 130, 0, 0.07) !important;
}

/* ---------- 按钮 ---------- */
.btn { border-radius: 14px !important; letter-spacing: 0.01em; }

.btn-primary,
button.bg-primary-600,
a.bg-primary-600 {
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #ffe066 0%, #ffc300 52%, #f2a900 100%) !important;
  background-color: #ffc300 !important;
  color: #3a2c00 !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 8px rgba(190, 130, 0, 0.24),
    0 12px 28px rgba(214, 165, 0, 0.32) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-primary:hover,
button.bg-primary-600:hover,
a.bg-primary-600:hover {
  transform: translateY(-1px);
  filter: saturate(115%) brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 18px 38px rgba(214, 165, 0, 0.4) !important;
}

.btn-secondary,
.btn-ghost {
  background: rgba(255, 255, 255, 0.62) !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  color: #4a3c10 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 8px 20px rgba(180, 140, 0, 0.13) !important;
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: rgba(255, 247, 214, 0.9) !important;
  color: #3a2c00 !important;
}

/* ---------- 输入框 ---------- */
.input,
.textarea,
.select,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea {
  background: rgba(255, 255, 255, 0.66) !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  border-radius: 14px !important;
  color: #33290a !important;
  box-shadow: inset 0 1px 3px rgba(180, 140, 0, 0.08), 0 2px 12px rgba(180, 140, 0, 0.07) !important;
  transition: box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.input::placeholder,
input::placeholder,
textarea::placeholder { color: #bda763 !important; }

.input:focus,
textarea:focus,
select:focus,
input:focus {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: #ffc300 !important;
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(255, 195, 0, 0.24), inset 0 1px 2px rgba(180, 140, 0, 0.06) !important;
}

.input-label {
  color: #6b5620 !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
}

/* ---------- 表格 ---------- */
.table { color: #4a3c10 !important; }

.table thead th {
  background: rgba(255, 248, 214, 0.8) !important;
  color: #6b5620 !important;
  border-bottom: 1px solid rgba(224, 190, 60, 0.38) !important;
  font-weight: 600;
}

.table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.65) !important;
  transition: background 0.18s ease;
}

.table tbody tr:hover { background: rgba(255, 247, 214, 0.7) !important; }

/* ---------- 徽章 ---------- */
.badge,
.badge-primary {
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.75) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.badge-primary {
  background: linear-gradient(135deg, #fff3b0, #ffd11a) !important;
  color: #5c4700 !important;
}

/* ---------- 渐变文字 ---------- */
.text-gradient {
  background-image: linear-gradient(100deg, #b8860b 0%, #e0a800 40%, #ffc300 68%, #c89600 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 2px 12px rgba(255, 195, 0, 0.4));
}

/* ---------- 弹层 ---------- */
.dropdown,
[class*="dropdown"] {
  background: rgba(255, 255, 255, 0.82) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95) !important;
  border-radius: 16px !important;
  box-shadow: var(--bn-shadow) !important;
}

/* ---------- 登录 / 注册页 ---------- */
.card-glass {
  border-radius: 28px !important;
  padding: 2.5rem !important;
}

.card-glass::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(255, 214, 26, 0.6) 46%, rgba(255, 255, 255, 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

img[src="/logo.svg"] {
  filter: drop-shadow(0 10px 24px rgba(214, 165, 0, 0.4));
}

/* ---------- 滚动条 / 选区 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 250, 224, 0.55); }

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffe98f, #ffc300);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.65);
}

::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #ffd11a, #f2a900); }

::selection {
  background: rgba(255, 195, 0, 0.38) !important;
  color: #33290a !important;
}

/* ---------- 暗色模式：同一套柠檬玻璃 ---------- */
.dark body,
html.dark body {
  background:
    linear-gradient(rgba(255, 214, 60, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 214, 60, 0.05) 1px, transparent 1px),
    radial-gradient(1000px 600px at 6% -8%, #4a3c06 0%, rgba(74, 60, 6, 0) 60%),
    radial-gradient(900px 560px at 96% 0%, #5c4a08 0%, rgba(92, 74, 8, 0) 58%),
    linear-gradient(165deg, #1d1705 0%, #2a2107 52%, #171204 100%) !important;
  background-size: 54px 54px, 54px 54px, auto, auto, auto !important;
  color: #ffeeb8 !important;
}

.dark .card,
.dark .card-glass,
.dark .sidebar,
.dark .dropdown,
.dark header {
  background: linear-gradient(150deg, rgba(70, 57, 12, 0.72), rgba(38, 30, 6, 0.6)) !important;
  border-color: rgba(255, 214, 60, 0.3) !important;
  color: #ffeeb8 !important;
}

.dark .sidebar-link { color: #e8d59a !important; }

.dark .input,
.dark input,
.dark textarea,
.dark select {
  background: rgba(60, 49, 12, 0.65) !important;
  color: #ffeeb8 !important;
  border-color: rgba(255, 214, 60, 0.32) !important;
}

/* ---------- 可访问性 ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #ffc300 !important;
  outline-offset: 2px;
  border-radius: 10px;
}

@media (max-width: 640px) {
  .card, .card-glass { border-radius: 18px !important; }
  .card-glass { padding: 1.5rem !important; }
}



