/* ===========================================
   TANK DOMINATION - STYLE CSS
   Direction Artistique Neon Arcade v2.0
   =========================================== */

/* ===========================================
   VARIABLES CSS - Palette Arcadian
   =========================================== */
:root {
    /* Couleurs principales (Neons) */
    --pink: #ff2d75;
    --pink-light: #ff5c8d;
    --cyan: #00f5ff;
    --cyan-light: #5ff5ff;
    --green: #39ff14;
    --yellow: #ffff00;
    --purple: #bf5af2;
    --gold: #ffd700;
    --gold-light: #ffec8b;

    /* Arriere-plans */
    --bg-dark: #0a0a12;
    --bg-card: #0f0f1a;
    --bg-darker: #08080e;
    --bg-section-alt: #0b0b14;

    /* Blancs (transparences) */
    --white: #ffffff;
    --white-80: rgba(255, 255, 255, 0.8);
    --white-60: rgba(255, 255, 255, 0.6);
    --white-50: rgba(255, 255, 255, 0.5);
    --white-40: rgba(255, 255, 255, 0.4);
    --white-30: rgba(255, 255, 255, 0.3);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-10: rgba(255, 255, 255, 0.1);
    --white-5: rgba(255, 255, 255, 0.05);

    /* Couleurs joueurs */
    --player-yellow: #ffff00;
    --player-blue: #00f5ff;
    --player-pink: #ff2d75;
    --player-orange: #ff8c00;

    /* Status */
    --success: #39ff14;
    --warning: #ffff00;
    --danger: #ff2d75;

    /* Alias pour compatibilite */
    --primary: var(--pink);
    --primary-dark: #d6245f;
    --secondary: var(--bg-card);
    --accent: var(--cyan);
    --accent-dark: #00c8cc;
    --text: var(--white);
    --text-muted: var(--white-50);
    --text-accent: var(--yellow);
    --panel-dark: var(--bg-card);
    --panel-border: var(--white-10);

    /* Rayons de bordure */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50px;
    --border-radius: 12px; /* Alias pour compatibilité avec game.css */

    /* Ombres neon */
    --shadow-pink: 0 4px 20px rgba(255, 45, 117, 0.3);
    --shadow-pink-hover: 0 4px 30px rgba(255, 45, 117, 0.5);
    --shadow-cyan: 0 4px 20px rgba(0, 245, 255, 0.3);
    --shadow-green: 0 4px 20px rgba(57, 255, 20, 0.3);
    --shadow-gold: 0 4px 20px rgba(255, 215, 0, 0.4);

    /* Polices */
    --font-pixel: 'Press Start 2P', cursive;
    --font-orbitron: 'Orbitron', sans-serif;
    --font-inter: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s;
    --transition-base: 0.3s;
    --transition-slow: 0.5s;
}

/* ===========================================
   RESET & BASE
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-inter);
    background-color: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

/* ===========================================
   LOADING SCREEN - Écran de chargement
   Style Arcade Néon
   =========================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
}

.loading-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.loading-logo {
    margin-bottom: 48px;
}

.loading-title {
    font-family: var(--font-pixel);
    font-size: clamp(24px, 6vw, 42px);
    color: var(--white);
    text-shadow:
        0 0 10px var(--pink),
        0 0 20px var(--pink),
        0 0 40px var(--pink),
        0 0 80px var(--pink);
    animation: neonPulse 2s ease-in-out infinite;
    letter-spacing: 4px;
}

.loading-subtitle {
    font-family: var(--font-orbitron);
    font-size: 14px;
    color: var(--cyan);
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 8px;
    text-shadow: 0 0 10px var(--cyan);
}

/* Barre de progression */
.loading-bar-container {
    margin-bottom: 24px;
}

.loading-bar {
    width: 100%;
    height: 8px;
    background: var(--white-10);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--white-20);
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--pink), var(--cyan), var(--pink));
    background-size: 200% 100%;
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
    animation: gradientMove 2s linear infinite;
    position: relative;
}

.loading-bar-glow {
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    bottom: -4px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 45, 117, 0.4) 50%,
        transparent 100%);
    animation: glowMove 1.5s ease-in-out infinite;
    pointer-events: none;
}

.loading-percentage {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--cyan);
    margin-top: 12px;
    text-shadow: 0 0 10px var(--cyan);
}

/* Statut de chargement */
.loading-status {
    font-family: var(--font-orbitron);
    font-size: 12px;
    color: var(--white-60);
    margin-bottom: 32px;
    min-height: 20px;
}

/* Animation des bombes */
.loading-bombs {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.loading-bomb {
    font-size: 32px;
    animation: bombBounce 1s ease-in-out infinite;
}

.loading-bomb:nth-child(1) { animation-delay: 0s; }
.loading-bomb:nth-child(2) { animation-delay: 0.2s; }
.loading-bomb:nth-child(3) { animation-delay: 0.4s; }

/* Animations */
@keyframes neonPulse {
    0%, 100% {
        text-shadow:
            0 0 10px var(--pink),
            0 0 20px var(--pink),
            0 0 40px var(--pink),
            0 0 80px var(--pink);
    }
    50% {
        text-shadow:
            0 0 5px var(--pink),
            0 0 10px var(--pink),
            0 0 20px var(--pink),
            0 0 40px var(--pink);
    }
}

@keyframes gradientMove {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes glowMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes bombBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ===========================================
   UNIFIED CONFIG SCREEN - Interface unifiée
   Layout 2 colonnes: QR à gauche, Options à droite
   =========================================== */

/* Container principal de l'écran config */
#unified-config {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Barre supérieure - Retour + Utilisateur */
.config-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--white-10);
    flex-shrink: 0;
}

.config-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--white-20);
    color: var(--white-80);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-orbitron);
    font-size: 14px;
    transition: all 0.2s ease;
}

.config-back-btn:hover {
    background: var(--white-10);
    border-color: var(--white-40);
    color: var(--white);
}

.config-back-btn .back-arrow {
    font-size: 18px;
}

/* S'assurer que les enfants du bouton retour n'interceptent pas les clics */
.config-back-btn > * {
    pointer-events: none;
}

.config-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--white-10);
}

.config-user-name {
    font-family: var(--font-orbitron);
    font-size: 14px;
    color: var(--cyan);
    font-weight: 600;
}

.config-user-credits {
    font-family: var(--font-orbitron);
    font-size: 14px;
    color: var(--gold);
}

/* Barre inférieure - OBSOLÈTE (bouton déplacé dans la colonne droite) */
.config-bottom-bar {
    display: none; /* Caché - le bouton est maintenant dans config-footer-section */
}

/* Section footer dans la colonne droite (joueurs + bouton JOUER) */
.config-footer-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-darker) 100%);
    border-top: 1px solid var(--white-10);
    margin-top: auto;
    position: sticky;
    bottom: 0;
}

.config-connected-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-connected-compact h4 {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.connected-list-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.waiting-compact {
    font-size: 12px;
    color: var(--white-40);
    font-style: italic;
}

.connected-player-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-darker);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--cyan-20);
}

.connected-player-compact .player-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
}

.connected-player-compact .player-name {
    font-size: 12px;
    color: var(--white-80);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-btn.extra-large {
    padding: 18px 60px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ============================================
   SECTION JOUEURS CONNECTÉS (colonne gauche)
   Style Direction Artistique Premium
   ============================================ */

.config-players-section {
    margin-top: auto;
    padding: 20px;
    background: linear-gradient(145deg, var(--bg-card), var(--bg-darker));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 245, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Effet de lueur supérieure */
.config-players-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0.6;
}

.config-players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--white-10);
}

.config-players-header h4 {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 0 0 10px var(--cyan);
}

.config-players-header .player-count {
    font-family: var(--font-pixel);
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
    background: rgba(57, 255, 20, 0.15);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(57, 255, 20, 0.3);
    text-shadow: 0 0 8px var(--green);
}

.config-players-list {
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

/* Scrollbar custom */
.config-players-list::-webkit-scrollbar {
    width: 4px;
}

.config-players-list::-webkit-scrollbar-track {
    background: var(--white-5);
    border-radius: 4px;
}

.config-players-list::-webkit-scrollbar-thumb {
    background: var(--cyan);
    border-radius: 4px;
}

.waiting-players {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    color: var(--white-40);
    font-size: 13px;
    font-family: var(--font-orbitron);
    background: var(--white-5);
    border-radius: var(--radius-md);
    border: 1px dashed var(--white-20);
}

.waiting-players .waiting-icon {
    font-size: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* ============================================
   RUBAN JOUEURS HORIZONTAL (en haut du panneau droit)
   ============================================ */
.config-players-ribbon {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(0, 200, 220, 0.05) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0, 245, 255, 0.25);
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.1);
}

