/* ============================================================
   智仪全球 - 主题修复与色调统一层 (theme-fix.css)
   加载顺序：所有页面在 theme-deep.css 之后最后加载
   职责：
   1) 恢复被误覆盖的深色 Hero / 深色区块背景
   2) 深色容器内文字/链接/表单的可读性兜底
   3) 统一全站背景层次与交互细节
   规范：任何深色区块加 class="is-dark" 或 data-surface="dark"
   ============================================================ */

/* ===== 1. 深色表面清单（背景兜底）===== */
.hero,
.guide-hero,
.about-hero,
.legal-hero,
.trade-hero,
.sol-hero,
.customs-hero,
.inquiry-hero,
.wholesale-hero,
.data-dashboard,
.cta-banner,
.is-dark,
[data-surface="dark"] {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%) !important;
    color: rgba(255, 255, 255, 0.92);
}

/* 特例：自带配色的深色区块，保留其原设计 */
.stats-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #b00015 100%) !important;
}
.cta-banner {
    background: linear-gradient(135deg, #e2001a 0%, #b00015 100%) !important;
}
.customs-hero {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #00897b 100%) !important;
}
.inquiry-hero {
    background: linear-gradient(135deg, #006064 0%, #00838f 50%, #00acc1 100%) !important;
}
.wholesale-hero {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 50%, #01579b 100%) !important;
}
.login-page, .register-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
}

/* ===== 2. 深色容器内标题必须为白色 ===== */
.hero h1, .hero h2, .hero h3, .hero h4, .hero h5, .hero h6,
.guide-hero h1, .guide-hero h2, .guide-hero h3,
.about-hero h1, .about-hero h2, .about-hero h3,
.legal-hero h1, .legal-hero h2,
.trade-hero h1, .trade-hero h2, .trade-hero h3,
.sol-hero h1, .sol-hero h2, .sol-hero h3,
.customs-hero h1, .customs-hero h2, .customs-hero h3,
.inquiry-hero h1, .inquiry-hero h2, .inquiry-hero h3,
.wholesale-hero h1, .wholesale-hero h2, .wholesale-hero h3,
.data-dashboard h1, .data-dashboard h2, .data-dashboard h3, .data-dashboard h4,
.cta-banner h1, .cta-banner h2, .cta-banner h3,
.is-dark h1, .is-dark h2, .is-dark h3, .is-dark h4, .is-dark h5, .is-dark h6,
[data-surface="dark"] h1, [data-surface="dark"] h2, [data-surface="dark"] h3,
[data-surface="dark"] h4, [data-surface="dark"] h5, [data-surface="dark"] h6 {
    color: #ffffff !important;
}

/* ===== 3. 深色容器内正文/次要文字 ===== */
.hero p, .guide-hero p, .about-hero p, .legal-hero p, .trade-hero p,
.sol-hero p, .customs-hero p, .inquiry-hero p, .wholesale-hero p,
.data-dashboard p, .cta-banner p,
.is-dark p, [data-surface="dark"] p,
.is-dark li, [data-surface="dark"] li {
    color: rgba(255, 255, 255, 0.88) !important;
}
.hero .subtitle, .guide-hero .subtitle, .about-hero .subtitle,
.trade-hero .subtitle, .sol-hero .subtitle, .customs-hero .subtitle,
.inquiry-hero .subtitle, .wholesale-hero .subtitle, .cta-banner .subtitle,
.is-dark .subtitle, .is-dark .desc, .is-dark .sub-text, .is-dark .text-muted,
[data-surface="dark"] .subtitle, [data-surface="dark"] .desc,
[data-surface="dark"] .sub-text, [data-surface="dark"] .text-muted {
    color: rgba(255, 255, 255, 0.82) !important;
}

/* ===== 4. 深色容器内链接与面包屑 ===== */
.guide-hero .breadcrumb, .about-hero .breadcrumb, .trade-hero .breadcrumb,
.sol-hero .breadcrumb, .customs-hero .breadcrumb, .inquiry-hero .breadcrumb,
.wholesale-hero .breadcrumb, .legal-hero .breadcrumb,
.is-dark .breadcrumb, [data-surface="dark"] .breadcrumb {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.75) !important;
}
.guide-hero .breadcrumb a, .about-hero .breadcrumb a, .trade-hero .breadcrumb a,
.sol-hero .breadcrumb a, .customs-hero .breadcrumb a, .inquiry-hero .breadcrumb a,
.wholesale-hero .breadcrumb a, .legal-hero .breadcrumb a,
.is-dark .breadcrumb a, [data-surface="dark"] .breadcrumb a {
    color: rgba(255, 255, 255, 0.88) !important;
}
.guide-hero .breadcrumb a:hover, .is-dark .breadcrumb a:hover,
[data-surface="dark"] .breadcrumb a:hover {
    color: #ff8a80 !important;
}

