/* ========================================
   LottoPredictor 4D - Theme Variations
   ======================================== */

/* Theme CSS Variables */
:root {
    --theme-primary: #00cec9;
    --theme-secondary: #6c5ce7;
}

/* ========================================
   Neon Theme (Default)
   ======================================== */
body.theme-neon {
    --theme-primary: #00cec9;
    --theme-secondary: #6c5ce7;
}

body.theme-neon .number-ball {
    background: linear-gradient(135deg, #00cec9, #6c5ce7);
    box-shadow: 
        0 4px 15px rgba(0, 206, 201, 0.4),
        0 0 25px rgba(108, 92, 231, 0.3);
}

body.theme-neon .button-4d {
    background: linear-gradient(135deg, #00cec9, #6c5ce7);
    border-color: #00cec9;
}

body.theme-neon .lottery-card.active {
    border-color: #00cec9;
    box-shadow: 0 0 20px rgba(0, 206, 201, 0.4);
}

/* ========================================
   Quantum Theme
   ======================================== */
body.theme-quantum {
    --theme-primary: #6366f1;
    --theme-secondary: #a855f7;
}

body.theme-quantum .number-ball {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    box-shadow: 
        0 4px 15px rgba(99, 102, 241, 0.4),
        0 0 25px rgba(168, 85, 247, 0.3);
}

body.theme-quantum .button-4d {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-color: #6366f1;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

body.theme-quantum .lottery-card.active {
    border-color: #6366f1;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* ========================================
   Holographic Theme
   ======================================== */
body.theme-holographic {
    --theme-primary: #ff6b6b;
    --theme-secondary: #48dbfb;
}

body.theme-holographic .number-ball {
    background: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb);
    background-size: 200% 200%;
    animation: ball-appear 0.5s ease backwards, holographic-ball 3s ease infinite;
    box-shadow: 
        0 4px 15px rgba(255, 107, 107, 0.4),
        0 0 25px rgba(72, 219, 251, 0.3);
}

@keyframes holographic-ball {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

body.theme-holographic .button-4d {
    background: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 300% 300%;
    border-color: #ff6b6b;
    animation: hologram 3s ease infinite;
}

body.theme-holographic .lottery-card.active {
    border-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(72, 219, 251, 0.1));
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

/* ========================================
   Gold Theme
   ======================================== */
body.theme-gold {
    --theme-primary: #f59e0b;
    --theme-secondary: #fbbf24;
}

body.theme-gold .number-ball {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    box-shadow: 
        0 4px 15px rgba(245, 158, 11, 0.5),
        0 0 25px rgba(251, 191, 36, 0.3);
}

body.theme-gold .button-4d {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-color: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
    animation: none;
}

body.theme-gold .lottery-card.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

body.theme-gold .nav-item.active {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* ========================================
   Light Theme
   ======================================== */
body.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #e2e8f0;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body.light-theme .app-header {
    background: rgba(255, 255, 255, 0.95);
}

body.light-theme .modal-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* ========================================
   Gold Premium Theme
   ======================================== */
body.gold-theme {
    --primary: #f59e0b;
    --primary-hover: #d97706;
    --primary-light: rgba(245, 158, 11, 0.1);
    --secondary: #fbbf24;
    
    --gradient-primary: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
    --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.3);
}

body.gold-theme .app-logo-text {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
}

body.gold-theme .number-ball {
    background: var(--gradient-gold);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

body.gold-theme .lottery-card.active {
    border-color: var(--accent);
    background: rgba(245, 158, 11, 0.1);
}

body.gold-theme .nav-item.active {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}

/* ========================================
   Neon Theme
   ======================================== */
body.neon-theme {
    --primary: #00ff88;
    --primary-hover: #00cc6a;
    --primary-light: rgba(0, 255, 136, 0.1);
    --secondary: #00ffff;
    --accent: #ff00ff;
    
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #15151f;
    
    --gradient-primary: linear-gradient(135deg, #00ff88 0%, #00ffff 100%);
    --shadow-glow: 0 0 30px rgba(0, 255, 136, 0.4);
}

body.neon-theme .app-logo-text {
    background: linear-gradient(135deg, #00ff88 0%, #00ffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

body.neon-theme .number-ball {
    background: linear-gradient(135deg, #00ff88 0%, #00ffff 100%);
    box-shadow: 
        0 0 20px rgba(0, 255, 136, 0.5),
        0 0 40px rgba(0, 255, 136, 0.2),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
    color: #0a0a0f;
}

body.neon-theme .number-ball.bonus {
    background: linear-gradient(135deg, #ff00ff 0%, #ff6b6b 100%);
    box-shadow: 
        0 0 20px rgba(255, 0, 255, 0.5),
        0 0 40px rgba(255, 0, 255, 0.2);
}

body.neon-theme .button-4d {
    background: linear-gradient(135deg, #00ff88 0%, #00ffff 100%);
    color: #0a0a0f;
}

body.neon-theme .button-4d:hover {
    box-shadow: 
        0 10px 30px rgba(0, 255, 136, 0.5),
        0 0 60px rgba(0, 255, 136, 0.3);
}

body.neon-theme .lottery-card:hover,
body.neon-theme .lottery-card.active {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

body.neon-theme .nav-item.active {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
}

body.neon-theme .user-button {
    background: linear-gradient(135deg, #00ff88 0%, #00ffff 100%);
    color: #0a0a0f;
}

/* ========================================
   Ocean Theme
   ======================================== */
body.ocean-theme {
    --primary: #06b6d4;
    --primary-hover: #0891b2;
    --primary-light: rgba(6, 182, 212, 0.1);
    --secondary: #0ea5e9;
    
    --bg-primary: #0c1929;
    --bg-secondary: #132337;
    --bg-tertiary: #1a3049;
    --bg-card: #162a42;
    
    --gradient-primary: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.3);
}

body.ocean-theme .number-ball {
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

/* ========================================
   Sunset Theme
   ======================================== */
body.sunset-theme {
    --primary: #f97316;
    --primary-hover: #ea580c;
    --primary-light: rgba(249, 115, 22, 0.1);
    --secondary: #fb923c;
    --accent: #ec4899;
    
    --bg-primary: #1a0f0f;
    --bg-secondary: #261616;
    --bg-tertiary: #331e1e;
    --bg-card: #2a1919;
    
    --gradient-primary: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
    --shadow-glow: 0 0 20px rgba(249, 115, 22, 0.3);
}

body.sunset-theme .app-logo-text {
    background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

body.sunset-theme .number-ball {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

body.sunset-theme .number-ball.bonus {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

/* ========================================
   3D Ball Effects for all themes
   ======================================== */
.number-ball {
    position: relative;
    overflow: hidden;
}

.number-ball::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 15%;
    width: 25%;
    height: 25%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    filter: blur(3px);
}

.number-ball::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 15%;
    width: 15%;
    height: 15%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    filter: blur(2px);
}

/* ========================================
   Animated Background (Premium)
   ======================================== */
body.premium-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: premium-bg-shift 10s ease infinite;
}

@keyframes premium-bg-shift {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   High Contrast Mode
   ======================================== */
@media (prefers-contrast: high) {
    :root {
        --border-color: #555;
        --border-light: #777;
    }
    
    body.light-theme {
        --border-color: #333;
        --border-light: #111;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .app-header,
    .sidebar,
    .modal-overlay,
    .toast-container {
        display: none !important;
    }
    
    .content-area {
        margin-left: 0;
        max-width: 100%;
    }
    
    .number-ball {
        background: #333 !important;
        box-shadow: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