.config-players-list-horizontal {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0;
}

.config-players-list-horizontal::-webkit-scrollbar {
    height: 3px;
}

.config-players-list-horizontal::-webkit-scrollbar-track {
    background: var(--white-5);
    border-radius: 3px;
}

.config-players-list-horizontal::-webkit-scrollbar-thumb {
    background: var(--cyan);
    border-radius: 3px;
}

.config-players-list-horizontal .waiting-players {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 11px;
    border: none;
    background: none;
}

.config-players-list-horizontal .waiting-players .waiting-icon {
    font-size: 14px;
}

/* Carte joueur compacte pour le ruban */
.config-players-list-horizontal .connected-player-card {
    padding: 8px 12px;
    gap: 8px;
    flex-shrink: 0;
    min-width: auto;
}

.config-players-list-horizontal .connected-player-card .player-color-dot {
    width: 10px;
    height: 10px;
}

.config-players-list-horizontal .connected-player-card .player-name {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-players-list-horizontal .connected-player-card .player-info {
    gap: 1px;
}

.config-players-list-horizontal .connected-player-card .player-device {
    display: none;
}

.config-players-count {
    font-family: var(--font-pixel);
    font-size: 11px;
    font-weight: 700;
    color: var(--green);
    background: rgba(57, 255, 20, 0.15);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(57, 255, 20, 0.3);
    text-shadow: 0 0 8px var(--green);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Bouton JOUER compact */
.start-game-btn-compact {
    padding: 10px 20px !important;
    font-size: 12px !important;
    gap: 8px !important;
    flex-shrink: 0;
}

.start-game-btn-compact .play-icon {
    font-size: 14px;
}

/* Options Serveur (sous le ruban des joueurs) */
.config-server-options {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 45, 117, 0.08) 0%, rgba(200, 30, 90, 0.04) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 45, 117, 0.2);
    margin-bottom: 16px;
}

.server-option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.server-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 150px;
}

.server-option-item label {
    font-family: var(--font-orbitron);
    font-size: 10px;
    color: var(--white-60);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.server-option-item input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-darker);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-inter);
    font-size: 12px;
    min-width: 100px;
}

.server-option-item input[type="text"]:focus {
    border-color: var(--pink);
    outline: none;
    box-shadow: 0 0 10px rgba(255, 45, 117, 0.2);
}

.server-option-item select {
    padding: 8px 12px;
    background: var(--bg-darker);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-inter);
    font-size: 12px;
    cursor: pointer;
    min-width: 100px;
}

.server-option-item select:focus {
    border-color: var(--pink);
    outline: none;
}

/* Carte joueur connecté - Style premium */
.connected-player-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.08) 0%, rgba(0, 200, 220, 0.03) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 245, 255, 0.2);
    transition: all var(--transition-base);
    animation: playerSlideIn 0.3s ease-out;
}

@keyframes playerSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.connected-player-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.25);
    transform: translateX(4px);
}

.connected-player-card .player-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 12px currentColor;
    flex-shrink: 0;
}

.connected-player-card .player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.connected-player-card .player-name {
    font-family: var(--font-orbitron);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--white);
}

.connected-player-card .player-device {
    font-size: 10px;
    color: var(--white-40);
    font-family: var(--font-inter);
}

.connected-player-card .player-status {
    font-size: 18px;
    flex-shrink: 0;
}

/* Host badge */
.connected-player-card.is-host {
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 200, 0, 0.03) 100%);
}

.connected-player-card.is-host::after {
    content: '👑';
    font-size: 14px;
    margin-left: auto;
}

/* Bouton JOUER - Grande visibilité Direction Artistique */
.start-game-btn {
    width: 100%;
    padding: 18px 32px !important;
    font-size: 16px !important;
    font-weight: 800;
    font-family: var(--font-pixel) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(135deg, var(--pink) 0%, var(--pink-light) 50%, var(--pink) 100%) !important;
    background-size: 200% 200%;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow:
        0 0 40px rgba(255, 45, 117, 0.5),
        0 8px 32px rgba(255, 45, 117, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all var(--transition-base);
    flex-shrink: 0;
    margin-top: 16px;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: jouerButtonPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Animation subtile de pulsation */
@keyframes jouerButtonPulse {
    0%, 100% {
        box-shadow:
            0 0 40px rgba(255, 45, 117, 0.5),
            0 8px 32px rgba(255, 45, 117, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow:
            0 0 60px rgba(255, 45, 117, 0.7),
            0 8px 40px rgba(255, 45, 117, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Effet de brillance qui passe */
.start-game-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: skewX(-20deg);
    animation: shineEffect 3s ease-in-out infinite;
}

@keyframes shineEffect {
    0%, 100% {
        left: -100%;
    }
    50% {
        left: 150%;
    }
}

.start-game-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 0 70px rgba(255, 45, 117, 0.7),
        0 12px 40px rgba(255, 45, 117, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: none;
}

.start-game-btn:active {
    transform: translateY(0) scale(0.98);
}

.start-game-btn .play-icon {
    font-size: 22px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

/* État désactivé */
.start-game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
    background: var(--white-20) !important;
    border-color: var(--white-20) !important;
    box-shadow: none;
}

.start-game-btn:disabled::before {
    display: none;
}

.game-btn.extra-large .play-icon {
    font-size: 16px;
}

.unified-config-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    flex: 1;
    width: 100%;
    height: calc(100vh - 70px); /* Hauteur moins le header */
    overflow: hidden;
}

/* Colonne Gauche - Connexion */
.config-left-panel {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-darker) 100%);
    border-right: 1px solid var(--white-10);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100%;
}

/* Badge du mode */
.config-mode-badge {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--pink);
    background: rgba(255, 45, 117, 0.1);
    border: 1px solid rgba(255, 45, 117, 0.3);
    padding: 8px 24px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px var(--pink);
}

.config-mode-badge.local {
    color: var(--cyan);
    background: rgba(0, 245, 255, 0.1);
    border-color: rgba(0, 245, 255, 0.3);
    text-shadow: 0 0 10px var(--cyan);
}

.config-mode-badge.online {
    color: var(--green);
    background: rgba(57, 255, 20, 0.1);
    border-color: rgba(57, 255, 20, 0.3);
    text-shadow: 0 0 10px var(--green);
}

/* Code 6 chiffres */
.config-code-section {
    text-align: center;
    width: 100%;
}

.config-code-label {
    font-family: var(--font-orbitron);
    font-size: 10px;
    color: var(--white-50);
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 8px;
}

.config-code-display {
    font-family: var(--font-pixel);
    font-size: 28px;
    color: var(--cyan);
    letter-spacing: 10px;
    text-shadow:
        0 0 10px var(--cyan),
        0 0 20px var(--cyan);
    background: var(--bg-darker);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    border: 2px solid rgba(0, 245, 255, 0.3);
}

/* QR Code */
.config-qr-section {
    text-align: center;
    width: 100%;
    padding: 0 10px;
}

.config-qr-code {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    aspect-ratio: 1;
    background: var(--bg-darker);
    border: 2px solid var(--white-20);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    overflow: hidden;
}

.config-qr-code img {
    width: 100%;
    height: 100%;
}

.qr-instruction {
    font-family: var(--font-orbitron);
    font-size: 11px;
    color: var(--white-40);
}

/* Lien */
.config-link-section {
    width: 100%;
    display: flex;
    gap: 8px;
}

.config-link-input {
    flex: 1;
    background: var(--bg-darker);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--white-60);
    font-family: var(--font-inter);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-copy-btn {
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    color: var(--cyan);
    font-family: var(--font-orbitron);
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 6px;
}

.config-copy-btn:hover {
    background: rgba(0, 245, 255, 0.2);
}

.copy-icon {
    font-size: 14px;
}

.connected-title {
    font-family: var(--font-orbitron);
    font-size: 12px;
    color: var(--white-60);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.connected-players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.no-players-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-darker);
    border-radius: var(--radius-sm);
    color: var(--white-40);
    font-size: 13px;
}

.waiting-icon {
    font-size: 24px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Carte joueur connecté */
.connected-player-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-darker);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--green);
}

.connected-player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.connected-player-name {
    flex: 1;
    font-family: var(--font-orbitron);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--white);
}

.connected-player-status {
    font-size: 10px;
    color: var(--green);
    text-transform: uppercase;
}

