/* Universal Light Theme Override for all pages */

body.light-theme {
    --bg: #f9f8f3;
    --surface: #ffffff;
    --accent: #1a1a1a;
    --gold: #c49b33;
    --border: rgba(26, 26, 26, 0.12);
    --text-muted: rgba(26, 26, 26, 0.6);
    --hover: rgba(26, 26, 26, 0.05);
    --card-bg: rgba(26, 26, 26, 0.03);
}

/* Logo filter for light theme */
body.light-theme .logo img {
    filter: brightness(0) saturate(100%);
}

/* Panel images brightness adjustment */
body.light-theme .panel-img {
    opacity: 0.95;
}

/* Category badges in light theme */
body.light-theme .category-badge {
    background: var(--gold);
    color: var(--bg);
}

/* Swarm loader in light theme */
body.light-theme .molecule {
    background: var(--gold);
}

/* Message bubbles in light theme */
body.light-theme .message-bubble.user {
    background: var(--gold);
    color: var(--bg);
}

body.light-theme .message-bubble.ai {
    background: var(--surface);
    color: var(--accent);
    border: 1px solid var(--border);
}

/* Mobile feed tabs in light theme */
body.light-theme .mobile-feed-tab {
    background: rgba(249, 248, 243, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
}

body.light-theme .mobile-feed-tab.active::before {
    background: var(--gold);
}

body.light-theme .mobile-feed-tab.active span {
    color: var(--bg);
}

/* Loading screen in light theme */
body.light-theme .loading-screen {
    background: var(--bg);
}

body.light-theme .loading-logo img {
    filter: brightness(0) saturate(100%);
}

body.light-theme .loading-text {
    color: var(--accent);
}

body.light-theme .loading-progress {
    background: var(--gold);
}

/* Preferences modal in light theme */
body.light-theme .preferences-modal,
body.light-theme .profile-modal,
body.light-theme .mobile-menu {
    background: var(--bg);
}

/* Empty state in light theme */
body.light-theme .empty-icon {
    opacity: 0.5;
}

/* History items in light theme */
body.light-theme .history-item {
    background: var(--surface);
    border: 1px solid var(--border);
}

body.light-theme .history-item:hover {
    background: var(--hover);
    border-color: var(--gold);
}

body.light-theme .history-item.active {
    background: rgba(196, 155, 51, 0.1);
    border-color: var(--gold);
}

/* Input wrapper in light theme */
body.light-theme .input-wrapper {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
}

body.light-theme .input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--gold);
    box-shadow: 0 8px 32px rgba(196, 155, 51, 0.15);
}

body.light-theme .input-wrapper input::placeholder {
    color: var(--text-muted);
}

/* Send button in light theme */
body.light-theme .send-btn {
    background: var(--gold);
}

body.light-theme .send-btn img {
    filter: brightness(0);
}

/* New chat button in light theme */
body.light-theme .new-chat-btn {
    background: var(--gold);
    color: var(--bg);
    box-shadow: 0 4px 12px rgba(196, 155, 51, 0.3);
}

/* === SETTINGS PAGE SPECIFIC === */

/* Header in light theme */
body.light-theme header {
    background: var(--bg);
    border-bottom-color: var(--border);
}

/* Mobile menu button */
body.light-theme .mobile-menu-btn span {
    background: var(--accent);
}

/* Theme preview adjustments for active state */
body.light-theme .theme-option.active .dark-preview {
    opacity: 0.8;
}

body.light-theme .theme-option.active .light-preview {
    opacity: 1;
}

/* Settings sections in light theme */
body.light-theme .settings-section {
    background: var(--surface);
    border-color: var(--border);
}

body.light-theme .settings-section:hover {
    background: var(--hover);
    border-color: var(--gold);
}

/* Section icons */
body.light-theme .section-icon {
    background: var(--hover);
    border-color: var(--border);
}

/* Setting items */
body.light-theme .setting-item {
    background: var(--hover);
}

body.light-theme .setting-item:hover {
    background: var(--surface);
}

/* Theme options */
body.light-theme .theme-option {
    background: var(--hover);
    border-color: var(--border);
}

body.light-theme .theme-option:hover {
    border-color: var(--gold);
}

body.light-theme .theme-option.active {
    background: var(--gold);
    border-color: var(--gold);
}

/* Toggle slider */
body.light-theme .toggle-slider {
    background: var(--border);
}

body.light-theme .toggle-slider:before {
    background: var(--accent);
}

body.light-theme input:checked + .toggle-slider {
    background: var(--gold);
}

body.light-theme input:checked + .toggle-slider:before {
    background: var(--bg);
}

/* Speed slider */
body.light-theme .speed-slider {
    background: var(--border);
}

body.light-theme .speed-slider::-webkit-slider-thumb {
    background: var(--gold);
}

body.light-theme .speed-slider::-moz-range-thumb {
    background: var(--gold);
}

/* Toast notifications */
body.light-theme .toast-notification {
    background: var(--surface);
    color: var(--accent);
    border-color: var(--border);
}

/* Profile button */
body.light-theme .profile-btn {
    border-color: var(--accent);
    color: var(--accent);
}

body.light-theme .profile-btn:hover {
    background: var(--accent);
    color: var(--bg);
}

/* User avatar */
body.light-theme .user-avatar {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--border);
}

body.light-theme .user-avatar:hover {
    border-color: var(--gold);
}

/* Navigation links */
body.light-theme .nav-link {
    color: var(--accent);
}

body.light-theme .nav-link.active {
    color: var(--gold);
}

body.light-theme .nav-link::after {
    background: var(--gold);
}

/* Mobile navigation */
body.light-theme .mobile-nav-link {
    color: var(--accent);
    border-bottom-color: var(--border);
}

body.light-theme .mobile-nav-link.active {
    color: var(--gold);
}

/* Profile signout button */
body.light-theme .profile-signout {
    background: var(--accent);
    color: var(--bg);
}

/* Overlays */
body.light-theme .mobile-menu-overlay,
body.light-theme .profile-modal-overlay {
    background: rgba(26, 26, 26, 0.3);
}

/* === NEWS PANELS TEXT === */
/* ВАЖНО: Текст на карточках новостей ВСЕГДА белый для читаемости */
body.light-theme .title,
body.light-theme .content p {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Category badges остаются цветными */
body.light-theme .category-badge {
    background: var(--gold);
    color: var(--bg);
}

/* Read more button */
body.light-theme .read-more-btn {
    background: var(--gold);
    color: var(--bg);
}
