/* ==============================================
   СИСТЕМА ТЕМ ДЛЯ SMARTY
   ============================================== */

/* CSS-переменные для тем */
:root {
    /* Градиентная тема (текущая, по умолчанию) */
    --theme-gradient-bg: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #667eea 50%, #764ba2 75%, #667eea 100%);
    --theme-gradient-bg-size: 400% 400%;
    --theme-gradient-overlay: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
                              radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
                              radial-gradient(circle at 40% 20%, rgba(135, 206, 250, 0.2) 0%, transparent 50%);
    --theme-gradient-text: #ffffff;
    --theme-gradient-text-secondary: rgba(255, 255, 255, 0.8);
    --theme-gradient-sidebar: rgba(20, 20, 40, 0.9);
    --theme-gradient-card: rgba(255, 255, 255, 0.1);
    --theme-gradient-card-hover: rgba(255, 255, 255, 0.15);
    --theme-gradient-border: rgba(255, 255, 255, 0.1);
    --theme-gradient-accent: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    --theme-gradient-accent-hover: linear-gradient(135deg, rgba(102, 126, 234, 1), rgba(118, 75, 162, 1));
}

/* Тёмная тема */
[data-theme="dark"] {
    --theme-gradient-bg: #0a0a0f;
    --theme-gradient-bg-size: 100% 100%;
    --theme-gradient-overlay: none;
    --theme-gradient-text: #ffffff;
    --theme-gradient-text-secondary: rgba(255, 255, 255, 0.7);
    --theme-gradient-sidebar: rgba(15, 15, 20, 0.95);
    --theme-gradient-card: rgba(30, 30, 40, 0.8);
    --theme-gradient-card-hover: rgba(40, 40, 55, 0.9);
    --theme-gradient-border: rgba(255, 255, 255, 0.08);
    --theme-gradient-accent: linear-gradient(135deg, rgba(60, 60, 80, 0.9), rgba(80, 80, 100, 0.9));
    --theme-gradient-accent-hover: linear-gradient(135deg, rgba(70, 70, 90, 1), rgba(90, 90, 110, 1));
}

/* Светлая тема */
[data-theme="light"] {
    --theme-gradient-bg: #f5f5f7;
    --theme-gradient-bg-size: 100% 100%;
    --theme-gradient-overlay: none;
    --theme-gradient-text: #1a1a1a;
    --theme-gradient-text-secondary: rgba(26, 26, 26, 0.7);
    --theme-gradient-sidebar: rgba(255, 255, 255, 0.95);
    --theme-gradient-card: rgba(255, 255, 255, 0.9);
    --theme-gradient-card-hover: rgba(255, 255, 255, 1);
    --theme-gradient-border: rgba(0, 0, 0, 0.1);
    --theme-gradient-accent: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    --theme-gradient-accent-hover: linear-gradient(135deg, rgba(102, 126, 234, 1), rgba(118, 75, 162, 1));
}

/* Применение переменных к body */
body {
    background: var(--theme-gradient-bg);
    background-size: var(--theme-gradient-bg-size);
    color: var(--theme-gradient-text);
    transition: background 0.3s ease, color 0.3s ease;
}

body::before {
    background: var(--theme-gradient-overlay);
}

/* Отключаем анимацию градиента для тёмной и светлой темы */
[data-theme="dark"] body,
[data-theme="light"] body {
    animation: none !important;
}

[data-theme="dark"] body::before,
[data-theme="light"] body::before {
    animation: none !important;
}

/* Применение к основным элементам */
.sidebar {
    background: var(--theme-gradient-sidebar);
    border-right-color: var(--theme-gradient-border);
}

.chat-header {
    background: var(--theme-gradient-card);
    border-bottom-color: var(--theme-gradient-border);
}

.chat-header h1 {
    color: var(--theme-gradient-text);
}

/* Карточки и элементы */
.memory-section,
.user-card {
    background: var(--theme-gradient-card);
    border-color: var(--theme-gradient-border);
}

.memory-item:hover {
    background: var(--theme-gradient-card-hover);
}

/* Кнопки и акценты */
.new-chat-btn,
.login-btn,
.activatePromoBtn {
    background: var(--theme-gradient-accent);
}

.new-chat-btn:hover,
.login-btn:hover {
    background: var(--theme-gradient-accent-hover);
}

/* Текст - используем переменные для градиентной темы, переопределяем для других */
.memory-text,
.change-description,
.user-details p {
    color: var(--theme-gradient-text-secondary);
}

/* Убеждаемся, что все текстовые элементы используют правильные цвета */
body {
    color: var(--theme-gradient-text);
}