/* Boutons gauche */
.config-left-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.config-left-buttons .game-btn {
    width: 100%;
}

/* Colonne Droite - Options (Refactorisé selon Direction Artistique) */
.config-right-panel {
    background: var(--bg-dark);
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    /* Grille de fond style arcade */
    position: relative;
    max-height: 100%;
}

.config-right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--white-5) 1px, transparent 1px),
        linear-gradient(90deg, var(--white-5) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0.3;
}

.config-panel-title {
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow:
        0 0 10px var(--pink),
        0 0 20px var(--pink);
    text-align: center;
    position: relative;
    z-index: 1;
}

.config-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    position: relative;
    z-index: 1;
    padding-bottom: 24px;
    /* Ne pas utiliser flex: 1 pour permettre le scroll */
}

/* Section d'options - Style carte ARCADE PREMIUM */
.config-option-section {
    background: linear-gradient(165deg,
        rgba(20, 20, 35, 0.95) 0%,
        rgba(12, 12, 22, 0.98) 50%,
        rgba(8, 8, 16, 1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Ligne lumineuse en haut */
.config-option-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--cyan) 20%,
        var(--pink) 50%,
        var(--cyan) 80%,
        transparent 100%);
    opacity: 0.7;
}

/* Effet de lueur d'angle */
.config-option-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.config-option-section:hover {
    border-color: rgba(0, 245, 255, 0.3);
    transform: translateY(-3px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 245, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.config-option-section:hover::before {
    opacity: 1;
}

/* Titre de section avec icône - STYLE ARCADE */
.config-option-section h3 {
    font-family: var(--font-orbitron);
    font-size: 13px;
    color: var(--white);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

/* Ligne de dégradé sous le titre */
.config-option-section h3::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent);
}

/* Icônes pour chaque section */
.config-option-section h3::before {
    content: '◆';
    font-size: 10px;
    color: var(--cyan);
    text-shadow: 0 0 12px var(--cyan);
    animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% { text-shadow: 0 0 12px var(--cyan); }
    50% { text-shadow: 0 0 20px var(--cyan), 0 0 30px var(--cyan); }
}

/* Thèmes spécifiques par section */
.config-option-section[data-theme="terrain"] h3::before { content: '▦'; font-size: 14px; }
.config-option-section[data-theme="options"] h3::before { content: '⚙'; font-size: 14px; }
.config-option-section[data-theme="ia"] h3::before { content: '🤖'; font-size: 16px; }
.config-option-section[data-theme="stats"] h3::before { content: '📊'; font-size: 16px; }
.config-option-section[data-theme="players"] h3::before { content: '👥'; font-size: 16px; }
.config-option-section[data-theme="betting"] h3::before { content: '🎲'; font-size: 16px; }
.config-option-section[data-theme="server"] h3::before { content: '🌐'; font-size: 16px; }

/* Couleurs spécifiques par thème */
.config-option-section[data-theme="terrain"] h3 { color: var(--green); text-shadow: 0 0 20px rgba(57, 255, 20, 0.5); }
.config-option-section[data-theme="terrain"] h3::after { background: linear-gradient(90deg, var(--green), transparent); }
.config-option-section[data-theme="ia"] h3 { color: var(--pink); text-shadow: 0 0 20px rgba(255, 45, 117, 0.5); }
.config-option-section[data-theme="ia"] h3::after { background: linear-gradient(90deg, var(--pink), transparent); }
.config-option-section[data-theme="betting"] h3 { color: var(--gold); text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
.config-option-section[data-theme="betting"] h3::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* Responsive */
@media (max-width: 900px) {
    .unified-config-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .config-left-panel {
        border-right: none;
        border-bottom: 1px solid var(--white-10);
        padding: 20px;
        max-height: 50vh;
    }

    .config-qr-code {
        width: 180px;
        height: 180px;
    }

    .config-code-display {
        font-size: 24px;
        letter-spacing: 8px;
    }
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===========================================
   ECRANS
   =========================================== */
.screen {
    display: none !important;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    visibility: hidden;
    z-index: 1;
    background: var(--bg-dark); /* Fond opaque pour masquer le contenu en dessous */
}

.screen.active {
    display: flex !important;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transform: scale(1);
    animation: screenFadeIn 0.5s ease-out;
    pointer-events: auto;
    visibility: visible;
    z-index: 100;
}

@keyframes screenFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===========================================
   MENU PRINCIPAL
   =========================================== */
#main-menu {
    background: var(--bg-dark);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

/* Grille de fond style arcade */
#main-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--white-5) 1px, transparent 1px),
        linear-gradient(90deg, var(--white-5) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    opacity: 0.5;
}

/* Effet de lueur rayonnante */
#main-menu::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150%;
    height: 150%;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(255, 45, 117, 0.08) 0%, transparent 50%);
    animation: pulseGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* ===========================================
   MENU PRINCIPAL - STYLE ARCADIAN
   =========================================== */

/* Header bar du jeu */
.game-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(10, 10, 18, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--white-10);
}

/* User info bar */
.user-info-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: var(--radius-sm);
}

.user-info-bar .user-name {
    font-family: var(--font-orbitron);
    font-size: 14px;
    font-weight: 600;
    color: var(--cyan);
}

.user-info-bar .user-coins {
    font-family: var(--font-orbitron);
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
}

.user-info-bar .user-coins::before {
    content: '🪙 ';
}

/* Contenu du menu */
.menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 100px 24px 40px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Hero du menu */
.menu-hero {
    text-align: center;
    margin-bottom: 48px;
}

.menu-badge {
    display: inline-block;
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 8px 16px;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 50px;
    margin-bottom: 24px;
}

.menu-title {
    font-family: var(--font-pixel);
    font-size: clamp(32px, 8vw, 64px);
    color: var(--pink);
    text-shadow:
        0 0 10px var(--pink),
        0 0 30px rgba(255, 45, 117, 0.5),
        0 0 60px rgba(255, 45, 117, 0.3);
    letter-spacing: 6px;
    margin-bottom: 16px;
}

.menu-subtitle {
    font-family: var(--font-orbitron);
    font-size: clamp(14px, 3vw, 20px);
    color: var(--cyan);
    letter-spacing: 6px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
}

/* ===========================================
   ELEMENTS DECORATIFS - BOMBES ET PARTICULES
   =========================================== */
.deco-bomb {
    position: absolute;
    font-size: 2rem;
    opacity: 0.15;
    pointer-events: none;
    animation: floatBomb 6s ease-in-out infinite;
    z-index: 1;
}

.deco-bomb-1 { top: 15%; left: 10%; animation-delay: 0s; }
.deco-bomb-2 { top: 25%; right: 8%; animation-delay: 1.5s; }
.deco-bomb-3 { bottom: 20%; left: 5%; animation-delay: 3s; font-size: 1.5rem; }
.deco-bomb-4 { bottom: 30%; right: 12%; animation-delay: 4.5s; font-size: 1.8rem; }

@keyframes floatBomb {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* Icone bombe du titre */
.menu-bomb-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    animation: pulseBomb 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 45, 117, 0.5));
}

@keyframes pulseBomb {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Tagline */
.menu-tagline {
    font-family: var(--font-inter);
    font-size: 14px;
    color: var(--white-40);
    margin-top: 16px;
    letter-spacing: 1px;
}

/* ===========================================
   BOUTONS DE MODE - AVEC COULEURS DISTINCTES
   =========================================== */
.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 550px;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 2px solid var(--white-10);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}

/* Effet de brillance au hover */
.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.mode-btn:hover::before {
    left: 100%;
}

.mode-btn:active {
    transform: scale(0.98);
}

/* === SOLO - Couleur Jaune/Or === */
.mode-btn-solo {
    border-color: rgba(255, 215, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, var(--bg-card) 100%);
}

.mode-btn-solo:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 30px rgba(255, 215, 0, 0.3);
    transform: translateX(8px);
}

.mode-btn-solo .mode-btn-title { color: var(--gold); }
.mode-btn-solo .mode-btn-tags .tag {
    color: var(--gold);
    border-color: rgba(255, 215, 0, 0.3);
}
.mode-btn-solo .mode-btn-arrow { color: var(--gold); }

/* === MULTIJOUEUR - Couleur Pink === */
.mode-btn-local {
    border-color: rgba(255, 45, 117, 0.2);
    background: linear-gradient(135deg, rgba(255, 45, 117, 0.05) 0%, var(--bg-card) 100%);
}

