/* TRCMS 深色科技风主题 —— body.theme-dark 作用域；后台「设置→网站信息→主题与首页配置」切换 */
body.theme-dark {
  --primary: #38bdf8;
  --primary-dark: #0ea5e9;
  --primary-deep: #0b1220;
  --primary-light: rgba(56, 189, 248, .1);
  --text: #e8eefb;
  --text-2: #98a6c3;
  --text-3: #5f6c88;
  --bg: #070b16;
  --bg-card: #0d1526;
  --border: rgba(148, 178, 255, .13);
  --border-2: rgba(148, 178, 255, .26);
  --danger: #f87171;
  --success: #34d399;
  --warn: #fbbf24;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 56px rgba(0, 0, 0, .6);
}

/* 头部 */
body.theme-dark .site-header { background: rgba(7, 11, 22, .84); border-bottom-color: var(--border); }
body.theme-dark .nav-item > a:hover { background: rgba(148, 178, 255, .08); color: #fff; }
body.theme-dark .nav-item > a.active { color: var(--primary); }
body.theme-dark .nav-item > a.active::after { background: linear-gradient(90deg, #22d3ee, #3b82f6); }
body.theme-dark .nav-sub { background: #101a2e; }
body.theme-dark .nav-sub a:hover { color: #fff; background: rgba(56, 189, 248, .1); }
body.theme-dark .header-search { background: rgba(148, 178, 255, .06); }
body.theme-dark .header-search input { color: var(--text); }
body.theme-dark .header-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 189, 248, .12); }
body.theme-dark .brand-mark { background: linear-gradient(120deg, #22d3ee, #3b82f6 60%, #8b5cf6); box-shadow: 0 4px 18px rgba(34, 211, 238, .3); }
body.theme-dark .brand, body.theme-dark .brand:hover { color: #fff; }

/* Hero：深色氛围底（无图回退） */
body.theme-dark .hero-bg-plain { background: radial-gradient(1000px 560px at 76% 20%, rgba(59, 130, 246, .32), transparent 62%), radial-gradient(760px 480px at 12% 90%, rgba(34, 211, 238, .2), transparent 60%), #070b16; }
body.theme-dark .hero-mask { background: linear-gradient(100deg, rgba(4, 8, 18, .82) 20%, rgba(4, 8, 18, .42) 58%, rgba(4, 8, 18, .22)); }
body.theme-dark .hero-content h1 em { color: #38bdf8; }
body.theme-dark .hero-eyebrow::before { background: var(--primary); }
body.theme-dark .hero-dots-full i.active { background: var(--primary); box-shadow: 0 0 12px rgba(56, 189, 248, .8); }

/* 快讯条 */
body.theme-dark .ticker { background: var(--bg-card); border-bottom-color: var(--border); }
body.theme-dark .ticker-label { color: var(--primary); }
body.theme-dark .ticker-label::before { background: var(--primary); box-shadow: 0 0 0 3px rgba(56, 189, 248, .14); }
body.theme-dark .ticker-move a { color: var(--text-2); }
body.theme-dark .ticker-move a:hover { color: var(--primary); }

/* 区块与组件 */
body.theme-dark .section-alt { background: #0a1120; border-block-color: var(--border); }
body.theme-dark .s-tag { color: var(--primary); }
body.theme-dark .s-head h2 { color: #fff; }
body.theme-dark .card, body.theme-dark .post-row, body.theme-dark .news-row, body.theme-dark .news-item,
body.theme-dark .solution-block, body.theme-dark .help-list, body.theme-dark .panel,
body.theme-dark .side-card, body.theme-dark .article-main, body.theme-dark .contact-form-card,
body.theme-dark .auth-card, body.theme-dark .about-section, body.theme-dark .empty-tip { background: var(--bg-card); border-color: var(--border); }
body.theme-dark .card h3, body.theme-dark .post-row-body h3, body.theme-dark .news-row-body h3,
body.theme-dark .news-item h4, body.theme-dark .panel h2, body.theme-dark .side-title,
body.theme-dark .about-section h2, body.theme-dark .auth-card h1, body.theme-dark .article-head h1,
body.theme-dark .contact-info h2, body.theme-dark .contact-form-card h2 { color: #fff; }
body.theme-dark .card:hover, body.theme-dark .post-row:hover, body.theme-dark .news-row:hover,
body.theme-dark .solution-block:hover { border-color: rgba(56, 189, 248, .45); }
body.theme-dark .card-more, body.theme-dark .tag-c, body.theme-dark .news-date b,
body.theme-dark .like-btn, body.theme-dark .reply-btn, body.theme-dark .page-btn:hover,
body.theme-dark .form-tip a, body.theme-dark .auth-links a, body.theme-dark .panel .side-link { color: var(--primary); }
body.theme-dark .partner { background: var(--bg-card); border-color: var(--border); color: var(--text-2); }
body.theme-dark .partner:hover { color: #fff; border-color: var(--border-2); box-shadow: 0 0 0 1px rgba(56, 189, 248, .3), 0 10px 36px rgba(56, 189, 248, .12); }

/* 按钮 */
body.theme-dark .btn-primary { background: linear-gradient(120deg, #22d3ee, #3b82f6); box-shadow: 0 6px 24px rgba(34, 211, 238, .25); color: #04101e; }
body.theme-dark .btn-primary:hover { background: linear-gradient(120deg, #2fd9f9, #4d90f7); color: #04101e; }
body.theme-dark .btn-outline { border-color: var(--border-2); color: var(--text-2); }
body.theme-dark .btn-outline:hover { color: var(--primary); border-color: var(--primary); background: rgba(56, 189, 248, .07); }
body.theme-dark .btn-danger { background: rgba(248, 113, 113, .12); }

/* CTA */
body.theme-dark .cta-band { background: radial-gradient(640px 300px at 16% 0%, rgba(34, 211, 238, .18), transparent 60%), radial-gradient(640px 320px at 88% 100%, rgba(139, 92, 246, .16), transparent 60%), #0d1526; border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
body.theme-dark .cta-band .btn-primary { background: #fff; color: #06121f; }

/* 页面横幅 */
body.theme-dark .page-banner { background: radial-gradient(900px 380px at 82% 0%, rgba(59, 130, 246, .24), transparent 65%), radial-gradient(620px 320px at 8% 100%, rgba(34, 211, 238, .12), transparent 60%), #0a1120; border-bottom: 1px solid var(--border); }
body.theme-dark .crumbs em { color: var(--primary); }

/* 文章与评论 */
body.theme-dark .article-content, body.theme-dark .page-content { color: var(--text); }
body.theme-dark .article-content h2, body.theme-dark .article-content h3 { color: #fff; }
body.theme-dark .article-content a { color: var(--primary); }
body.theme-dark .article-content blockquote { border-left: 3px solid var(--primary); background: rgba(56, 189, 248, .07); }
body.theme-dark .comment-head b { color: var(--text); }
body.theme-dark .comment-children { border-left-color: rgba(56, 189, 248, .3); }

/* 分页 / 表单 / 会员 */
body.theme-dark .page-btn { background: var(--bg-card); border-color: var(--border); color: var(--text-2); }
body.theme-dark .page-btn.active { background: linear-gradient(120deg, #22d3ee, #3b82f6); border-color: transparent; color: #04101e; }
body.theme-dark .member-form input, body.theme-dark .member-form select, body.theme-dark .member-form textarea,
body.theme-dark .comment-form textarea { background: #0a1120; color: var(--text); border-color: var(--border); }
body.theme-dark .member-form input:focus, body.theme-dark .member-form select:focus,
body.theme-dark .member-form textarea:focus, body.theme-dark .comment-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(56, 189, 248, .12); }
body.theme-dark .member-form select option { background: #101a2e; }
body.theme-dark .captcha-line img, body.theme-dark .captcha-img { background: #fff; }
body.theme-dark .stat-box { background: rgba(56, 189, 248, .07); }
body.theme-dark .stat-box b { color: #fff; }
body.theme-dark .alert-success { background: rgba(52, 211, 153, .12); }
body.theme-dark .badge-success { background: rgba(52, 211, 153, .14); }
body.theme-dark .badge-warn { background: rgba(251, 191, 36, .14); }
body.theme-dark .member-avatar { border-color: rgba(56, 189, 248, .35); }
body.theme-dark .filter-tab { background: var(--bg-card); border-color: var(--border); color: var(--text-2); }
body.theme-dark .filter-tab.active, body.theme-dark .filter-tab:hover { background: linear-gradient(120deg, #22d3ee, #3b82f6); border-color: transparent; color: #04101e; }
body.theme-dark .side-link:hover { background: rgba(56, 189, 248, .09); color: #fff; }
body.theme-dark .side-link.active { background: linear-gradient(120deg, #22d3ee, #3b82f6); color: #04101e; }
body.theme-dark .about-section h2 { border-left-color: var(--primary); }

/* 地图反色 / 错误页 / 页脚 */
body.theme-dark .contact-map iframe { filter: grayscale(.9) invert(.92) hue-rotate(190deg) brightness(.9); }
body.theme-dark .error-code { color: transparent; -webkit-text-stroke: 0; background: linear-gradient(120deg, #22d3ee, #3b82f6); -webkit-background-clip: text; background-clip: text; }
body.theme-dark .site-footer { background: #04070d; border-top: 1px solid var(--border); }
body.theme-dark .back-top { background: linear-gradient(120deg, #22d3ee, #3b82f6); box-shadow: 0 10px 30px rgba(34, 211, 238, .35); }

@media (max-width: 960px) {
  body.theme-dark .main-nav { background: #0a1120; }
}
