/* ============================================================
   001能源 — 科技感UI主题 (兼容子比V9.0日夜模式)
   日间: 白底明亮 + 蓝青科技渐变
   夜间: 深蓝底 + 青色光晕
   不强制覆盖子比核心布局, 只做装饰增强
   ============================================================ */

/* --------------------------------------------------
   1. CSS变量 — 日间默认
   -------------------------------------------------- */
:root {
    --tech-primary: #0ea5e9;
    --tech-primary-deep: #0284c7;
    --tech-secondary: #06b6d4;
    --tech-accent: #10b981;
    --tech-glow: 0 0 20px rgba(14, 165, 233, 0.2);
    --tech-glow-strong: 0 0 30px rgba(14, 165, 233, 0.35);
    --tech-radius: 12px;
    --tech-radius-sm: 8px;
    --tech-transition: all 0.3s ease;
    --font-tech: 'Orbitron', 'Courier New', monospace;
}

/* --------------------------------------------------
   2. 日间模式 (子比默认 / data-theme="light")
   -------------------------------------------------- */
body,
[data-theme="light"] body,
html[data-theme="light"] body {
    /* 子比主题自有变量，我们只微调 */
    --theme-color: #0ea5e9;
    --theme-hover: #0284c7;
    --link-color: #0ea5e9;
    --link-hover: #0284c7;
}

/* 日间导航栏毛玻璃 */
body .nav-bar,
body .header,
[data-theme="light"] .nav-bar,
[data-theme="light"] .header,
html[data-theme="light"] .nav-bar,
html[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(14, 165, 233, 0.12);
    box-shadow: 0 1px 12px rgba(14, 165, 233, 0.06);
}

/* 日间导航链接 — 确保可见 */
body .nav-bar a,
body .header a,
[data-theme="light"] .nav-bar a,
[data-theme="light"] .header a {
    color: #1e293b;
    transition: var(--tech-transition);
}
body .nav-bar a:hover,
body .header a:hover,
[data-theme="light"] .nav-bar a:hover,
[data-theme="light"] .header a:hover {
    color: #0ea5e9;
    text-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
}

/* 日间搜索/按钮图标 */
body .nav-bar .iconfont,
body .header .iconfont,
[data-theme="light"] .nav-bar .iconfont,
[data-theme="light"] .header .iconfont {
    color: #475569;
}

/* 日间卡片科技增强 */
body .posts-item,
body .zibll-card,
body .theme-box,
[data-theme="light"] .posts-item,
[data-theme="light"] .zibll-card,
[data-theme="light"] .theme-box {
    border-top: 2px solid transparent;
    border-radius: var(--tech-radius);
    transition: var(--tech-transition);
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.05);
}
body .posts-item:hover,
body .zibll-card:hover,
body .theme-box:hover,
[data-theme="light"] .posts-item:hover,
[data-theme="light"] .zibll-card:hover,
[data-theme="light"] .theme-box:hover {
    border-top-color: #0ea5e9;
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.12);
    transform: translateY(-2px);
}

/* 日间按钮渐变 */
body .btn-primary,
body .button-primary,
body .btn-s,
[data-theme="light"] .btn-primary,
[data-theme="light"] .button-primary,
[data-theme="light"] .btn-s {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    border: none;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25);
    transition: var(--tech-transition);
}
body .btn-primary:hover,
body .button-primary:hover,
[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .button-primary:hover {
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.4);
    transform: translateY(-1px);
}

/* 日间表单输入聚焦 */
body input:focus,
body textarea:focus,
body select:focus,
[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* 日间分页 */
body .pagination a,
body .pagenav a,
[data-theme="light"] .pagination a,
[data-theme="light"] .pagenav a {
    border-radius: var(--tech-radius-sm);
    transition: var(--tech-transition);
}
body .pagination a:hover,
body .pagenav a:hover,
[data-theme="light"] .pagination a:hover,
[data-theme="light"] .pagenav a:hover {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: #fff;
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.3);
}

/* 日间页脚科技线 */
body .footer,
[data-theme="light"] .footer {
    border-top: 1px solid rgba(14, 165, 233, 0.1);
    position: relative;
}
body .footer::before,
[data-theme="light"] .footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0ea5e9, transparent);
}

/* 日间侧栏小工具 */
body .widget,
[data-theme="light"] .widget {
    border-radius: var(--tech-radius);
    border-left: 3px solid #0ea5e9;
}

