/* ═══════════════════════════════════════════════════════════════
   🌙 DARK MODE SYSTEM
   ═══════════════════════════════════════════════════════════════ */

:root {
    --bg-primary: #0A0E1A;
    --bg-secondary: #101427;
    --bg-card: rgba(16, 20, 39, 0.95);
    --text-primary: #FFD700;
    --text-secondary: #FFFFFF;
    --border-gold: #CD7F32;
    --shadow-gold: rgba(212, 175, 55, 0.25);
    --gradient-gold: linear-gradient(135deg, #D4AF37, #CD7F32);
}

[data-theme="light"] {
    --bg-primary: #F5F5DC;
    --bg-secondary: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #8B4513;
    --text-secondary: #2C1810;
    --border-gold: #D4AF37;
    --shadow-gold: rgba(139, 69, 19, 0.15);
    --gradient-gold: linear-gradient(135deg, #FFD700, #FFA500);
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    background: var(--gradient-gold);
    border: 3px solid var(--border-gold);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: pulseGlow 2s ease-in-out infinite;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 12px 35px var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.theme-toggle:active {
    transform: scale(0.95) rotate(0deg);
}

/* Light Mode Adjustments */
[data-theme="light"] body {
    background: linear-gradient(135deg, #F5F5DC 0%, #FFF8DC 100%);
    color: var(--text-secondary);
}

[data-theme="light"] .casino-header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.1);
}

[data-theme="light"] .balance-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.15));
    border-color: #FFA500;
}

[data-theme="light"] .btn-back-to-cards {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #2C1810;
    border-color: #FFA500;
}

[data-theme="light"] #game-menu button {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
    border-color: #FFA500;
    color: #8B4513;
}

[data-theme="light"] #game-menu button:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 165, 0, 0.2));
    border-color: #FFD700;
}

/* Smooth Theme Transition */
body, .casino-header, .balance-card, .btn-back-to-cards, #game-menu button {
    transition: background 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Mobile Responsive Theme Toggle */
@media (max-width: 768px) {
    .theme-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        bottom: 12px;
        right: 12px;
    }
}