.mode-btn-local:hover {
    border-color: var(--pink);
    box-shadow: 0 4px 30px rgba(255, 45, 117, 0.3);
    transform: translateX(8px);
}

.mode-btn-local .mode-btn-title { color: var(--pink); }
.mode-btn-local .mode-btn-tags .tag {
    color: var(--pink-light);
    border-color: rgba(255, 45, 117, 0.3);
}
.mode-btn-local .mode-btn-arrow { color: var(--pink); }

/* === EN LIGNE - Couleur Cyan === */
.mode-btn-online {
    border-color: rgba(0, 245, 255, 0.2);
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05) 0%, var(--bg-card) 100%);
}

.mode-btn-online:hover {
    border-color: var(--cyan);
    box-shadow: 0 4px 30px rgba(0, 245, 255, 0.3);
    transform: translateX(8px);
}

.mode-btn-online .mode-btn-title { color: var(--cyan); }
.mode-btn-online .mode-btn-tags .tag {
    color: var(--cyan-light);
    border-color: rgba(0, 245, 255, 0.3);
}
.mode-btn-online .mode-btn-arrow { color: var(--cyan); }

/* Icone du bouton avec emoji */
.mode-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    border: 1px solid var(--white-10);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.mode-emoji {
    font-size: 28px;
}

.mode-btn:hover .mode-btn-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* Contenu du bouton */
.mode-btn-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.mode-btn-title {
    font-family: var(--font-orbitron);
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.mode-btn-desc {
    font-family: var(--font-inter);
    font-size: 13px;
    color: var(--white-50);
    line-height: 1.4;
}

/* Tags du bouton */
.mode-btn-tags {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.mode-btn-tags .tag {
    padding: 5px 12px;
    background: var(--white-5);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-full);
    font-family: var(--font-orbitron);
    font-size: 10px;
    transition: all 0.3s ease;
}

/* Fleche du bouton */
.mode-btn-arrow {
    flex-shrink: 0;
    font-size: 24px;
    font-weight: bold;
    color: var(--white-30);
    transition: all 0.3s ease;
}

.mode-btn:hover .mode-btn-arrow {
    transform: translateX(8px);
}

/* ===========================================
   BOUTONS GENERIQUES - STYLE ARCADIAN
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-orbitron);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--pink), var(--pink-light));
    color: var(--white);
    box-shadow: var(--shadow-pink);
}

.btn-primary:hover {
    box-shadow: var(--shadow-pink-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--white-5);
    border: 1px solid var(--white-20);
    color: var(--white-60);
}

.btn-secondary:hover {
    background: var(--white-10);
    border-color: var(--cyan);
    color: var(--cyan);
}

.btn-cyan {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-light));
    color: var(--bg-dark);
}

.btn-outline-cyan {
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.5);
    color: var(--cyan);
}

.btn-outline-cyan:hover {
    background: rgba(0, 245, 255, 0.2);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-logout {
    padding: 6px 12px;
    background: rgba(255, 45, 117, 0.2);
    border: 1px solid var(--pink);
    border-radius: var(--radius-sm);
    color: var(--pink);
    font-family: var(--font-orbitron);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-logout:hover {
    background: var(--pink);
    color: white;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-auth {
    padding: 10px 18px;
    background: var(--white-5);
    border: 1px solid var(--white-20);
    border-radius: var(--radius-md);
    color: var(--white);
    font-family: var(--font-orbitron);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-auth:hover {
    background: var(--white-10);
    border-color: var(--cyan);
    color: var(--cyan);
}

/* Version */
.version-info {
    margin-top: 40px;
    font-family: var(--font-orbitron);
    font-size: 0.8rem;
    color: var(--white-30);
}

/* Bombes decoratives */
.deco-bomb {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(255, 45, 117, 0.5));
}

.deco-bomb.bomb-1 { top: 10%; left: 5%; }
.deco-bomb.bomb-2 { top: 15%; right: 8%; }
.deco-bomb.bomb-3 { bottom: 15%; left: 8%; }
.deco-bomb.bomb-4 { bottom: 10%; right: 5%; }

/* ===========================================
   PANELS ET FORMULAIRES
   =========================================== */
.game-panel {
    background: var(--bg-card);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: panelSlideIn 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

@keyframes panelSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-container {
    padding: 40px;
    min-width: 380px;
}

.form-container h2 {
    text-align: center;
    font-family: var(--font-pixel);
    color: var(--cyan);
    margin-bottom: 30px;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-orbitron);
    color: var(--white-60);
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    background: var(--white-5);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-md);
    color: var(--text);
    font-family: var(--font-inter);
    font-size: 1rem;
    transition: border-color var(--transition-base);
}

.form-group input:focus {
    outline: none;
    border-color: var(--cyan);
}

.form-error {
    color: var(--pink);
    font-size: 0.9rem;
    margin-bottom: 15px;
    min-height: 20px;
}

.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.form-buttons .game-btn {
    flex: 1;
}

/* ===========================================
   BOUTONS
   =========================================== */
.game-btn {
    padding: 14px 28px;
    font-family: var(--font-orbitron);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* S'assurer que les enfants des boutons n'interceptent pas les clics */
.game-btn > * {
    pointer-events: none;
}

.game-btn.primary {
    background: linear-gradient(135deg, var(--pink), var(--pink-light));
    color: white;
    box-shadow: var(--shadow-pink);
}

.game-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-pink-hover);
}

.game-btn.primary:active {
    transform: translateY(0);
}

.game-btn.secondary {
    background: var(--white-5);
    border: 1px solid var(--white-20);
    color: white;
}

.game-btn.secondary:hover {
    background: var(--white-10);
    border-color: var(--white-30);
}

.game-btn.accent {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-light));
    color: var(--bg-dark);
    box-shadow: var(--shadow-cyan);
}

.game-btn.accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 245, 255, 0.5);
}

.game-btn.large {
    padding: 18px 40px;
    font-size: 1rem;
}

.game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===========================================
   CONFIGURATION DE PARTIE
   =========================================== */
.config-container {
    padding: 20px 25px;
    max-width: 95vw;
    width: 100%;
    max-height: none;
    overflow: visible;
}

.config-container h2 {
    text-align: center;
    font-family: var(--font-pixel);
    color: var(--cyan);
    margin-bottom: 15px;
    font-size: 1rem;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.3);
}

.config-grid-unified {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

.config-grid-unified.compact {
    grid-template-columns: repeat(2, 1fr);
}

.config-section {
    background: var(--bg-darker);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--white-10);
}

.config-section h3 {
    font-family: var(--font-orbitron);
    color: var(--pink);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--white-10);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Config Row - Style ARCADE PREMIUM */
.config-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.01) 100%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.config-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--cyan);
    border-radius: 0 3px 3px 0;
    transition: height 0.25s ease;
}

.config-row:hover {
    background: linear-gradient(135deg,
        rgba(0, 245, 255, 0.08) 0%,
        rgba(0, 245, 255, 0.03) 100%);
    border-color: rgba(0, 245, 255, 0.2);
}

.config-row:hover::before {
    height: 60%;
}

.config-row:last-child {
    margin-bottom: 0;
}

.config-row label {
    font-family: var(--font-orbitron);
    color: rgba(255, 255, 255, 0.75);
    font-size: 10px;
    font-weight: 600;
    min-width: 70px;
    max-width: 90px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.25s ease;
}

.config-row:hover label {
    color: var(--white);
}

/* Slider PREMIUM - Style arcade néon */
.config-row input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 6px;
    appearance: none;
    background: linear-gradient(90deg,
        rgba(0, 245, 255, 0.3) 0%,
        rgba(255, 45, 117, 0.3) 100%);
    cursor: pointer;
    border: none;
    position: relative;
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.4),
        0 0 10px rgba(0, 245, 255, 0.2);
}

