/* ========== DARK THEME OVERRIDES ========== */

[data-theme="dark"] {
    --color-bg: #06070a;
    --color-bg-alt: #0a0e1a;
    --color-card: #10121a;
    --color-card-hover: #161a28;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);
    --color-text: #eef0f6;
    --color-text-mid: #8a8fa0;
    --color-text-dim: #555a6e;
    --color-accent: #6366f1;
    --color-accent-light: #818cf8;
    --color-accent-pale: #a5b4fc;
    --gradient-main: linear-gradient(135deg, #6366f1, #818cf8);
}

/* --- Particle Intro --- */
[data-theme="dark"] .sec-particle-intro {
    background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}
[data-theme="dark"] .particle-intro-fallback {
    color: var(--color-accent-pale);
}

/* --- Navbar --- */
[data-theme="dark"] .navbar.scrolled {
    background: rgba(6, 7, 10, 0.92);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .lang-switcher { background: rgba(255, 255, 255, 0.06); }

/* --- Mobile Nav --- */
@media (max-width: 768px) {
    [data-theme="dark"] .nav-links {
        background: rgba(10, 14, 26, 0.96);
    }
}

/* --- Hero --- */
[data-theme="dark"] .hero-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

[data-theme="dark"] .hero-title-line {
    background: linear-gradient(135deg, #eef0f6 0%, #8a8fa0 50%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="dark"] .hero-orb { opacity: 0.5; }

[data-theme="dark"] .orb1 {
    background: radial-gradient(circle, rgba(79, 70, 229, 0.12), transparent 70%);
}
[data-theme="dark"] .orb2 {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent 70%);
}
[data-theme="dark"] .orb3 {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08), transparent 70%);
}
[data-theme="dark"] .orb4 {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06), transparent 70%);
}

[data-theme="dark"] .arrow-mouse {
    border-color: rgba(255, 255, 255, 0.15);
}

/* --- Sections --- */
[data-theme="dark"] .sec-reasons {
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

[data-theme="dark"] .sec-features {
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

[data-theme="dark"] .tech-wrap {
    background: linear-gradient(135deg, var(--color-bg) 0%, #0d0f1a 100%);
}

/* --- Cards & Items --- */
[data-theme="dark"] .rfeat {
    background: rgba(255, 255, 255, 0.02);
}
[data-theme="dark"] .rfeat:hover {
    background: rgba(99, 102, 241, 0.06);
}

[data-theme="dark"] .rtab-bar {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .tech-tags span {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .tech-progress {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .tao-screen {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--color-border);
}

[data-theme="dark"] .tao-text span {
    color: rgba(255, 255, 255, 0.2);
}

/* --- OCR Animation Lines --- */
[data-theme="dark"] .ao-lines i {
    background: rgba(255, 255, 255, 0.06);
}

/* --- AI Chat Messages --- */
[data-theme="dark"] .ac-ai {
    background: rgba(255, 255, 255, 0.04);
}

/* --- Browser Mockup --- */
[data-theme="dark"] .bm {
    background: #1a1d2e;
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .bm-bar {
    background: #14162a;
}
[data-theme="dark"] .bm-url {
    background: rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .bm-a {
    background: rgba(255, 255, 255, 0.03);
}

/* --- Fullpage Dots --- */
[data-theme="dark"] .fp-dot {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .fp-dot:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}
[data-theme="dark"] .fp-dot::after {
    background: rgba(16, 18, 26, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}

/* --- Section Dividers --- */
[data-theme="dark"] .fp-section + .fp-section::before {
    background: linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.1) 50%, transparent 100%);
}

/* --- Premium Effects --- */
[data-theme="dark"] .text-gradient-hero {
    background: linear-gradient(135deg, #eef0f6 0%, #8a8fa0 30%, #818cf8 60%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="dark"] .glass-card {
    background: rgba(16, 18, 26, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .toast {
    background: rgba(16, 18, 26, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(99, 102, 241, 0.08);
}

/* --- Subpage --- */
[data-theme="dark"] .page-hero {
    background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

[data-theme="dark"] .settings-item {
    background: rgba(255, 255, 255, 0.02);
}
[data-theme="dark"] .settings-item:hover {
    background: rgba(99, 102, 241, 0.06);
}

/* --- Download Section --- */
[data-theme="dark"] .sec-download {
    background: radial-gradient(ellipse at center top, rgba(99, 102, 241, 0.04) 0%, transparent 60%),
                var(--color-bg-alt);
}

/* --- Gift Overlay --- */
[data-theme="dark"] .gift-overlay {
    background: var(--color-bg, #06070a);
}
[data-theme="dark"] .gift-skip {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .gift-skip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* --- Form Inputs --- */
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* --- Scroll Progress --- */
[data-theme="dark"] .scroll-progress {
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

/* --- Tab item boxes --- */
[data-theme="dark"] .taa-input-box,
[data-theme="dark"] .taa-output-box {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .tap-node {
    background: var(--color-card);
}

[data-theme="dark"] .tap-pill {
    background: rgba(255, 255, 255, 0.02);
}

/* --- Product Num --- */
[data-theme="dark"] .product-num {
    color: rgba(99, 102, 241, 0.08);
}

/* --- Theme Color Meta --- */
[data-theme="dark"] { color-scheme: dark; }
