/* Theme Switcher Styles */
:root {
    /* Light Theme (Default) - Enhanced with modern color palette */
    --bg-primary: linear-gradient(135deg, #f0f7ff 0%, #e1ecf6 25%, #f1f5f9 50%, #f8fdff 100%);
    --bg-overlay: radial-gradient(circle at 20% 20%, rgba(79, 172, 254, 0.05) 0%, transparent 50%),
                 radial-gradient(circle at 80% 80%, rgba(0, 231, 169, 0.05) 0%, transparent 50%),
                 radial-gradient(circle at 40% 60%, rgba(102, 126, 234, 0.05) 0%, transparent 50%);
    --text-color: #2d3748;
    --text-secondary: #4a5568;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 5px 10px rgba(0, 0, 0, 0.02);
    --nav-bg: linear-gradient(135deg, rgba(56, 189, 248, 0.9) 0%, rgba(59, 130, 246, 0.9) 50%, rgba(99, 102, 241, 0.9) 100%);
    --nav-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(59, 130, 246, 0.15);
    --nav-text: #ffffff;
    --nav-link-hover: #ffffff;
    --input-bg: rgba(255, 255, 255, 0.95);
    --input-border: 1px solid rgba(203, 213, 225, 0.8);
    --input-focus-border: 1px solid rgba(59, 130, 246, 0.5);
    --input-text: #1e293b;
    --input-placeholder: #94a3b8;
    --btn-primary-bg: #3b82f6;
    --btn-primary-color: white;
    --btn-hover-bg: #2563eb;
    --btn-secondary-bg: #f1f5f9;
    --btn-secondary-color: #334155;
    --btn-secondary-hover: #e2e8f0;
    --highlight-color: #3b82f6;
    --message-user-bg: #e9ecef;
    --message-bot-bg: #f8f9fa;
    --footer-bg: #f8fafc;
    --footer-text: #334155;
    --footer-link: #3b82f6;
    --footer-link-hover: #2563eb;
    --chat-widget-bg: rgba(255, 255, 255, 0.98);
    --chat-widget-header: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --chat-widget-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --offer-card-hover-bg: rgba(255, 255, 255, 1);
    --offer-badge-bg: rgba(59, 130, 246, 0.1);
    --offer-badge-text: #2563eb;
    --section-divider: rgba(226, 232, 240, 0.8);
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-thumb-hover: #94a3b8;
    --coupon-code-bg: rgba(59, 130, 246, 0.1);
    --coupon-code-text: #2563eb;
    --notification-success-bg: #10b981;
    --notification-error-bg: #ef4444;
    --modal-backdrop: rgba(15, 23, 42, 0.5);
    --modal-bg: white;
}

[data-theme="dark"] {
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --bg-overlay: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.03) 0%, transparent 50%),
                 radial-gradient(circle at 80% 80%, rgba(79, 70, 229, 0.03) 0%, transparent 50%),
                 radial-gradient(circle at 40% 60%, rgba(45, 212, 191, 0.03) 0%, transparent 50%);
    --text-color: #f1f5f9;
    --text-secondary: #cbd5e1;
    --card-bg: rgba(30, 41, 59, 0.97);
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.1);
    --nav-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(79, 70, 229, 0.9) 100%);
    --nav-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
    --nav-text: #f8fafc;
    --nav-link-hover: #e0f2fe;
    --input-bg: rgba(30, 41, 59, 0.9);
    --input-border: 1px solid rgba(255, 255, 255, 0.1);
    --input-focus-border: 1px solid rgba(59, 130, 246, 0.5);
    --input-text: #f1f5f9;
    --input-placeholder: #94a3b8;
    --btn-primary-bg: #3b82f6;
    --btn-primary-color: white;
    --btn-hover-bg: #2563eb;
    --btn-secondary-bg: #334155;
    --btn-secondary-color: #f1f5f9;
    --btn-secondary-hover: #475569;
    --highlight-color: #60a5fa;
    --message-user-bg: #334155;
    --message-bot-bg: #1e293b;
    --footer-bg: #0f172a;
    --footer-text: #cbd5e1;
    --footer-link: #60a5fa;
    --footer-link-hover: #93c5fd;
    --chat-widget-bg: rgba(30, 41, 59, 0.97);
    --chat-widget-header: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --chat-widget-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --offer-card-hover-bg: rgba(30, 41, 59, 1);
    --offer-badge-bg: rgba(59, 130, 246, 0.2);
    --offer-badge-text: #60a5fa;
    --section-divider: rgba(255, 255, 255, 0.1);
    --scrollbar-track: #1e293b;
    --scrollbar-thumb: #475569;
    --scrollbar-thumb-hover: #64748b;
    --coupon-code-bg: rgba(59, 130, 246, 0.2);
    --coupon-code-text: #93c5fd;
    --notification-success-bg: #059669;
    --notification-error-bg: #dc2626;
    --modal-backdrop: rgba(0, 0, 0, 0.7);
    --modal-bg: #1e293b;
}