.config-row input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff4d8d, var(--pink));
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 20px rgba(255, 45, 117, 0.7),
        0 0 40px rgba(255, 45, 117, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

.config-row input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow:
        0 0 30px rgba(255, 45, 117, 0.9),
        0 0 50px rgba(255, 45, 117, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.config-row input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff4d8d, var(--pink));
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 20px rgba(255, 45, 117, 0.7),
        0 0 40px rgba(255, 45, 117, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Valeur du slider - Style badge lumineux */
.config-row span {
    min-width: 48px;
    text-align: center;
    font-family: var(--font-pixel);
    color: var(--cyan);
    font-size: 12px;
    padding: 6px 12px;
    background: linear-gradient(180deg,
        rgba(0, 245, 255, 0.15) 0%,
        rgba(0, 245, 255, 0.08) 100%);
    border: 2px solid rgba(0, 245, 255, 0.4);
    border-radius: 8px;
    text-shadow: 0 0 12px var(--cyan);
    box-shadow:
        0 0 15px rgba(0, 245, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Input number PREMIUM */
.config-row input[type="number"] {
    width: 70px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(20, 20, 35, 0.9), rgba(10, 10, 20, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--cyan);
    font-family: var(--font-pixel);
    text-align: center;
    font-size: 14px;
    transition: all 0.25s ease;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.config-row input[type="number"]:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow:
        0 0 20px rgba(0, 245, 255, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Input text PREMIUM */
.config-row input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(20, 20, 35, 0.9), rgba(10, 10, 20, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-inter);
    font-size: 14px;
    transition: all 0.25s ease;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.config-row input[type="text"]:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow:
        0 0 20px rgba(0, 245, 255, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.config-row input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Select PREMIUM - Style arcade */
.config-row select {
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(20, 20, 35, 0.9), rgba(10, 10, 20, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--white);
    font-family: var(--font-orbitron);
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    min-width: 120px;
    transition: all 0.25s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2300f5ff' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 42px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.config-row select:hover {
    border-color: rgba(0, 245, 255, 0.3);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2300f5ff' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.config-row select:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow:
        0 0 20px rgba(0, 245, 255, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.config-row select option {
    background: #0f0f1a;
    color: var(--white);
    padding: 12px;
    font-weight: 500;
}

/* Toggle switch PREMIUM - Style arcade néon */
.toggle-switch {
    position: relative;
    width: 56px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(30, 30, 45, 0.9), rgba(15, 15, 26, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 2px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(200, 200, 200, 0.8));
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.toggle-switch:hover .toggle-slider {
    border-color: rgba(255, 255, 255, 0.25);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(145deg, var(--green), #2ecc71);
    border-color: rgba(57, 255, 20, 0.6);
    box-shadow:
        0 0 25px rgba(57, 255, 20, 0.5),
        0 0 50px rgba(57, 255, 20, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(26px);
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    box-shadow:
        0 0 15px rgba(255, 255, 255, 0.7),
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Config Chips - Boutons de sélection style arcade PREMIUM */
.config-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

/* Variante 3 boutons - plus petits */
.config-chips.config-chips-3 .config-chip {
    padding: 5px 8px;
    font-size: 7px;
    letter-spacing: 0.5px;
}

/* Variante 5 boutons - encore plus compacts */
.config-chips.config-chips-5 .config-chip {
    padding: 4px 6px;
    font-size: 6px;
    letter-spacing: 0.3px;
    min-width: 40px;
}

.config-chip {
    padding: 6px 10px;
    background: linear-gradient(180deg, rgba(30, 30, 45, 0.9), rgba(15, 15, 26, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-orbitron);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Effet de brillance au survol */
.config-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.4s ease;
}

.config-chip:hover::before {
    left: 100%;
}

.config-chip:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: linear-gradient(180deg, rgba(0, 245, 255, 0.15), rgba(0, 180, 200, 0.1));
    transform: translateY(-2px);
    box-shadow:
        0 4px 15px rgba(0, 245, 255, 0.25),
        0 0 20px rgba(0, 245, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.config-chip.active {
    background: linear-gradient(135deg, var(--cyan) 0%, #00b4d8 50%, var(--cyan) 100%);
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: #0a0a12;
    font-weight: 800;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
    box-shadow:
        0 0 25px rgba(0, 245, 255, 0.6),
        0 0 50px rgba(0, 245, 255, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    animation: chipPulse 2s ease-in-out infinite;
}

@keyframes chipPulse {
    0%, 100% { box-shadow: 0 0 25px rgba(0, 245, 255, 0.6), 0 0 50px rgba(0, 245, 255, 0.3), 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 0 35px rgba(0, 245, 255, 0.8), 0 0 60px rgba(0, 245, 255, 0.4), 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 0 rgba(0, 0, 0, 0.2); }
}

/* Variante Pink pour certaines sections */
.config-chip.active.pink-variant {
    background: linear-gradient(135deg, var(--pink) 0%, #ff6b9d 50%, var(--pink) 100%);
    box-shadow:
        0 0 25px rgba(255, 45, 117, 0.6),
        0 0 50px rgba(255, 45, 117, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

/* Config Number Group - Boutons +/- PREMIUM */
.config-number-group {
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(180deg, rgba(20, 20, 35, 0.9), rgba(10, 10, 20, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.config-num-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--cyan);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.config-num-btn::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 8px;
    background: transparent;
    transition: background 0.2s ease;
}

.config-num-btn:hover {
    color: var(--white);
}

.config-num-btn:hover::after {
    background: rgba(0, 245, 255, 0.15);
}

.config-num-btn:active::after {
    background: rgba(0, 245, 255, 0.3);
}

.config-num-btn.minus {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.config-num-btn.plus {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.config-num-value {
    min-width: 50px;
    text-align: center;
    font-family: var(--font-pixel);
    font-size: 16px;
    color: var(--cyan);
    padding: 0 12px;
    text-shadow: 0 0 12px var(--cyan);
    background: rgba(0, 245, 255, 0.05);
}

/* Bet info box style */
.bet-info-box {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-sm);
    text-align: center;
}

.bet-info-box .bet-info {
    font-family: var(--font-orbitron);
    font-size: 11px;
    color: var(--gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    margin: 0;
}

/* Section joueurs */
.players-section {
    margin-bottom: 20px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.player-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--white-5);
    border-radius: var(--radius-md);
    border: 1px solid var(--white-10);
}

.player-slot.active {
    border-color: var(--cyan);
}

.player-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--white-30);
    flex-shrink: 0;
}

.player-slot input[type="text"] {
    flex: 1;
    padding: 8px;
    background: var(--bg-darker);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-inter);
    font-size: 0.85rem;
}

.player-slot input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cyan);
}

.player-status-badge {
    font-family: var(--font-pixel);
    font-size: 8px;
    padding: 4px 10px;
    background: var(--green);
    color: var(--bg-dark);
    border-radius: var(--radius-full);
}

.config-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.config-buttons .game-btn {
    min-width: 150px;
}

/* ===========================================
   SERVEURS EN LIGNE
   =========================================== */
.server-container {
    padding: 30px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.server-header h2 {
    font-family: var(--font-pixel);
    color: var(--cyan);
    font-size: 1.1rem;
    margin: 0;
}

.servers {
    display: grid;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.no-servers {
    text-align: center;
    color: var(--white-50);
    font-family: var(--font-inter);
    padding: 40px;
}

.server-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    border: 1px solid var(--white-10);
    transition: all var(--transition-base);
}

.server-card:hover {
    border-color: var(--cyan);
}

.server-card .server-info h4 {
    font-family: var(--font-orbitron);
    color: var(--text);
    margin-bottom: 5px;
}

.server-card .server-info p {
    font-family: var(--font-inter);
    color: var(--white-50);
    font-size: 0.85rem;
}

.server-card .server-players {
    font-family: var(--font-orbitron);
    color: var(--cyan);
    font-weight: 600;
}

.server-card button {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--pink), var(--pink-light));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-orbitron);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.server-card button:hover {
    box-shadow: var(--shadow-pink);
}

/* ===========================================
   LOBBY
   =========================================== */
.lobby-container {
    padding: 30px;
    min-width: 500px;
    text-align: center;
}

.lobby-container h2 {
    font-family: var(--font-pixel);
    color: var(--cyan);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.lobby-players {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.lobby-player {
    padding: 15px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--white-10);
}

.lobby-player .player-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.lobby-player .player-details {
    flex: 1;
    text-align: left;
}

.lobby-player .player-name {
    font-family: var(--font-orbitron);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lobby-player .player-status {
    font-family: var(--font-inter);
    font-size: 0.8rem;
    color: var(--white-50);
}

.lobby-player.ready .player-status {
    color: var(--green);
}

.lobby-player.host::after {
    content: '👑';
    font-size: 1.2rem;
}

.lobby-info {
    font-family: var(--font-inter);
    color: var(--white-50);
    margin-bottom: 25px;
}

.lobby-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.lobby-buttons .game-btn {
    min-width: 150px;
}

/* ===========================================
   SIDEBAR DU JEU
   =========================================== */
.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-md);
    padding: 15px;
}

.sidebar-title {
    font-family: var(--font-pixel);
    color: var(--cyan);
    font-size: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--white-10);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Stats grid */
.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--bg-darker);
    border-radius: var(--radius-sm);
}

.stat-icon {
    font-size: 0.9rem;
}

.stat-label {
    flex: 1;
    font-family: var(--font-inter);
    color: var(--white-50);
    font-size: 0.8rem;
}

.stat-value {
    font-family: var(--font-orbitron);
    color: var(--cyan);
    font-weight: 600;
    font-size: 0.9rem;
}

/* PM Display in controls */
.pm-display {
    font-family: var(--font-orbitron);
    font-size: 1rem;
    color: var(--text);
}

.pm-display span {
    color: var(--yellow);
    font-weight: 700;
    font-size: 1.2rem;
}

/* ===========================================
   NOTIFICATION
   =========================================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: var(--bg-card);
    border: 1px solid var(--cyan);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-cyan);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    font-family: var(--font-inter);
}

.notification.hidden {
    display: none;
}

.notification.error {
    border-color: var(--pink);
    box-shadow: var(--shadow-pink);
}

.notification.success {
    border-color: var(--green);
    box-shadow: var(--shadow-green);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===========================================
   MODAL DES REGLES
   =========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

/* Rules Modal */
.rules-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rules-modal.hidden {
    display: none;
}

.rules-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 18, 0.9);
    backdrop-filter: blur(10px);
}

.rules-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: var(--bg-card);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-lg);
    padding: 25px;
    overflow-y: auto;
    z-index: 2001;
}

.rules-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.rules-close:hover {
    color: var(--pink);
}

.rules-title {
    font-family: var(--font-pixel);
    color: var(--cyan);
    font-size: 1.2rem;
    margin: 0 0 20px 0;
}

.rules-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--white-10);
    padding-bottom: 10px;
}

.rules-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.rules-tab:hover {
    color: var(--text-primary);
}

.rules-tab.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

.rules-panel {
    display: none;
}

.rules-panel.active {
    display: block;
}

.rules-panel h3 {
    font-family: var(--font-ui);
    color: var(--pink);
    font-size: 1rem;
    margin: 15px 0 10px 0;
}

.rules-panel ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.rules-panel li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.rules-panel li strong {
    color: var(--text-primary);
}

.rules-panel p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 18, 0.9);
    backdrop-filter: blur(10px);
}

.rules-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-lg);
}

.rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--white-10);
}

.rules-header h2 {
    font-family: var(--font-pixel);
    color: var(--cyan);
    font-size: 1rem;
    margin: 0;
}

.rules-close-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 45, 117, 0.2);
    border: 1px solid var(--pink);
    border-radius: 50%;
    color: var(--pink);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all var(--transition-base);
}

