/* --- VARIABLES NÉON --- */
html {
    scroll-behavior: smooth;
}

.screen {
    transition: opacity 0.5s ease-in-out;
}


:root {
    --cyan: #00f3ff;
    --magenta: #ff00ff;
    --bg-color: #050505;
    --glass: rgba(255, 255, 255, 0.05);
    --cell-bg: #111;
}

/* --- BASE & CENTRAGE --- */
body {
    margin: 0;
    background-color: var(--bg-color);
    color: white;
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    justify-content: center; /* Centre horizontalement sur grand écran */
    align-items: center;     /* Centre verticalement */
    min-height: 100vh;
}

#app-container {
    width: 100%;
    max-width: 600px;        /* Empêche le bloc de devenir trop large sur PC */
    display: flex;
    flex-direction: column;
    align-items: center;    
    justify-content: center;
    padding: 20px;
}

/* --- ÉCRANS --- */
.screen {
    width: 100%;
    max-width: 600px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hidden {
    display: none !important;
}

/* --- CARTE DE CONFIGURATION (Look De Luxe) --- */
.glass-card {
    background: var(--glass);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: 100%;             /* Utilise toute la largeur du container (max 600px) */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;     /* Centre les boutons radio et le bouton commencer */
}

.neon-text {
    color: var(--cyan);
    text-shadow: 0 0 15px var(--cyan), 0 0 30px rgba(0, 243, 255, 0.5);
    font-size: 2.5rem;
    margin: 0;
    letter-spacing: 5px;
}

h3 {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 20px 0 10px;
}

/* --- BOUTONS RADIO CENTRÉS --- */
.radio-group {
    display: flex;
    justify-content: center; /* Aligne les options au centre */
    gap: 20px;
    margin-bottom: 10px;
}

.radio-group label {
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- GRILLE DE JEU --- */
#game-grid {
    display: grid;
    gap: 5px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.15);
    margin: 20px auto;
}

.grid-cell {
    background-color: var(--cell-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-cell:active {
    transform: scale(0.9);
}

/* États des cellules */
.grid-cell.selected {
    border-color: var(--magenta);
    box-shadow: 0 0 15px var(--magenta);
    background: rgba(255, 0, 255, 0.1);
    z-index: 10;
}

.grid-cell.correct {
    border-color: #00ff88;
    box-shadow: inset 0 0 5px rgba(0, 255, 136, 0.2);
}

.grid-cell.wrong {
    border-color: #ff3333;
}

.grid-cell.locked {
    opacity: 0.6;
    background: #222;
    cursor: not-allowed;
}

/* --- COULEURS DES BASES (NÉON) --- */
.base-1 { color: #ff3333; text-shadow: 0 0 5px #ff3333; }
.base-2 { color: #3399ff; text-shadow: 0 0 5px #3399ff; }
.base-3 { color: #33ff33; text-shadow: 0 0 5px #33ff33; }
.base-4 { color: #ff33ff; text-shadow: 0 0 5px #ff33ff; }
.base-5 { color: #ff9933; text-shadow: 0 0 5px #ff9933; }
.base-6 { color: #33ffff; text-shadow: 0 0 5px #33ffff; }
.base-7 { color: #ff3388; text-shadow: 0 0 5px #ff3388; }
.base-8 { color: #9933ff; text-shadow: 0 0 5px #9933ff; }
.base-9 { color: #ffffff; text-shadow: 0 0 5px #ffffff; }

/* --- BARRE DE STATS & BOUTONS --- */
.stats-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: bold;
    color: var(--cyan);
}

.action-bar {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.main-btn {
    background: var(--cyan);
    color: black;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 0 20px var(--cyan);
    transition: 0.3s;
    margin-top: 10px;
}

.main-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--cyan);
}

.sub-btn {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: 0.2s;
}

.sub-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

#status-msg {
    height: 20px;
    font-size: 0.9rem;
    color: var(--magenta);
    margin-top: 10px;
}
