/* ========================================================
   星云智联 API · 全局高级毛玻璃与壁纸通透引擎 (Ultimate Glass v5)
   ======================================================== */

/* 全局固定壁纸底层容器：固定在窗口最底层，绝对不随滚动条位移，永不断层 */
#site-wallpaper {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -9999 !important;
  pointer-events: none !important;
  background-size: cover !important;
  background-position: center 25% !important;
  background-repeat: no-repeat !important;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

/* 全局环境氛围遮罩：提高遮罩厚度，让壁纸温润退居幕后，彻底解决文字看不清的问题 */
#site-wallpaper-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: -9998 !important;
  pointer-events: none !important;
}

.dark #site-wallpaper-overlay,
html.dark #site-wallpaper-overlay {
  background: radial-gradient(circle at 50% 20%, rgba(10, 14, 23, 0.75) 0%, rgba(6, 8, 14, 0.92) 100%) !important;
}

:root:not(.dark) #site-wallpaper-overlay {
  background: radial-gradient(circle at 50% 20%, rgba(250, 250, 248, 0.82) 0%, rgba(238, 240, 244, 0.94) 100%) !important;
}

/* 1. 彻底清空所有顶层全屏容器的死黑/死白背景，让壁纸贯穿到底 */
html,
body,
#root,
#root > div,
[class*="min-h-svh"],
[class*="min-h-screen"],
.group\/sidebar-wrapper,
.peer-data-\[variant\=inset\] {
  background: transparent !important;
  background-color: transparent !important;
}

/* 2. 侧边控制栏：沉稳优雅的毛玻璃侧栏，文字清晰 */
[data-sidebar="sidebar"],
[data-sidebar="sidebar"] > div,
aside,
.bg-sidebar {
  background-color: rgba(13, 17, 28, 0.78) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
}

:root:not(.dark) [data-sidebar="sidebar"],
:root:not(.dark) [data-sidebar="sidebar"] > div,
:root:not(.dark) aside,
:root:not(.dark) .bg-sidebar {
  background-color: rgba(255, 255, 255, 0.84) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
}

/* 3. 控制台中间内容主区：完全透明，让卡片直接悬浮在壁纸上 */
[data-slot="sidebar-inset"],
main,
[class*="SidebarInset"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* 4. 控制台与全站所有卡片（Card / Section / Panel）高质感重雕 */
/* 深色模式：扎实的深色高质感底色（0.86），微透但文字极其锐利清晰，带精致高亮微边框 */
.dark [data-slot="card"],
.dark .bg-card,
.dark section.bg-card,
.dark div.bg-card {
  background-color: rgba(16, 21, 34, 0.86) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* 浅色模式：高密度珍珠白磨砂卡片（0.90） */
:root:not(.dark) [data-slot="card"],
:root:not(.dark) .bg-card,
:root:not(.dark) section.bg-card,
:root:not(.dark) div.bg-card {
  background-color: rgba(255, 255, 255, 0.90) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

/* 5. 数据看板核心：数据表格（Table）、日志列表、复杂图表区域保障高对比度清晰读数 */
.dark table,
.dark thead,
.dark tbody tr,
.dark [data-slot="table"],
.dark .bg-muted\/40,
.dark .bg-muted\/50,
.dark .bg-muted\/30 {
  background-color: rgba(14, 18, 29, 0.92) !important;
}

:root:not(.dark) table,
:root:not(.dark) thead,
:root:not(.dark) tbody tr,
:root:not(.dark) [data-slot="table"],
:root:not(.dark) .bg-muted\/40,
:root:not(.dark) .bg-muted\/50,
:root:not(.dark) .bg-muted\/30 {
  background-color: rgba(246, 248, 250, 0.94) !important;
}

/* 6. 顶栏 Header 半透明磨砂玻璃 */
header,
[data-slot="header"] {
  background-color: rgba(11, 15, 25, 0.75) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

:root:not(.dark) header,
:root:not(.dark) [data-slot="header"] {
  background-color: rgba(255, 255, 255, 0.82) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}