.rules-close-btn:hover {
    background: var(--pink);
    color: white;
}

.rules-tabs {
    display: flex;
    background: var(--bg-darker);
    border-bottom: 1px solid var(--white-10);
    padding: 0 15px;
    gap: 5px;
}

.rules-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    font-family: var(--font-orbitron);
    color: var(--white-50);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border-bottom: 2px solid transparent;
}

.rules-tab:hover {
    color: var(--text);
}

.rules-tab.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

.rules-content {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
}

.rules-panel {
    display: none;
}

.rules-panel.active {
    display: block;
}

/* Rules Visual Grid */
.rules-visual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.rule-card {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--white-10);
    transition: all var(--transition-base);
}

.rule-card:hover {
    transform: translateY(-3px);
    border-color: var(--cyan);
}

.rule-card.objective {
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--bg-darker) 0%, rgba(255, 215, 0, 0.1) 100%);
}

.rule-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.rule-title {
    font-family: var(--font-orbitron);
    font-weight: 600;
    color: var(--cyan);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.rule-desc {
    font-family: var(--font-inter);
    font-size: 0.8rem;
    color: var(--white-50);
}

/* Flow Steps */
.rules-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.flow-num {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--pink), var(--pink-light));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-orbitron);
    font-weight: 700;
    font-size: 1rem;
}

.flow-text {
    font-family: var(--font-inter);
    font-size: 0.8rem;
    color: var(--text);
}

.flow-arrow {
    font-size: 1.5rem;
    color: var(--cyan);
}

/* Controls Visual */
.controls-visual {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.keyboard-section h3,
.local-controls-grid h3 {
    font-family: var(--font-orbitron);
    color: var(--cyan);
    font-size: 0.95rem;
    margin-bottom: 15px;
    text-align: center;
}

.keyboard-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
}

.key-row {
    display: flex;
    gap: 8px;
}

.key-box {
    width: 50px;
    height: 50px;
    background: var(--white-10);
    border: 1px solid var(--white-20);
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-orbitron);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.key-box.wide {
    width: 100px;
}

.key-actions {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.key-action {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-inter);
    font-size: 0.85rem;
}

/* Player Keys Grid */
.player-keys-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.player-keys {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    border-left: 4px solid;
}

.player-keys.p1 { border-left-color: var(--player-yellow); }
.player-keys.p2 { border-left-color: var(--player-blue); }
.player-keys.p3 { border-left-color: var(--player-pink); }
.player-keys.p4 { border-left-color: var(--player-orange); }

.player-badge {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-pixel);
    font-weight: 700;
    font-size: 10px;
}

.p1 .player-badge { background: var(--player-yellow); color: black; }
.p2 .player-badge { background: var(--player-blue); color: var(--bg-dark); }
.p3 .player-badge { background: var(--player-pink); color: white; }
.p4 .player-badge { background: var(--player-orange); color: black; }

.keys-mini {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: var(--font-inter);
    font-size: 0.75rem;
    color: var(--white-50);
}

.keys-mini span:first-child {
    color: var(--text);
    font-weight: 600;
}

/* Local Controls - New Design */
.controls-note {
    color: var(--white-50);
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
}

.local-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.local-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--cyan);
}

.local-option .option-icon {
    font-size: 1.3rem;
}

.local-option .option-text {
    font-family: var(--font-inter);
    color: var(--text);
    font-size: 0.85rem;
}

.controls-tip {
    color: var(--yellow);
    font-size: 0.75rem;
    text-align: center;
    background: rgba(255, 215, 0, 0.1);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

/* Powerups Split */
.powerups-split {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.powerups-column {
    flex: 1;
    padding: 15px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
}

.powerups-column h3 {
    font-family: var(--font-orbitron);
    text-align: center;
    font-size: 1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid;
}

.powerups-column.bonus h3 {
    color: var(--green);
    border-bottom-color: var(--green);
}

.powerups-column.malus h3 {
    color: var(--pink);
    border-bottom-color: var(--pink);
}

.powerups-divider {
    width: 2px;
    background: linear-gradient(180deg, transparent, var(--white-10), transparent);
}

.items-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--white-5);
    border-radius: var(--radius-sm);
}

.item-row span:first-child {
    font-size: 1.2rem;
}

.item-row span:last-child {
    font-family: var(--font-inter);
    font-size: 0.85rem;
    color: var(--text);
}

.bonus .item-row {
    border-left: 3px solid var(--green);
}

.malus .item-row {
    border-left: 3px solid var(--pink);
}

.malus-warning {
    margin-top: 15px;
    text-align: center;
    padding: 10px;
    background: rgba(255, 45, 117, 0.2);
    border-radius: var(--radius-sm);
    color: var(--pink);
    font-family: var(--font-orbitron);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Terrain Grid */
.terrain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.terrain-card {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: 15px;
    text-align: center;
    border: 1px solid var(--white-10);
}

.terrain-visual {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: var(--radius-sm);
}

.terrain-card.wood .terrain-visual {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 50%, #8B4513 100%);
    border: 2px solid #654321;
}

.terrain-card.glass .terrain-visual {
    background: linear-gradient(135deg, rgba(135, 206, 235, 0.6) 0%, rgba(173, 216, 230, 0.8) 100%);
    border: 2px solid #87CEEB;
}

.terrain-card.steel .terrain-visual {
    background: linear-gradient(135deg, #555 0%, #888 50%, #555 100%);
    border: 2px solid #333;
}

.terrain-card.ice .terrain-visual {
    background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-light) 50%, var(--cyan) 100%);
    border: 2px solid var(--cyan);
}