/* 日间背景光斑装饰 */
body .container,
[data-theme="light"] .container {
    background-image:
        radial-gradient(ellipse at 10% 0%, rgba(14, 165, 233, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 100%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
}

/* --------------------------------------------------
   3. 夜间模式 (data-theme="dark" / .dark)
   深蓝底 + 青色光晕, 不是纯黑
   -------------------------------------------------- */
.dark body,
[data-theme="dark"] body,
html.dark body,
html[data-theme="dark"] body {
    --theme-color: #22d3ee;
    --theme-hover: #67e8f9;
    --link-color: #22d3ee;
    --link-hover: #67e8f9;
}

/* 夜间导航栏毛玻璃 */
.dark .nav-bar,
.dark .header,
[data-theme="dark"] .nav-bar,
[data-theme="dark"] .header,
html.dark .nav-bar,
html.dark .header {
    background: rgba(10, 22, 40, 0.88) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid rgba(34, 211, 238, 0.15);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

/* 夜间导航链接 */
.dark .nav-bar a,
.dark .header a,
[data-theme="dark"] .nav-bar a,
[data-theme="dark"] .header a {
    color: #e2e8f0;
    transition: var(--tech-transition);
}
.dark .nav-bar a:hover,
.dark .header a:hover,
[data-theme="dark"] .nav-bar a:hover,
[data-theme="dark"] .header a:hover {
    color: #22d3ee;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

/* 夜间搜索/按钮图标 */
.dark .nav-bar .iconfont,
.dark .header .iconfont,
[data-theme="dark"] .nav-bar .iconfont,
[data-theme="dark"] .header .iconfont {
    color: #94a3b8;
}

/* 夜间卡片 — 深蓝玻璃态 */
.dark .posts-item,
.dark .zibll-card,
.dark .theme-box,
[data-theme="dark"] .posts-item,
[data-theme="dark"] .zibll-card,
[data-theme="dark"] .theme-box {
    background: rgba(15, 34, 64, 0.7) !important;
    border-top: 2px solid transparent;
    border-radius: var(--tech-radius);
    transition: var(--tech-transition);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}
.dark .posts-item:hover,
.dark .zibll-card:hover,
.dark .theme-box:hover,
[data-theme="dark"] .posts-item:hover,
[data-theme="dark"] .zibll-card:hover,
[data-theme="dark"] .theme-box:hover {
    border-top-color: #22d3ee;
    box-shadow: 0 8px 32px rgba(34, 211, 238, 0.15);
    transform: translateY(-2px);
}

/* 夜间按钮 */
.dark .btn-primary,
.dark .button-primary,
.dark .btn-s,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .button-primary,
[data-theme="dark"] .btn-s {
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    border: none;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.25);
    color: #fff;
}
.dark .btn-primary:hover,
.dark .button-primary:hover,
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .button-primary:hover {
    box-shadow: 0 6px 28px rgba(34, 211, 238, 0.4);
}

/* 夜间表单 */
.dark input:focus,
.dark textarea:focus,
.dark select:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    border-color: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

/* 夜间分页 */
.dark .pagination a,
.dark .pagenav a,
[data-theme="dark"] .pagination a,
[data-theme="dark"] .pagenav a {
    background: rgba(15, 34, 64, 0.6);
    border-radius: var(--tech-radius-sm);
    color: #cbd5e1;
    border: 1px solid rgba(34, 211, 238, 0.1);
}
.dark .pagination a:hover,
.dark .pagenav a:hover,
[data-theme="dark"] .pagination a:hover,
[data-theme="dark"] .pagenav a:hover {
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    color: #fff;
    box-shadow: 0 2px 16px rgba(34, 211, 238, 0.3);
}

/* 夜间页脚 */
.dark .footer,
[data-theme="dark"] .footer {
    border-top: 1px solid rgba(34, 211, 238, 0.1);
    position: relative;
}
.dark .footer::before,
[data-theme="dark"] .footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee, transparent);
}

/* 夜间侧栏 */
.dark .widget,
[data-theme="dark"] .widget {
    background: rgba(15, 34, 64, 0.6) !important;
    border-radius: var(--tech-radius);
    border-left: 3px solid #22d3ee;
}

/* --------------------------------------------------
   4. 通用增强 (日/夜都生效)
   -------------------------------------------------- */

/* 选中文字高亮 */
::selection {
    background: rgba(14, 165, 233, 0.25);
    color: inherit;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0ea5e9, #06b6d4);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0284c7, #0ea5e9);
}

/* 标签 */
.tag,
.tag-cloud a,
.dark .tag,
.dark .tag-cloud a,
[data-theme="dark"] .tag,
[data-theme="dark"] .tag-cloud a {
    border-radius: 20px;
    padding: 2px 12px;
    transition: var(--tech-transition);
}
.tag:hover,
.tag-cloud a:hover {
    box-shadow: var(--tech-glow);
}

/* 文章标题链接悬停光晕 */
.posts-item .item-heading a:hover,
.zibll-card .item-heading a:hover {
    color: var(--theme-color);
    text-shadow: 0 0 8px rgba(14, 165, 233, 0.3);
}
.dark .posts-item .item-heading a:hover,
.dark .zibll-card .item-heading a:hover,
[data-theme="dark"] .posts-item .item-heading a:hover,
[data-theme="dark"] .zibll-card .item-heading a:hover {
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

/* 评论区 */
.comment-list .comment-body {
    border-radius: var(--tech-radius-sm);
    transition: var(--tech-transition);
}
.comment-list .comment-body:hover {
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.08);
}

/* 表格 */
table {
    border-radius: var(--tech-radius-sm);
    overflow: hidden;
}
table thead {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: #fff;
}
table tbody tr:nth-child(even) {
    background: rgba(14, 165, 233, 0.04);
}
.dark table tbody tr:nth-child(even),
[data-theme="dark"] table tbody tr:nth-child(even) {
    background: rgba(34, 211, 238, 0.05);
}

/* 代码块 */
pre,
code {
    border-radius: var(--tech-radius-sm);
}
pre {
    border-left: 3px solid #0ea5e9;
}
.dark pre,
[data-theme="dark"] pre {
    border-left-color: #22d3ee;
}

/* 引用块 */
blockquote {
    border-left: 3px solid #0ea5e9;
    border-radius: 0 var(--tech-radius-sm) var(--tech-radius-sm) 0;
    background: rgba(14, 165, 233, 0.04);
}
.dark blockquote,
[data-theme="dark"] blockquote {
    border-left-color: #22d3ee;
    background: rgba(34, 211, 238, 0.06);
}

/* --------------------------------------------------
   5. 移动端适配
   -------------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --tech-radius: 10px;
        --tech-radius-sm: 6px;
    }

    body .nav-bar,
    body .header,
    .dark .nav-bar,
    .dark .header {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}
