/*
 * 全站半透明图片覆盖层。
 * 保持 Sub2API 原本的深色/浅色主题、背景和功能面板不变。
 */
/* 全站固定半透明壁纸层，不阻挡网站操作。 */
body::after {
    content: "" !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    display: block !important;
    pointer-events: none !important;
    opacity: 0.18 !important;
    background-image: url("/h.jpg?v=90") !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}
/* 全站功能区域改为深色半透明，保留壁纸的视觉层次 */
[class*="bg-white"],
[class*="bg-gray-"],
[class*="bg-slate-"],
[class*="bg-zinc-"],
[class*="bg-neutral-"],
[class*="bg-background"],
[class*="bg-card"],
[class*="bg-popover"] {
    background-color: rgba(10, 16, 28, 0.94) !important;
}

/* 卡片、表格、侧边栏、下拉菜单和弹窗的边界更清晰 */
[class*="border-"] {
    border-color: rgba(148, 163, 184, 0.22) !important;
}

/* 表格鼠标悬停时保持一点区分度 */
tr:hover,
[class*="hover:bg-"]:hover {
    background-color: rgba(51, 65, 85, 0.72) !important;
}

/*
 * 仅浅色模式：把常见白底、黑底、卡片和弹窗改为透明磨砂效果。
 * 深色模式不匹配这些规则，保持当前原样。
 */
html:not(.dark) [class*="bg-white"],
html:not(.dark) [class*="bg-gray-"],
html:not(.dark) [class*="bg-slate-"],
html:not(.dark) [class*="bg-zinc-"],
html:not(.dark) [class*="bg-neutral-"],
html:not(.dark) [class*="bg-background"],
html:not(.dark) [class*="bg-card"],
html:not(.dark) [class*="bg-popover"],
html[data-theme="light"] [class*="bg-white"],
html[data-theme="light"] [class*="bg-gray-"],
html[data-theme="light"] [class*="bg-slate-"],
html[data-theme="light"] [class*="bg-zinc-"],
html[data-theme="light"] [class*="bg-neutral-"],
html[data-theme="light"] [class*="bg-background"],
html[data-theme="light"] [class*="bg-card"],
html[data-theme="light"] [class*="bg-popover"] {
    background-color: rgba(255, 255, 255, 0.60) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* 浅色模式中原本黑色的导航/浮层改成深色透明面板 */
html:not(.dark) [class*="bg-black"],
html:not(.dark) [class*="bg-gray-900"],
html:not(.dark) [class*="bg-slate-900"],
html:not(.dark) [class*="bg-zinc-900"],
html:not(.dark) [class*="bg-neutral-900"],
html[data-theme="light"] [class*="bg-black"],
html[data-theme="light"] [class*="bg-gray-900"],
html[data-theme="light"] [class*="bg-slate-900"],
html[data-theme="light"] [class*="bg-zinc-900"],
html[data-theme="light"] [class*="bg-neutral-900"] {
    background-color: rgba(15, 23, 42, 0.58) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* 边框略微透明，避免白色方块感太强 */
html:not(.dark) [class*="border-"],
html[data-theme="light"] [class*="border-"] {
    border-color: rgba(100, 116, 139, 0.24) !important;
}