/* ===== 5. 深色容器内表单控件保持可读 ===== */
.is-dark input, .is-dark select, .is-dark textarea,
[data-surface="dark"] input, [data-surface="dark"] select, [data-surface="dark"] textarea {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}
.is-dark input::placeholder, .is-dark textarea::placeholder,
[data-surface="dark"] input::placeholder, [data-surface="dark"] textarea::placeholder {
    color: #8a8f99 !important;
}
/* 输入分组（label 在深色底上）*/
.is-dark label, [data-surface="dark"] label,
.finance-form .form-label, .calc-card .form-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ===== 6. 深色容器内通用卡片兜底 ===== */
.is-dark .card, .is-dark .panel, .is-dark .info-card,
[data-surface="dark"] .card, [data-surface="dark"] .panel {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: rgba(255, 255, 255, 0.92);
}
.is-dark table, [data-surface="dark"] table {
    color: rgba(255, 255, 255, 0.92);
}

/* ===== 7. 全站色调微调（更干净的冷暖灰层次）===== */
body {
    background: #f4f6f9 !important;
}
.badge, .tag {
    background: #eef1f5 !important;
    color: #3a4150 !important;
}
::selection {
    background: rgba(226, 0, 26, 0.16);
}
/* 图片加载占位 */
img {
    background: #eef1f5;
}

/* ===== 8. 页脚细节 ===== */
.main-footer {
    background: linear-gradient(180deg, #14142a 0%, #1a1a2e 100%) !important;
}

/* ===== 9. 减少晕眩：滚动条统一 ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #eef1f5; }
::-webkit-scrollbar-thumb { background: #c3cad4; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #a8b2bf; }

/* ===== 10. 语言切换器（中/英/俄/阿）可读性修复 =====
   根因：theme-deep.css 的 `.top-bar a{color:#ffffff !important}` 会把
   位于 top-bar 内的下拉菜单项（<a class="lang-option">）强制刷成白字，
   而菜单本身是白底 -> 白字白底完全不可见。此处统一纠正。 */
.lang-dropdown {
    background: #ffffff !important;
    border: 1px solid #dfe3ea !important;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.16) !important;
}
/* 菜单项：深色文字（覆盖 .top-bar a 的强制白字） */
.lang-dropdown .lang-option,
.top-bar .lang-dropdown .lang-option,
.main-header .lang-dropdown .lang-option {
    color: #2b2f38 !important;
    text-decoration: none !important;
}
.lang-dropdown .lang-option:hover,
.top-bar .lang-dropdown .lang-option:hover {
    background: #eef3ff !important;
    color: #0b57d0 !important;
}
.lang-dropdown .lang-option.active,
.top-bar .lang-dropdown .lang-option.active {
    background: #e8f0fe !important;
    color: #1a73e8 !important;
    font-weight: 600 !important;
}
.lang-option span { color: inherit !important; }
/* 触发按钮：深色条上用白字 + 更清晰的描边 */
.lang-btn,
.top-bar .lang-btn,
.top-bar .lang-switcher .lang-btn {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}
.top-bar .lang-btn:hover { background: rgba(255, 255, 255, 0.3) !important; }
/* 顶部通告栏整体提亮（不影响下拉菜单内部） */
.top-bar > .container > span { color: rgba(255, 255, 255, 0.92) !important; }

/* ===== 8. 交易页 · 多币种结算（浅色主题适配，修复白字不可见） ===== */
.currency-section {
    background: #ffffff !important;
}
.currency-section .section-tag { color: #e2001a !important; }
.currency-section .section-header h2 { color: #1a1a1a !important; }
.currency-section .section-header p { color: #666666 !important; }
.currency-section .currency-card {
    background: #ffffff !important;
    border: 1px solid #e8eaf0 !important;
    box-shadow: 0 2px 10px rgba(26, 26, 46, 0.05);
}
.currency-section .currency-card:hover {
    background: #fef2f3 !important;
    border-color: #e2001a !important;
    box-shadow: 0 8px 20px rgba(226, 0, 26, 0.12);
}
.currency-section .cur-symbol { color: #e2001a !important; }
.currency-section .cur-code { color: #1a1a2e !important; }
.currency-section .cur-name { color: #666666 !important; }