/* Переключатель тем */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--theme-gradient-card);
    border: 1px solid var(--theme-gradient-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--theme-gradient-text);
    font-size: 14px;
}

.theme-toggle:hover {
    background: var(--theme-gradient-card-hover);
    transform: translateY(-2px);
}

.theme-selector {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 4px;
    background: var(--theme-gradient-card, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.theme-option {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.theme-option:hover {
    transform: scale(1.1);
}

.theme-option.active {
    border-color: rgba(102, 126, 234, 0.8);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
    transform: scale(1.05);
}

/* Градиентная тема (иконка) */
.theme-option[data-theme="gradient"] {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Тёмная тема (иконка) */
.theme-option[data-theme="dark"] {
    background: #1a1a1a;
}

/* Светлая тема (иконка) */
.theme-option[data-theme="light"] {
    background: #f5f5f7;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

/* Стили для сообщений и пузырьков */
[data-theme="dark"] .message.user .bubble {
    background: linear-gradient(135deg, #2a2a3a, #3a3a4a);
    color: #ffffff;
}

[data-theme="dark"] .message.bot .bubble {
    background: linear-gradient(135deg, rgba(60, 60, 80, 0.9), rgba(80, 80, 100, 0.9));
    color: #ffffff;
}

[data-theme="light"] .message.user .bubble {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
}

[data-theme="light"] .message.bot .bubble {
    background: linear-gradient(135deg, rgba(240, 240, 250, 0.95), rgba(230, 230, 240, 0.95));
    color: #1a1a2e;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .typewriter-active::after {
    color: #1a1a2e;
}

/* Стили для input-container */
.input-container {
    background: var(--theme-gradient-card, rgba(255, 255, 255, 0.1)) !important;
    border-color: var(--theme-gradient-border, rgba(255, 255, 255, 0.2)) !important;
}

[data-theme="dark"] .input-container {
    background: var(--theme-gradient-card, rgba(30, 30, 40, 0.8)) !important;
    border-color: var(--theme-gradient-border, rgba(255, 255, 255, 0.08)) !important;
}

[data-theme="light"] .input-container {
    background: var(--theme-gradient-card, rgba(255, 255, 255, 0.9)) !important;
    border-color: var(--theme-gradient-border, rgba(0, 0, 0, 0.1)) !important;
}

.input-area {
    background: none !important;
    backdrop-filter: none !important;
    border-top: none !important;
}

[data-theme="dark"] .input-container input {
    color: var(--theme-gradient-text, #ffffff) !important;
}

[data-theme="light"] .input-container input {
    color: var(--theme-gradient-text, #1a1a1a) !important;
}

/* Стили для welcome-screen */
[data-theme="dark"] .welcome-screen {
    color: #ffffff;
}

[data-theme="light"] .welcome-screen {
    color: #1a1a1a;
}

/* Стили для chat-item */
[data-theme="dark"] .chat-item {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .chat-item {
    color: rgba(26, 26, 26, 0.8);
}

[data-theme="dark"] .chat-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .chat-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Стили для dashboard */
[data-theme="dark"] .memory-section,
[data-theme="dark"] .user-card {
    background: rgba(30, 30, 40, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] .memory-section,
[data-theme="light"] .user-card {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .memory-header h2,
[data-theme="dark"] .dashboard-header,
[data-theme="dark"] .dashboard-header h1 {
    color: #ffffff !important;
}

[data-theme="light"] .memory-header h2,
[data-theme="light"] .dashboard-header,
[data-theme="light"] .dashboard-header h1 {
    color: #1a1a1a !important;
}

[data-theme="dark"] .memory-text,
[data-theme="dark"] .change-description,
[data-theme="dark"] .user-details p {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .memory-text,
[data-theme="light"] .change-description,
[data-theme="light"] .user-details p {
    color: rgba(26, 26, 26, 0.7);
}

/* Стили для всех текстовых элементов */
[data-theme="dark"] .welcome-content h2,
[data-theme="dark"] .welcome-content p,
[data-theme="dark"] .suggestion-btn,
[data-theme="dark"] .chat-item-title,
[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .user-details h3,
[data-theme="dark"] .memory-header h2,
[data-theme="dark"] label {
    color: #ffffff;
}

[data-theme="light"] .welcome-content h2,
[data-theme="light"] .welcome-content p,
[data-theme="light"] .suggestion-btn,
[data-theme="light"] .chat-item-title,
[data-theme="light"] .dropdown-item,
[data-theme="light"] .user-details h3,
[data-theme="light"] .memory-header h2,
[data-theme="light"] label {
    color: #1a1a1a;
}

[data-theme="dark"] .welcome-content p,
[data-theme="dark"] .chat-item,
[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .user-details p {
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .welcome-content p,
[data-theme="light"] .chat-item,
[data-theme="light"] .dropdown-item,
[data-theme="light"] .user-details p {
    color: rgba(26, 26, 26, 0.8);
}

/* Стили для кнопок и элементов интерфейса */
[data-theme="dark"] .suggestion-btn {
    background: rgba(30, 30, 40, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .suggestion-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

[data-theme="dark"] .suggestion-btn:hover {
    background: rgba(40, 40, 55, 0.9);
}

[data-theme="light"] .suggestion-btn:hover {
    background: rgba(255, 255, 255, 1);
}

/* Стили для input и других элементов формы */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="range"],
[data-theme="dark"] textarea {
    color: #ffffff;
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="range"],
[data-theme="light"] textarea {
    color: #1a1a1a;
}

[data-theme="dark"] input[type="text"]::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] input[type="text"]::placeholder,
[data-theme="light"] textarea::placeholder {
    color: rgba(26, 26, 26, 0.5);
}

/* Стили для кнопок очистки */
[data-theme="dark"] .clear-memory-btn {
    background: rgba(255, 0, 0, 0.2);
    border-color: rgba(255, 0, 0, 0.4);
    color: #ff9a9a;
}

[data-theme="light"] .clear-memory-btn {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.3);
    color: #cc0000;
}

/* Стили для inline элементов в dashboard */
[data-theme="dark"] .dashboard-header,
[data-theme="dark"] .dashboard-header h1,
[data-theme="dark"] label,
[data-theme="dark"] span,
[data-theme="dark"] p {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .dashboard-header,
[data-theme="light"] .dashboard-header h1,
[data-theme="light"] label,
[data-theme="light"] span:not(.theme-option span),
[data-theme="light"] p {
    color: rgba(26, 26, 26, 0.9) !important;
}

[data-theme="dark"] .memory-section label,
[data-theme="dark"] .memory-section span,
[data-theme="dark"] .memory-section p {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .memory-section label,
[data-theme="light"] .memory-section span:not(.theme-option span),
[data-theme="light"] .memory-section p {
    color: rgba(26, 26, 26, 0.9) !important;
}

[data-theme="dark"] #speedValue {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] #speedValue {
    color: rgba(26, 26, 26, 0.9) !important;
}

/* Стили для input range */
[data-theme="dark"] input[type="range"] {
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] input[type="range"] {
    background: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] input[type="range"]::-webkit-slider-thumb {
    background: rgba(102, 126, 234, 0.8);
}

[data-theme="light"] input[type="range"]::-webkit-slider-thumb {
    background: rgba(102, 126, 234, 0.9);
}

/* Стили для input text в dashboard */
[data-theme="dark"] #promoCodeInput {
    background: rgba(30, 30, 40, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

[data-theme="light"] #promoCodeInput {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    color: #1a1a1a !important;
}

[data-theme="dark"] #promoCodeInput::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

[data-theme="light"] #promoCodeInput::placeholder {
    color: rgba(26, 26, 26, 0.5) !important;
}

/* Стили для кнопок "На главную" и "Профиль" */
[data-theme="dark"] .back-btn,
[data-theme="dark"] .back-link {
    background: rgba(30, 30, 40, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

[data-theme="light"] .back-btn,
[data-theme="light"] .back-link {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #1a1a1a !important;
}

[data-theme="dark"] .back-btn:hover,
[data-theme="dark"] .back-link:hover {
    background: rgba(40, 40, 55, 0.9) !important;
    color: #ffffff !important;
}

[data-theme="light"] .back-btn:hover,
[data-theme="light"] .back-link:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #1a1a1a !important;
}

/* Стили для кнопки "Профиль" в dropdown */
[data-theme="dark"] .user-menu-dropdown {
    background: rgba(30, 30, 40, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] .user-menu-dropdown {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="dark"] .dropdown-item {
    color: #ffffff !important;
}

[data-theme="light"] .dropdown-item {
    color: #1a1a1a !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.08) !important;
}

/* Стили для user-info-desktop (контейнер с профилем) */
[data-theme="dark"] .user-info-desktop {
    background: rgba(30, 30, 40, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] .user-info-desktop {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Стили для текста в user-info-desktop */
[data-theme="dark"] .user-info-desktop span,
[data-theme="dark"] .user-info-desktop,
[data-theme="dark"] .user-info-desktop a {
    color: #ffffff !important;
}

[data-theme="light"] .user-info-desktop span,
[data-theme="light"] .user-info-desktop,
[data-theme="light"] .user-info-desktop a {
    color: #1a1a1a !important;
}

/* Переопределяем inline стили для ссылок в user-info-desktop */
[data-theme="light"] .user-info-desktop a[href="/dashboard"] {
    color: #1a1a1a !important;
}

[data-theme="light"] .user-info-desktop a[href="/logout"] {
    color: #cc0000 !important;
}

/* Стили для всех страниц - общие текстовые элементы */
[data-theme="dark"] .changelog-container,
[data-theme="dark"] .premium-container,
[data-theme="dark"] .donate-container,
[data-theme="dark"] .admin-container,
[data-theme="dark"] .login-container {
    color: #ffffff;
}

[data-theme="light"] .changelog-container,
[data-theme="light"] .premium-container,
[data-theme="light"] .donate-container,
[data-theme="light"] .admin-container,
[data-theme="light"] .login-container {
    color: #1a1a1a;
}

/* Стили для заголовков на всех страницах */
[data-theme="dark"] .changelog-header h1,
[data-theme="dark"] .premium-header h1,
[data-theme="dark"] .donate-header h1,
[data-theme="dark"] .admin-header h1,
[data-theme="dark"] .login-header h1,
[data-theme="dark"] .update-version,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
    color: #ffffff !important;
}

[data-theme="light"] .changelog-header h1,
[data-theme="light"] .premium-header h1,
[data-theme="light"] .donate-header h1,
[data-theme="light"] .admin-header h1,
[data-theme="light"] .login-header h1,
[data-theme="light"] .update-version,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3 {
    color: #1a1a1a !important;
}

/* Стили для параграфов и текста */
[data-theme="dark"] .changelog-header p,
[data-theme="dark"] .premium-header p,
[data-theme="dark"] .donate-header p,
[data-theme="dark"] .admin-header p,
[data-theme="dark"] .login-header p,
[data-theme="dark"] .update-date,
[data-theme="dark"] p,
[data-theme="dark"] span:not(.theme-option span) {
    color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="light"] .changelog-header p,
[data-theme="light"] .premium-header p,
[data-theme="light"] .donate-header p,
[data-theme="light"] .admin-header p,
[data-theme="light"] .login-header p,
[data-theme="light"] .update-date,
[data-theme="light"] p,
[data-theme="light"] span:not(.theme-option span) {
    color: rgba(26, 26, 26, 0.8) !important;
}

/* Стили для карточек на всех страницах */
[data-theme="dark"] .update-item,
[data-theme="dark"] .premium-card,
[data-theme="dark"] .change-item,
[data-theme="dark"] .comparison-table,
[data-theme="dark"] .steps-list li {
    background: rgba(30, 30, 40, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .update-item,
[data-theme="light"] .premium-card,
[data-theme="light"] .change-item,
[data-theme="light"] .comparison-table,
[data-theme="light"] .steps-list li {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: rgba(26, 26, 26, 0.9) !important;
}

/* Стили для таблиц */
[data-theme="dark"] .comparison-table th,
[data-theme="dark"] .comparison-table td {
    color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] .comparison-table th,
[data-theme="light"] .comparison-table td {
    color: rgba(26, 26, 26, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Стили для кнопок CTA */
[data-theme="dark"] .cta-button,
[data-theme="dark"] .price-badge {
    color: #ffffff !important;
}

[data-theme="light"] .cta-button,
[data-theme="light"] .price-badge {
    color: #1a1a1a !important;
}

/* Стили для кнопок копирования и других элементов */
[data-theme="dark"] .copy-btn {
    background: rgba(30, 30, 40, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

[data-theme="light"] .copy-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #1a1a1a !important;
}

[data-theme="dark"] .copy-btn:hover {
    background: rgba(40, 40, 55, 0.9) !important;
}

[data-theme="light"] .copy-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
}

/* Стили для contact-link */
[data-theme="dark"] .contact-link {
    color: #a8c0ff !important;
}

[data-theme="light"] .contact-link {
    color: #667eea !important;
}

[data-theme="dark"] .contact-link:hover {
    color: #ffffff !important;
}

[data-theme="light"] .contact-link:hover {
    color: #764ba2 !important;
}

/* Стили для sidebar-toggle и menu-toggle */
[data-theme="dark"] .sidebar-toggle,
[data-theme="dark"] .menu-toggle {
    background: rgba(30, 30, 40, 0.8) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] .sidebar-toggle,
[data-theme="light"] .menu-toggle {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #1a1a1a !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .sidebar-toggle:hover,
[data-theme="dark"] .menu-toggle:hover {
    background: rgba(40, 40, 55, 0.9) !important;
}

[data-theme="light"] .sidebar-toggle:hover,
[data-theme="light"] .menu-toggle:hover {
    background: rgba(255, 255, 255, 1) !important;
}

/* Стили для donate-sidebar-btn */
[data-theme="dark"] .donate-sidebar-btn {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3)) !important;
    color: #ffffff !important;
}

[data-theme="light"] .donate-sidebar-btn {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15)) !important;
    color: #1a1a1a !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
}

[data-theme="dark"] .donate-sidebar-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4)) !important;
}

[data-theme="light"] .donate-sidebar-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.25)) !important;
}

/* Стили для sidebar-header и sidebar-footer границ */
[data-theme="dark"] .sidebar-header,
[data-theme="dark"] .sidebar-footer {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] .sidebar-header,
[data-theme="light"] .sidebar-footer {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Стили для scrollbar */
[data-theme="dark"] .chat-history::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="light"] .chat-history::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05) !important;
}

[data-theme="dark"] .chat-history::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6)) !important;
}

[data-theme="light"] .chat-history::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4)) !important;
}

/* Стили для changelog-badge (красный бейдж должен быть виден везде) */
[data-theme="dark"] .changelog-badge {
    border-color: #ffffff !important;
}

[data-theme="light"] .changelog-badge {
    border-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.6), 0 0 15px rgba(255, 107, 107, 0.4) !important;
}

/* Стили для inline элементов в index.html */
[data-theme="light"] .user-info-desktop span[style*="color:#fff"],
[data-theme="light"] .user-info-desktop a[style*="color:#fff"] {
    color: #1a1a1a !important;
}

/* Стили для кнопки "Перейти к чату" в welcome screen */
[data-theme="dark"] a[style*="background: linear-gradient"][style*="color: white"] {
    color: #ffffff !important;
}

[data-theme="light"] a[style*="background: linear-gradient"][style*="color: white"] {
    color: #ffffff !important; /* Градиентный фон, белый текст должен быть виден */
}

/* Стили для change-item и других элементов changelog */
[data-theme="dark"] .change-item .change-title,
[data-theme="dark"] .change-item .change-description {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .change-item .change-title,
[data-theme="light"] .change-item .change-description {
    color: rgba(26, 26, 26, 0.9) !important;
}

/* Стили для thank-you сообщений */
[data-theme="dark"] .thank-you {
    background: rgba(76, 175, 80, 0.2) !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .thank-you {
    background: rgba(76, 175, 80, 0.1) !important;
    border-color: rgba(76, 175, 80, 0.2) !important;
    color: rgba(26, 26, 26, 0.9) !important;
}

/* Стили для detail-label и detail-value */
[data-theme="dark"] .detail-label,
[data-theme="dark"] .detail-value {
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .detail-label,
[data-theme="light"] .detail-value {
    color: rgba(26, 26, 26, 0.9) !important;
}

/* Специальные стили для premium.html */
[data-theme="light"] .premium-header h1 {
    -webkit-text-fill-color: #667eea !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

[data-theme="light"] .premium-card {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .premium-card h2,
[data-theme="light"] .features-list li,
[data-theme="light"] .steps-list li {
    color: rgba(26, 26, 26, 0.9) !important;
}

[data-theme="light"] .features-list li {
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .steps-list li {
    background: rgba(255, 255, 255, 0.8) !important;
    border-left-color: rgba(102, 126, 234, 0.6) !important;
}

[data-theme="light"] .comparison-table th,
[data-theme="light"] .comparison-table td {
    color: rgba(26, 26, 26, 0.9) !important;
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .comparison-table th {
    background: rgba(102, 126, 234, 0.1) !important;
    color: #1a1a1a !important;
}

[data-theme="light"] .contact-info {
    background: rgba(102, 126, 234, 0.08) !important;
    border-color: rgba(102, 126, 234, 0.2) !important;
}

[data-theme="light"] .contact-info h3,
[data-theme="light"] .contact-info p {
    color: rgba(26, 26, 26, 0.9) !important;
}

[data-theme="light"] .contact-link {
    color: #667eea !important;
}

[data-theme="light"] .contact-link:hover {
    color: #764ba2 !important;
}

[data-theme="light"] .price-badge {
    color: #1a1a1a !important;
}

[data-theme="light"] .steps-list li::before {
    color: #ffffff !important; /* Градиентный фон, белый текст виден */
}

/* Адаптивность для переключателя тем */
@media (max-width: 768px) {
    .theme-selector {
        gap: 4px;
        padding: 3px;
    }
    
    .theme-option {
        width: 24px;
        height: 24px;
    }
}

