/* GABEN.INFO — dark (default) / light theme tokens */
:root,
[data-theme="dark"] {
    --bg-page: #0a0b1b;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-elevated: rgba(20, 20, 40, 0.98);
    --bg-video: #000000;
    --bg-hover: rgba(255, 255, 255, 0.1);
    --bg-hover-strong: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-on-accent: #000000;
    --accent: #ffd700;
    --accent-hover-text: #ffffff;
    --border: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(255, 165, 0, 0.2);
    --header-bg: rgba(2, 3, 20, 0.95);
    --header-bg-mobile: rgba(2, 3, 20, 0.98);
    --nav-mobile-bg: rgba(2, 3, 20, 0.98);
    --link: #4a9eff;
    --shadow-sm: rgba(0, 0, 0, 0.1);
    --shadow-md: rgba(0, 0, 0, 0.2);
    --shadow-lg: rgba(0, 0, 0, 0.4);
    --overlay: rgba(0, 0, 0, 0.9);
    --overlay-strong: rgba(0, 0, 0, 0.95);
    --handle: rgba(255, 255, 255, 0.25);
    --error-bg: rgba(255, 0, 0, 0.1);
    --error-border: rgba(255, 0, 0, 0.3);
    --accent-soft: rgba(255, 215, 0, 0.15);
    --accent-shadow: rgba(208, 137, 7, 0.3);
    --accent-shadow-hover: rgba(208, 137, 7, 0.5);
    --btn-spinner: #ffffff;

    /* legacy aliases used in some inline blocks */
    --background: var(--bg-video);
    --foreground: var(--text-primary);
    --muted: var(--text-muted);
    --primary: var(--accent);
    --border-color: var(--border);
}

[data-theme="light"] {
    --bg-page: #f4f6fb;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --bg-video: #0a0b1b;
    --bg-hover: rgba(20, 24, 40, 0.06);
    --bg-hover-strong: rgba(20, 24, 40, 0.1);
    --text-primary: #141828;
    --text-muted: #5c6378;
    --text-on-accent: #141828;
    --accent: #c9a000;
    --accent-hover-text: #141828;
    --border: #dde1ea;
    --border-accent: rgba(201, 160, 0, 0.25);
    /* шапка остаётся тёмной и в light-теме */
    --header-bg: rgba(2, 3, 20, 0.95);
    --header-bg-mobile: rgba(2, 3, 20, 0.98);
    --nav-mobile-bg: rgba(2, 3, 20, 0.98);
    --link: #2563eb;
    --shadow-sm: rgba(20, 24, 40, 0.06);
    --shadow-md: rgba(20, 24, 40, 0.1);
    --shadow-lg: rgba(20, 24, 40, 0.14);
    --overlay: rgba(20, 24, 40, 0.75);
    --overlay-strong: rgba(20, 24, 40, 0.88);
    --handle: rgba(20, 24, 40, 0.2);
    --error-bg: rgba(220, 38, 38, 0.08);
    --error-border: rgba(220, 38, 38, 0.25);
    --accent-soft: rgba(201, 160, 0, 0.12);
    --accent-shadow: rgba(201, 160, 0, 0.2);
    --accent-shadow-hover: rgba(201, 160, 0, 0.35);
    --btn-spinner: #141828;
}

[data-theme="light"] .share-btn:hover {
    color: var(--accent-hover-text);
}

[data-theme="light"] .pagination strong {
    color: var(--text-on-accent);
}

[data-theme="light"] .share-item:nth-of-type(8):hover {
    background: rgba(20, 24, 40, 0.08);
}

[data-theme="light"] .share-close-btn {
    color: var(--text-muted);
}

[data-theme="light"] .share-close-btn:hover {
    color: var(--text-primary);
}

[data-theme="light"] .shorts-modal,
[data-theme="light"] .shorts-modal-overlay {
    background: var(--overlay-strong);
}

[data-theme="light"] .stats,
[data-theme="light"] .loading,
[data-theme="light"] .no-more-news {
    color: var(--text-muted);
}

[data-theme="light"] .search-wrapper {
    background: var(--bg-surface);
    box-shadow: 0 2px 12px var(--shadow-sm);
}

[data-theme="light"] .search-wrapper:focus-within {
    background: var(--bg-surface);
    box-shadow: 0 5px 20px var(--accent-shadow);
}

[data-theme="light"] .search-input-main,
[data-theme="light"] .search-input-main::placeholder {
    color: var(--text-muted);
}

[data-theme="light"] .search-input-main {
    color: var(--text-primary);
}

[data-theme="light"] .nav-links {
    background: var(--nav-mobile-bg);
    box-shadow: 0 5px 20px var(--shadow-md);
}

[data-theme="light"] .news-item {
    box-shadow: 0 4px 15px var(--shadow-sm);
}

[data-theme="light"] .news-item:hover {
    box-shadow: 0 8px 25px var(--shadow-md);
}

[data-theme="light"] .share-menu {
    background: var(--bg-elevated);
    border-color: var(--border);
    box-shadow: 0 10px 40px var(--shadow-lg);
}

[data-theme="light"] .share-item,
[data-theme="light"] .share-item span {
    color: var(--text-primary);
}

[data-theme="light"] .share-item:hover {
    color: var(--accent);
}

/* Шапка — всегда тёмная, даже в light-теме */
[data-theme="light"] .header {
    background: rgba(2, 3, 20, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .header .menu-button {
    color: #ffffff;
}

[data-theme="light"] .header .nav-lang-dropdown .share-btn,
[data-theme="light"] .header .theme-toggle-btn {
    color: #ffd700;
    border-color: #ffd700;
}

[data-theme="light"] .header .nav-lang-dropdown .share-btn::before,
[data-theme="light"] .header .theme-toggle-btn::before {
    background: #ffd700;
}

[data-theme="light"] .header .nav-lang-dropdown .share-btn:hover,
[data-theme="light"] .header .theme-toggle-btn:hover {
    color: #ffffff;
}

[data-theme="light"] .header .nav-lang-dropdown .lang-menu {
    background: rgba(20, 20, 40, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .header .lang-item {
    color: #ffffff;
}

[data-theme="light"] .header .lang-item:hover,
[data-theme="light"] .header .lang-item.active {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
}

[data-theme="light"] .header .nav-links {
    background: rgba(2, 3, 20, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .shorts-modal-content,
[data-theme="light"] .related-post-card,
[data-theme="light"] .article-container {
    background: var(--bg-surface);
    border-color: var(--border);
}

[data-theme="light"] .page-subtitle,
[data-theme="light"] .news-date,
[data-theme="light"] .author-name {
    color: var(--text-muted);
}

[data-theme="light"] .author-name {
    color: var(--link);
}

/* Video overlays — icons stay light on dark video */
[data-theme="light"] .shorts-play-icon,
[data-theme="light"] .news-play-icon,
[data-theme="light"] .shorts-video-controls,
[data-theme="light"] .news-video-controls,
[data-theme="light"] .video-progress-wrap,
[data-theme="light"] .shorts-modal .shorts-control-btn,
[data-theme="light"] .carousel-counter,
[data-theme="light"] .slider-counter {
    color: #ffffff;
}

[data-theme="light"] .shorts-video-controls svg,
[data-theme="light"] .news-video-controls svg,
[data-theme="light"] .shorts-modal .shorts-control-btn svg {
    fill: #ffffff;
}