.terrain-card.trap .terrain-visual {
    background: linear-gradient(135deg, #8B0000 0%, var(--pink) 50%, #8B0000 100%);
    border: 2px solid var(--pink);
    position: relative;
}

.terrain-card.trap .terrain-visual::after {
    content: '!';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    color: white;
}

.terrain-card.electricity .terrain-visual {
    background: linear-gradient(135deg, var(--yellow) 0%, var(--gold) 50%, var(--yellow) 100%);
    border: 2px solid var(--gold);
    animation: electric-pulse 1s infinite;
}

@keyframes electric-pulse {
    0%, 100% { box-shadow: 0 0 5px var(--yellow); }
    50% { box-shadow: 0 0 15px var(--yellow), 0 0 25px var(--gold); }
}

.terrain-name {
    font-family: var(--font-orbitron);
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.terrain-info {
    font-family: var(--font-inter);
    font-size: 0.75rem;
    color: var(--white-50);
}

.terrain-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid var(--gold);
}

.tip-icon {
    font-size: 1.5rem;
}

.terrain-tip span:last-child {
    font-family: var(--font-inter);
    color: var(--gold);
    font-size: 0.85rem;
}

/* ===========================================
   MODAL CONFIRMATION QUITTER
   =========================================== */
#quit-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 18, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#quit-confirm-modal.hidden {
    display: none;
}

.quit-modal {
    background: var(--bg-card);
    border: 2px solid var(--pink);
    border-radius: var(--radius-lg);
    padding: 30px 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 40px rgba(255, 45, 117, 0.3);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.quit-modal h2 {
    font-family: var(--font-orbitron);
    font-size: 1.3rem;
    color: var(--pink);
    margin-bottom: 15px;
}

.quit-modal p {
    font-family: var(--font-inter);
    color: var(--white-60);
    font-size: 1rem;
    margin-bottom: 25px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-buttons .game-btn {
    min-width: 120px;
}

.game-btn.danger {
    background: linear-gradient(135deg, rgba(255, 45, 117, 0.3), rgba(255, 45, 117, 0.1));
    border: 1px solid var(--pink);
    color: var(--pink);
}

.game-btn.danger:hover {
    background: linear-gradient(135deg, rgba(255, 45, 117, 0.5), rgba(255, 45, 117, 0.2));
    box-shadow: 0 0 20px rgba(255, 45, 117, 0.4);
}

/* ===========================================
   ÉCRAN DE CHARGEMENT JEU
   =========================================== */
#game-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 18, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.game-loading-content {
    text-align: center;
    animation: loadingPulse 1s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.98); }
}

.game-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--white-20);
    border-top-color: var(--cyan);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.game-loading-text {
    font-family: var(--font-orbitron);
    font-size: 1.2rem;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
}

/* ===========================================
   SCROLLBAR
   =========================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--white-20);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

/* ===========================================
   SHOP / BOUTIQUE
   =========================================== */
.shop-container {
    padding: 30px;
    max-width: 900px;
    width: 90%;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--white-10);
}

.shop-header h2 {
    font-family: var(--font-pixel);
    color: var(--cyan);
    font-size: 1.1rem;
}

.shop-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-orbitron);
    font-size: 1.2rem;
    color: var(--yellow);
    font-weight: 700;
}

.gold-icon {
    font-size: 1.4rem;
}

.shop-packs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.shop-pack {
    background: var(--bg-darker);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.shop-pack:hover {
    border-color: var(--cyan);
    transform: translateY(-5px);
    box-shadow: var(--shadow-cyan);
}

.shop-pack.popular {
    border-color: var(--pink);
    position: relative;
}

.shop-pack.popular::before {
    content: 'Populaire';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--pink), var(--pink-light));
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-pixel);
    font-size: 8px;
    color: white;
}

.pack-gold {
    font-family: var(--font-pixel);
    font-size: 1.5rem;
    color: var(--yellow);
    margin-bottom: 5px;
}

.pack-label {
    font-family: var(--font-orbitron);
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 10px;
}

.pack-price {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-light));
    color: var(--bg-dark);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-family: var(--font-orbitron);
    font-weight: 700;
    display: inline-block;
}

.shop-history {
    background: var(--bg-darker);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.shop-history h3 {
    font-family: var(--font-orbitron);
    color: var(--white-50);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.history-list {
    max-height: 150px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--white-10);
    font-family: var(--font-inter);
    font-size: 0.85rem;
}

.no-history {
    font-family: var(--font-inter);
    color: var(--white-50);
    font-style: italic;
}

/* ===========================================
   USER INFO HEADER
   =========================================== */
.user-info-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-gold {
    font-family: var(--font-orbitron);
    color: var(--yellow);
    font-weight: 700;
}

.user-grade {
    font-family: var(--font-pixel);
    color: var(--cyan);
    font-size: 8px;
    padding: 4px 10px;
    background: var(--white-5);
    border-radius: var(--radius-full);
}

.user-buttons {
    display: flex;
    gap: 10px;
    margin-left: 15px;
}

.btn-shop {
    background: var(--yellow);
    color: var(--bg-dark);
    border: none;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition-base);
}

.btn-shop:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-gold);
}

/* ===========================================
   BETTING / PARIS
   =========================================== */
.betting-section {
    border: 1px dashed var(--yellow);
    background: rgba(255, 255, 0, 0.05);
}

.betting-section h3 {
    color: var(--yellow);
    border-bottom-color: var(--yellow);
}

.bet-info {
    font-family: var(--font-inter);
    font-size: 0.8rem;
    color: var(--white-50);
    margin: 0;
    text-align: center;
}

.bet-info-box {
    margin-top: 15px;
    padding: 12px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 0, 0.3);
}

.bet-distribution {
    display: flex;
    justify-content: space-around;
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 0, 0.1);
    border-radius: var(--radius-sm);
}

.bet-distribution span {
    font-family: var(--font-orbitron);
    color: var(--yellow);
    font-size: 0.75rem;
    font-weight: 600;
}

.bet-distribution small {
    color: var(--cyan);
}

/* Server name input styling */
.server-name-section {
    margin-bottom: 20px;
    background: transparent;
    border: none;
    padding: 0;
}

.server-name-input {
    max-width: 500px;
    margin: 0 auto;
}

.server-name-input input {
    width: 100%;
    padding: 15px 20px;
    font-family: var(--font-orbitron);
    font-size: 1.1rem;
    text-align: center;
    background: var(--bg-darker);
    border: 1px solid var(--cyan);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: all var(--transition-base);
}

.server-name-input input::placeholder {
    color: var(--white-30);
}

.server-name-input input:focus {
    outline: none;
    border-color: var(--pink);
    box-shadow: var(--shadow-pink);
}

/* Lobby bet display */
.lobby-bet-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 0, 0.1);
    border: 1px solid var(--yellow);
    border-radius: var(--radius-md);
    margin-top: 10px;
}

.lobby-bet-info .bet-amount {
    font-family: var(--font-orbitron);
    color: var(--yellow);
    font-size: 1.1rem;
    font-weight: 700;
}

/* ===========================================
   GAME OVER RANKINGS & REWARDS
   =========================================== */
.game-over-rankings {
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: var(--white-5);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--white-10);
}

.ranking-item.rank-1 {
    border-left-color: var(--gold);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, var(--white-5) 100%);
}

.ranking-item.rank-2 {
    border-left-color: #c0c0c0;
}

.ranking-item.rank-3 {
    border-left-color: #cd7f32;
}

.ranking-position {
    font-family: var(--font-pixel);
    font-size: 1rem;
    min-width: 30px;
}

.ranking-position.gold { color: var(--gold); }
.ranking-position.silver { color: #c0c0c0; }
.ranking-position.bronze { color: #cd7f32; }

.ranking-name {
    flex: 1;
    margin-left: 15px;
    font-family: var(--font-orbitron);
}

.ranking-rewards {
    display: flex;
    gap: 15px;
}

.ranking-gold {
    font-family: var(--font-orbitron);
    color: var(--yellow);
}

.ranking-xp {
    font-family: var(--font-orbitron);
    color: var(--cyan);
}

.game-over-rewards {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(255, 45, 117, 0.1) 100%);
    border: 1px solid var(--cyan);
    border-radius: var(--radius-md);
    text-align: center;
}

.game-over-rewards h3 {
    font-family: var(--font-pixel);
    color: var(--cyan);
    font-size: 10px;
    margin-bottom: 15px;
}

.rewards-display {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.reward-icon {
    font-size: 2rem;
}

.reward-value {
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    color: var(--green);
}

.reward-label {
    font-family: var(--font-orbitron);
    font-size: 0.8rem;
    color: var(--white-50);
}

/* ===========================================
   POWERUP NOTIFICATIONS (IN-GAME)
   =========================================== */
.powerup-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    z-index: 1000;
    animation: powerupPop 1.5s ease-out forwards;
    pointer-events: none;
}

.powerup-notification.positive {
    border: 2px solid var(--green);
    box-shadow: var(--shadow-green);
}

.powerup-notification.negative {
    border: 2px solid var(--pink);
    box-shadow: var(--shadow-pink);
}

.powerup-notification .icon {
    font-size: 3rem;
    display: block;
    text-align: center;
}

.powerup-notification .text {
    font-family: var(--font-orbitron);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
}

.powerup-notification.positive .text {
    color: var(--green);
}

.powerup-notification.negative .text {
    color: var(--pink);
}

@keyframes powerupPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    40% {
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -70%) scale(0.8);
    }
}