[data-theme="dark-alt"] {
    --text-color: #e2e8f0;
    --text-secondary: #cbd5e1;
    --card-bg: rgba(30, 41, 59, 0.95);
    --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --nav-bg: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    --nav-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
    --input-bg: rgba(30, 41, 59, 0.8);
    --input-border: 1px solid rgba(255, 255, 255, 0.1);
    --input-focus-border: 1px solid rgba(102, 126, 234, 0.5);
    --btn-primary-bg: #6366f1;
    --btn-primary-color: white;
    --btn-hover-bg: #4f46e5;
    --highlight-color: #818cf8;
    --message-user-bg: #334155;
    --message-bot-bg: #1e293b;
    --footer-bg: #1e293b;
    --footer-text: #cbd5e1;
}

[data-theme="night"] {
    --bg-primary: linear-gradient(135deg, #000000 0%, #020617 50%, #000000 100%);
    --bg-overlay: radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
                 radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
                 radial-gradient(circle at 40% 60%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
    --text-color: #f8fafc;
    --text-secondary: #94a3b8;
    --card-bg: rgba(15, 23, 42, 0.97);
    --card-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 5px 10px rgba(0, 0, 0, 0.2);
    --nav-bg: linear-gradient(135deg, rgba(124, 58, 237, 0.9) 0%, rgba(99, 102, 241, 0.9) 100%);
    --nav-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
    --nav-text: #f8fafc;
    --nav-link-hover: #ddd6fe;
    --input-bg: rgba(15, 23, 42, 0.9);
    --input-border: 1px solid rgba(255, 255, 255, 0.1);
    --input-focus-border: 1px solid rgba(139, 92, 246, 0.5);
    --input-text: #f8fafc;
    --input-placeholder: #94a3b8;
    --btn-primary-bg: #8b5cf6;
    --btn-primary-color: white;
    --btn-hover-bg: #7c3aed;
    --btn-secondary-bg: #1e293b;
    --btn-secondary-color: #f8fafc;
    --btn-secondary-hover: #334155;
    --highlight-color: #a78bfa;
    --message-user-bg: #1e293b;
    --message-bot-bg: #0f172a;
    --footer-bg: #020617;
    --footer-text: #94a3b8;
    --footer-link: #a78bfa;
}

/* Off-White Theme - Clean and minimal */
[data-theme="off-white"] {
    --bg-primary: linear-gradient(135deg, #f7f7f7 0%, #f0f0f0 50%, #f5f5f5 100%);
    --bg-overlay: radial-gradient(circle at 20% 20%, rgba(241, 241, 241, 0.5) 0%, transparent 50%),
                 radial-gradient(circle at 80% 80%, rgba(236, 236, 236, 0.5) 0%, transparent 50%),
                 radial-gradient(circle at 40% 60%, rgba(246, 246, 246, 0.5) 0%, transparent 50%);
    --text-color: #333333;
    --text-secondary: #555555;
    --card-bg: rgba(252, 252, 252, 0.95);
    --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.03), 0 3px 8px rgba(0, 0, 0, 0.01);
    --nav-bg: linear-gradient(135deg, rgba(250, 250, 250, 0.95) 0%, rgba(245, 245, 245, 0.95) 100%);
    --nav-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --nav-text: #333333;
    --nav-link-hover: #111111;
    --input-bg: rgba(255, 255, 255, 0.95);
    --input-border: 1px solid rgba(200, 200, 200, 0.8);
    --input-focus-border: 1px solid rgba(150, 150, 150, 0.5);
    --input-text: #333333;
    --input-placeholder: #999999;
    --btn-primary-bg: #666666;
    --btn-primary-color: white;
    --btn-hover-bg: #444444;
    --btn-secondary-bg: #eeeeee;
    --btn-secondary-color: #333333;
    --btn-secondary-hover: #dddddd;
    --highlight-color: #666666;
    --message-user-bg: #f0f0f0;
    --message-bot-bg: #f9f9f9;
    --footer-bg: #f5f5f5;
    --footer-text: #444444;
    --footer-link: #666666;
    --footer-link-hover: #444444;
    --chat-widget-bg: rgba(252, 252, 252, 0.98);
    --chat-widget-header: linear-gradient(135deg, #777777 0%, #555555 100%);
    --chat-widget-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    --offer-card-hover-bg: rgba(255, 255, 255, 1);
    --offer-badge-bg: rgba(150, 150, 150, 0.1);
    --offer-badge-text: #555555;
    --section-divider: rgba(220, 220, 220, 0.8);
    --scrollbar-track: #f5f5f5;
    --scrollbar-thumb: #dddddd;
    --scrollbar-thumb-hover: #bbbbbb;
    --coupon-code-bg: rgba(150, 150, 150, 0.1);
    --coupon-code-text: #555555;
    --notification-success-bg: #777777;
    --notification-error-bg: #999999;
    --modal-backdrop: rgba(50, 50, 50, 0.5);
    --modal-bg: #fcfcfc;
}

[data-theme="night"] {
    --footer-link-hover: #c4b5fd;
    --chat-widget-bg: rgba(15, 23, 42, 0.97);
    --chat-widget-header: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --chat-widget-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    --offer-card-hover-bg: rgba(15, 23, 42, 1);
    --offer-badge-bg: rgba(139, 92, 246, 0.2);
    --offer-badge-text: #a78bfa;
    --section-divider: rgba(255, 255, 255, 0.1);
    --scrollbar-track: #0f172a;
    --scrollbar-thumb: #334155;
    --scrollbar-thumb-hover: #475569;
    --coupon-code-bg: rgba(139, 92, 246, 0.2);
    --coupon-code-text: #c4b5fd;
    --notification-success-bg: #059669;
    --notification-error-bg: #dc2626;
    --modal-backdrop: rgba(0, 0, 0, 0.8);
    --modal-bg: #0f172a;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
    margin: 0 15px;
}

.theme-selector {
    display: flex;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px;
    gap: 5px;
}

.theme-btn {
    border: none;
    background: transparent;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.theme-btn.active {
    background: white;
    color: var(--highlight-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Apply theme variables to elements */
body {
    background: var(--bg-primary);
    color: var(--text-color);
    transition: background 0.3s ease, color 0.3s ease;
}

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

/* Update other elements */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
}

.card, .offer-card {
    background: var(--card-bg);
    box-shadow: var(--card-shadow);
}

input, textarea, select {
    background: var(--input-bg);
    border: var(--input-border);
    color: var(--text-color);
}

input:focus, textarea:focus, select:focus {
    border: var(--input-focus-border);
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
}

.btn-primary:hover {
    background: var(--btn-hover-bg);
}

/* Chat message styling */
.user-message .message-bubble {
    background: var(--message-user-bg);
    color: var(--text-color);
}

.bot-message .message-bubble {
    background: var(--message-bot-bg);
    color: var(--text-color);
}
