/* ============================================================
   auto-day-night.css — 白天/黑夜自动切换 (2026-09-03, v3 中灰蓝背景)
   方案：白天/夜间 UI 都保持「深色玻璃卡片 + 白字」的一致观感，
        仅背景在白天提亮为中灰蓝、夜间为深蓝黑，切换不撕裂。
   规则：
   - body[data-autotheme="day"]   → 背景中灰蓝渐变（UI 仍深色玻璃）
   - body[data-autotheme="night"] → 背景压暗一档深蓝黑
   19:00–7:00 自动夜间；顶部按钮可手动切换并记忆 localStorage。
   同时挂到首页(beautify.css之后)和后台(admin-redesign.css之后)
   ============================================================ */

/* ---------- 通用：切换按钮 ---------- */
.sunAutoThemeBtn{position:relative!important}
.sunAutoThemeBtn .sunAutoThemeIcon{margin-right:5px}

/* ============================================================
   DAY 模式 — 背景：中灰蓝渐变（UI 沿用深色玻璃卡片，白字不变）
   卡片/顶栏/侧栏/搜索/选项卡等不在此覆写 → 走深色玻璃默认样式，
   从而与夜间观感统一、不出现白色死板卡片。
   ============================================================ */
body[data-autotheme="day"]{
  background:linear-gradient(150deg,#aebdd4 0%,#93a5c2 35%,#8395b3 65%,#93a3bf 100%) !important;
  background-attachment:fixed !important;
}
/* 叠加淡青/淡紫微光，保留背景色彩感（比夜间版更亮更透） */
body[data-autotheme="day"]::before{
  background:
    radial-gradient(ellipse 900px 700px at 10% 0%,rgba(56,189,248,.22),transparent 45%),
    radial-gradient(ellipse 750px 600px at 90% 5%,rgba(139,92,246,.18),transparent 40%),
    radial-gradient(ellipse 700px 500px at 50% 100%,rgba(34,211,238,.10),transparent 45%) !important;
  filter:none !important;
}
body[data-autotheme="day"]::after{background:rgba(255,255,255,.06) !important}

/* 白天在浅色背景下补充对比：让深玻璃卡片更醒目一点点（可选微调） */
body[data-autotheme="day"] .card,
body[data-autotheme="day"] .panel,
body[data-autotheme="day"] .top,
body[data-autotheme="day"] .sunPanelAdminSidebar,
body[data-autotheme="day"] .sunPanelSystemAppHeader,
body[data-autotheme="day"] .sunExactCard,
body[data-autotheme="day"] .sunPanelSettingsCard{
  box-shadow:0 6px 26px rgba(15,23,42,.30) !important;
  border-color:rgba(255,255,255,.14) !important;
}

/* ============================================================
   NIGHT 模式 — 背景：压暗一档深蓝黑（UI 深色玻璃不变）
   ============================================================ */
body[data-autotheme="night"]{
  background:linear-gradient(150deg,#101828 0%,#0b1120 50%,#0d1526 100%) !important;
  background-attachment:fixed !important;
}
body[data-autotheme="night"]::before{
  background:
    radial-gradient(ellipse 900px 700px at 10% 0%,rgba(56,189,248,.10),transparent 45%),
    radial-gradient(ellipse 750px 600px at 90% 5%,rgba(139,92,246,.09),transparent 40%) !important;
}
body[data-autotheme="night"]::after{background:rgba(0,0,0,.16) !important}

/* ---------- 平滑过渡 ---------- */
body, body .card, body .panel, body .top, body .sunPanelAdminSidebar,
body .sunPanelSystemAppHeader, body .sunExactCard, body .sunPanelSettingsCard{
  transition:background .5s ease, box-shadow .4s ease, border-color .4s ease !important;
}
