/**
 * PlayXtion Theme System
 * Dark & Light mode variables and utilities
 */

/* ===================================
   DARK THEME (Default)
   =================================== */
:root,
[data-theme="dark"] {
    /* Primary Colors */
    --primary: #8B5CF6;
    --primary-light: #A78BFA;
    --primary-dark: #7C3AED;

    /* Accent Colors */
    --accent: #06B6D4;
    --neon-purple: #C084FC;
    --neon-blue: #22D3EE;
    --neon-pink: #F472B6;

    /* Status Colors */
    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.15);
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.15);
    --error: #EF4444;
    --error-light: rgba(239, 68, 68, 0.15);

    /* Backgrounds */
    --bg-primary: #030014;
    --bg-secondary: #0A0A1B;
    --bg-card: rgba(15, 15, 35, 0.8);
    --bg-glass: rgba(139, 92, 246, 0.05);
    --bg-input: rgba(255, 255, 255, 0.03);

    /* Text */
    --text: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    /* Borders */
    --border: rgba(139, 92, 246, 0.2);
    --border-glow: rgba(139, 92, 246, 0.5);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 4px 20px rgba(139, 92, 246, 0.4);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-bg: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
}

/* ===================================
   LIGHT THEME
   =================================== */
[data-theme="light"] {
    /* Primary Colors - same but adjusted */
    --primary: #7C3AED;
    --primary-light: #8B5CF6;
    --primary-dark: #6D28D9;

    /* Accent Colors */
    --accent: #0891B2;
    --neon-purple: #A855F7;
    --neon-blue: #06B6D4;
    --neon-pink: #EC4899;

    /* Status Colors */
    --success: #059669;
    --success-light: rgba(5, 150, 105, 0.1);
    --warning: #D97706;
    --warning-light: rgba(217, 119, 6, 0.1);
    --error: #DC2626;
    --error-light: rgba(220, 38, 38, 0.1);

    /* Backgrounds */
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(139, 92, 246, 0.05);
    --bg-input: rgba(0, 0, 0, 0.02);

    /* Text */
    --text: #1E1B4B;
    --text-secondary: rgba(30, 27, 75, 0.7);
    --text-muted: rgba(30, 27, 75, 0.5);

    /* Borders */
    --border: rgba(139, 92, 246, 0.15);
    --border-glow: rgba(139, 92, 246, 0.3);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(139, 92, 246, 0.08);
    --shadow-md: 0 8px 24px rgba(139, 92, 246, 0.12);
    --shadow-lg: 0 16px 48px rgba(139, 92, 246, 0.15);
    --shadow-primary: 0 4px 20px rgba(139, 92, 246, 0.25);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-bg: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

/* ===================================
   THEME TOGGLE BUTTON
   =================================== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary-light);
    background: rgba(139, 92, 246, 0.1);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

/* ===================================
   LIGHT THEME SPECIFIC OVERRIDES
   =================================== */

/* Background animation adjustments */
[data-theme="light"] .bg-gradient {
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 40% 80%, rgba(244, 114, 182, 0.04) 0%, transparent 50%);
}

[data-theme="light"] .floating-orb {
    opacity: 0.3;
}

[data-theme="light"] .grid-overlay {
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.04) 1px, transparent 1px);
}

/* Cards */
[data-theme="light"] .card,
[data-theme="light"] .auth-card,
[data-theme="light"] .pricing-card,
[data-theme="light"] .feature-card,
[data-theme="light"] .sport-card {
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
}

/* Buttons */
[data-theme="light"] .btn-primary {
    box-shadow: var(--shadow-primary);
}

[data-theme="light"] .btn-ghost {
    color: var(--text-secondary);
    border-color: var(--border);
}

[data-theme="light"] .btn-ghost:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: var(--primary);
}

/* Inputs */
[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

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

/* Header */
[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
}

[data-theme="light"] .header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

/* Logo text adjustments */
[data-theme="light"] .logo-text .play {
    background: linear-gradient(135deg, var(--text) 0%, rgba(30, 27, 75, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation */
[data-theme="light"] .nav a:hover,
[data-theme="light"] .header-nav a:hover {
    color: var(--primary);
}

/* Pricing cards */
[data-theme="light"] .pricing-card.featured {
    background: white;
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.15);
}

/* Badges */
[data-theme="light"] .section-badge,
[data-theme="light"] .pricing-badge {
    background: rgba(139, 92, 246, 0.1);
}

/* Footer */
[data-theme="light"] .footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.5);
}

/* ===================================
   TRANSITIONS
   =================================== */
body,
.header,
.card,
.btn,
.form-input,
.form-select,
.form-textarea {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
