/* =============================================
   NexGameHub - Système de Thèmes
   4 thèmes gaming uniques
   ============================================= */

/* ===== VARIABLES DU THÈME PAR DÉFAUT ===== */
:root,
[data-theme="default"] {
    /* Couleurs principales */
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --secondary: #06b6d4;
    
    /* Arrière-plans */
    --bg-primary: #0a0e27;
    --bg-secondary: #141938;
    --bg-tertiary: #1e293b;
    --bg-card: #141938;
    
    /* Textes */
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Accents */
    --accent-success: #22c55e;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #3b82f6;
    
    /* Bordures et ombres */
    --border-color: #1e293b;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --glow-color: rgba(79, 70, 229, 0.4);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #4f46e5, #06b6d4);
    --gradient-bg: linear-gradient(135deg, #0a0e27 0%, #1e293b 100%);
    
    /* Effets spéciaux */
    --theme-filter: none;
    --theme-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===== THÈME RETRO ARCADE ===== */
[data-theme="retro"] {
    /* Couleurs néon années 80 */
    --primary: #ff6b35;
    --primary-light: #ff8c5a;
    --primary-dark: #e55a2b;
    --secondary: #ff006e;
    
    /* Arrière-plans sombres avec reflets */
    --bg-primary: #0d0221;
    --bg-secondary: #1a0533;
    --bg-tertiary: #2d0a4e;
    --bg-card: #1a0533;
    
    /* Textes */
    --text-primary: #fff5e6;
    --text-secondary: #ffb088;
    --text-muted: #b87a5a;
    
    /* Accents néon */
    --accent-success: #00ff88;
    --accent-warning: #ffee00;
    --accent-danger: #ff0055;
    --accent-info: #00d4ff;
    
    /* Bordures néon */
    --border-color: #ff006e44;
    --shadow-color: rgba(255, 0, 110, 0.3);
    --glow-color: rgba(255, 107, 53, 0.6);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #ff6b35, #ff006e);
    --gradient-bg: linear-gradient(135deg, #0d0221 0%, #2d0a4e 50%, #0d0221 100%);
    
    /* Effet scanlines subtil */
    --theme-filter: none;
    --theme-font: 'Press Start 2P', 'Courier New', monospace;
}

/* Effet scanlines pour le thème retro */
[data-theme="retro"] body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 3px
    );
    pointer-events: none;
    z-index: 99990;
    opacity: 0.3;
}

/* ===== THÈME PIXEL ART ===== */
[data-theme="pixel"] {
    /* Palette GameBoy / NES */
    --primary: #8bac0f;
    --primary-light: #9bbc0f;
    --primary-dark: #306230;
    --secondary: #0f380f;
    
    /* Arrière-plans style GameBoy */
    --bg-primary: #0f380f;
    --bg-secondary: #1a4a1a;
    --bg-tertiary: #306230;
    --bg-card: #1a4a1a;
    
    /* Textes */
    --text-primary: #9bbc0f;
    --text-secondary: #8bac0f;
    --text-muted: #6a8c0a;
    
    /* Accents pixel */
    --accent-success: #9bbc0f;
    --accent-warning: #d4a017;
    --accent-danger: #c43030;
    --accent-info: #4080a0;
    
    /* Bordures pixelisées */
    --border-color: #306230;
    --shadow-color: rgba(15, 56, 15, 0.5);
    --glow-color: rgba(139, 172, 15, 0.4);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8bac0f, #306230);
    --gradient-bg: linear-gradient(180deg, #0f380f 0%, #1a4a1a 100%);
    
    /* Police pixel */
    --theme-filter: contrast(1.1);
    --theme-font: 'Press Start 2P', 'Courier New', monospace;
}

/* Effet pixelisé pour les images */
[data-theme="pixel"] img {
    image-rendering: pixelated;
}

/* Bordures pixelisées */
[data-theme="pixel"] .stat-card,
[data-theme="pixel"] .game-card,
[data-theme="pixel"] .feature-card,
[data-theme="pixel"] .welcome,
[data-theme="pixel"] .auth-card {
    border-radius: 0 !important;
    border: 4px solid var(--primary);
    box-shadow: 
        4px 4px 0 var(--primary-dark),
        8px 8px 0 rgba(0,0,0,0.3);
}

/* ===== THÈME CYBERPUNK ===== */
[data-theme="cyberpunk"] {
    /* Couleurs néon futuristes */
    --primary: #00f0ff;
    --primary-light: #40f4ff;
    --primary-dark: #00a8b3;
    --secondary: #ff00a0;
    
    /* Arrière-plans sombres tech */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #12121a;
    
    /* Textes */
    --text-primary: #e0f7ff;
    --text-secondary: #a0d4e4;
    --text-muted: #607888;
    
    /* Accents cyber */
    --accent-success: #00ff9f;
    --accent-warning: #ffe600;
    --accent-danger: #ff0055;
    --accent-info: #00f0ff;
    
    /* Bordures brillantes */
    --border-color: rgba(0, 240, 255, 0.2);
    --shadow-color: rgba(255, 0, 160, 0.2);
    --glow-color: rgba(0, 240, 255, 0.5);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00f0ff, #ff00a0);
    --gradient-bg: linear-gradient(135deg, #0a0a0f 0%, #1a1a25 50%, #0a0a0f 100%);
    
    /* Police futuriste */
    --theme-filter: none;
    --theme-font: 'Orbitron', 'Segoe UI', sans-serif;
}

/* Effet glow pour le thème cyberpunk */
[data-theme="cyberpunk"] .stat-card,
[data-theme="cyberpunk"] .game-card,
[data-theme="cyberpunk"] .welcome {
    border: 1px solid var(--primary);
    box-shadow: 
        0 0 10px var(--glow-color),
        inset 0 0 20px rgba(0, 240, 255, 0.05);
}

[data-theme="cyberpunk"] .btn-primary,
[data-theme="cyberpunk"] .kofi-button {
    box-shadow: 0 0 20px var(--glow-color);
}

/* Lignes de circuit en fond */
[data-theme="cyberpunk"] body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* ===== APPLICATION DES VARIABLES ===== */

/* Body */
body {
    background: var(--gradient-bg) !important;
    color: var(--text-primary) !important;
    font-family: var(--theme-font) !important;
    filter: var(--theme-filter);
}

/* Headers */
.header,
header {
    background: var(--bg-secondary) !important;
}

/* Cards */
.stat-card,
.game-card,
.feature-card,
.welcome,
.auth-card,
.empty-state {
    background: var(--bg-card) !important;
}

/* Textes */
h1, h2, h3, .hero-title, .section-title, .stat-value {
    color: var(--text-primary) !important;
}

p, .text-secondary, .stat-label, .game-platform {
    color: var(--text-muted) !important;
}

/* Liens et boutons primaires */
a:hover,
.nav a:hover,
.nav-links a:hover {
    color: var(--primary) !important;
}

.btn-primary,
.btn-hero-primary {
    background: var(--gradient-primary) !important;
}

/* Logo et accent */
.logo,
.footer-col h3 {
    color: var(--primary) !important;
}

/* Footer */
.footer {
    background: var(--bg-primary) !important;
    border-top-color: var(--border-color) !important;
}

/* Icônes stat */
.stat-icon.blue { 
    background: rgba(var(--primary), 0.2) !important;
    color: var(--primary) !important;
}

/* ===== TRANSITIONS ===== */
body,
.header,
.stat-card,
.game-card,
.footer,
.welcome,
h1, h2, h3, p, a {
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