/* ===========================================
   SHRINK / RETRECISSEMENT TERRAIN
   =========================================== */
.shrink-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 45, 117, 0.2);
    border: 1px solid var(--pink);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    animation: shrinkPulse 2s ease-in-out infinite;
}

.shrink-info.warning {
    animation: shrinkWarning 0.5s ease-in-out infinite;
    border-color: var(--pink);
    background: rgba(255, 45, 117, 0.3);
}

.shrink-icon {
    font-size: 1.2rem;
}

.shrink-countdown {
    font-family: var(--font-orbitron);
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    min-width: 30px;
    text-align: center;
}

@keyframes shrinkPulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 45, 117, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 45, 117, 0.6);
    }
}

@keyframes shrinkWarning {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ===========================================
   MODAL MANETTE / CONTROLLER
   =========================================== */
.controller-btn {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-light));
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-left: 15px;
}

.controller-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-cyan);
}

.controller-modal-content {
    max-width: 450px;
    width: 90%;
    padding: 25px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--white-10);
    border-radius: var(--radius-lg);
}

/* Modal horizontal à 2 colonnes */
.controller-modal-horizontal {
    max-width: 750px;
    width: 95%;
}

.controller-modal-columns {
    display: flex;
    gap: 30px;
    text-align: left;
}

.controller-col {
    flex: 1;
    min-width: 0;
}

.controller-col-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-right: 20px;
    border-right: 1px solid var(--white-10);
}

.controller-col-qr .controller-qr-container {
    margin: 0 0 15px 0;
    width: 200px;
    height: 200px;
}

.controller-col-qr .controller-code-display {
    margin: 10px 0;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.controller-code-label {
    font-family: var(--font-inter);
    color: var(--white-50);
    font-size: 0.9rem;
}

.controller-col-qr .controller-url {
    width: 100%;
    font-size: 0.75rem;
}

.controller-col-players {
    display: flex;
    flex-direction: column;
}

.controller-col-players h4 {
    font-family: var(--font-orbitron);
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: center;
}

.connected-players-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 180px;
}

.connected-players-grid .no-controllers {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    gap: 10px;
    color: var(--white-30);
}

.no-controllers-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.connected-player-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--white-5), var(--white-10));
    border: 1px solid var(--white-20);
    border-radius: var(--radius-md);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.connected-player-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.connected-player-name {
    font-family: var(--font-orbitron);
    font-size: 0.9rem;
    color: var(--text);
    flex: 1;
}

.connected-player-status {
    font-family: var(--font-inter);
    font-size: 0.75rem;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 5px;
}

.connected-player-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Responsive pour le modal horizontal */
@media (max-width: 600px) {
    .controller-modal-horizontal {
        max-width: 95%;
    }

    .controller-modal-columns {
        flex-direction: column;
        gap: 20px;
    }

    .controller-col-qr {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--white-10);
        padding-bottom: 20px;
    }

    .controller-col-qr .controller-qr-container {
        width: 150px;
        height: 150px;
    }
}

.controller-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--white-10);
}

.controller-modal-header h2 {
    font-family: var(--font-pixel);
    font-size: 0.9rem;
    color: var(--text);
}

.controller-close-btn {
    background: none;
    border: none;
    color: var(--white-50);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-base);
}

.controller-close-btn:hover {
    color: var(--pink);
}

.controller-instructions {
    font-family: var(--font-inter);
    color: var(--white-50);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.controller-code-display {
    background: var(--bg-darker);
    border: 2px solid var(--cyan);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 20px 0;
}

.controller-code {
    font-family: var(--font-pixel);
    font-size: 2rem;
    letter-spacing: 10px;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
}

.controller-qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: #1a1a2e;
    border-radius: var(--radius-lg);
    border: 2px solid var(--cyan);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
}

.controller-qr-container canvas {
    border-radius: var(--radius-sm);
}

.controller-url {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
    padding: 10px;
    background: var(--white-5);
    border-radius: var(--radius-sm);
    font-family: var(--font-inter);
    font-size: 0.8rem;
    color: var(--white-50);
}

.controller-url span {
    word-break: break-all;
}

.copy-btn {
    background: var(--white-10);
    border: 1px solid var(--white-20);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.copy-btn:hover {
    background: var(--cyan);
    border-color: var(--cyan);
}

.controller-connected-list {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--white-10);
}

.controller-connected-list h4 {
    font-family: var(--font-orbitron);
    color: var(--white-50);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

#connected-controllers {
    min-height: 40px;
}

.no-controllers {
    font-family: var(--font-inter);
    color: var(--white-50);
    font-style: italic;
    font-size: 0.8rem;
}

.connected-controller {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--white-5);
    border-radius: var(--radius-sm);
    margin-bottom: 5px;
}

.connected-controller .player-name {
    font-family: var(--font-orbitron);
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.connected-controller .status {
    font-family: var(--font-orbitron);
    color: var(--green);
    font-size: 0.8rem;
}

.controller-modal-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--white-10);
}

/* ===========================================
   SECTION MANETTES INLINE (CONFIG)
   =========================================== */

.controllers-section {
    margin-bottom: 20px;
}

.controllers-inline {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--white-5), transparent);
    border: 1px solid var(--cyan);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.15);
}

.controller-qr-inline {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.qr-code-small {
    width: 100px;
    height: 100px;
    padding: 8px;
    background: #1a1a2e;
    border-radius: var(--radius-md);
    border: 2px solid var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-small canvas,
.qr-code-small img {
    max-width: 100%;
    max-height: 100%;
}

.controller-info-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.controller-code-inline {
    font-family: var(--font-pixel);
    font-size: 1.4rem;
    letter-spacing: 6px;
    color: var(--cyan);
    text-shadow: 0 0 8px var(--cyan);
    background: var(--bg-darker);
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--white-20);
}

.copy-btn-small {
    background: var(--white-10);
    border: 1px solid var(--white-20);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.9rem;
}

.copy-btn-small:hover {
    background: var(--cyan);
    border-color: var(--cyan);
}

.connected-inline {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    min-height: 60px;
}

.inline-placeholder {
    font-family: var(--font-inter);
    color: var(--white-40);
    font-size: 0.85rem;
    font-style: italic;
}

.connected-inline .connected-player-card {
    padding: 8px 12px;
}

.connected-inline .connected-player-name {
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .controllers-inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .controller-qr-inline {
        width: 100%;
        justify-content: center;
    }

    .qr-code-small {
        width: 80px;
        height: 80px;
    }

    .connected-inline {
        width: 100%;
        justify-content: center;
    }
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 900px) {
    .mode-columns {
        flex-direction: column;
        align-items: center;
    }

    .mode-card {
        max-width: 400px;
        width: 100%;
    }

    .config-grid-unified {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-back-site {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .game-subtitle {
        font-size: 0.9rem;
        letter-spacing: 3px;
    }

    .config-grid-unified {
        grid-template-columns: 1fr;
    }

    .players-grid {
        grid-template-columns: 1fr;
    }

    .rules-visual-grid {
        grid-template-columns: 1fr;
    }

    .terrain-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .powerups-split {
        flex-direction: column;
    }

    .powerups-divider {
        width: 100%;
        height: 2px;
    }

    .shop-packs {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   RESPONSIVE MOBILE PETIT ECRAN (< 600px)
   =========================================== */
@media (max-width: 600px) {
    /* Colonne gauche config - plus compacte */
    .config-left-panel {
        padding: 16px 12px;
        gap: 12px;
    }

    /* QR code reduit */
    .config-qr-code {
        width: 140px;
        height: 140px;
        max-width: 140px;
    }

    /* Code 6 chiffres reduit */
    .config-code-display {
        font-size: 20px;
        letter-spacing: 6px;
        padding: 10px 14px;
    }

    /* Badge mode plus compact */
    .config-mode-badge {
        font-size: 10px;
        padding: 6px 16px;
        letter-spacing: 2px;
    }
}
