/* --- Base Mobile-First --- */
body.game-page {
    background-color: #0f172a;
    color: #f8fafc;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre tout horizontalement */
    min-height: 100vh;
}

header {
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    background: #1e293b;
    border-bottom: 2px solid #334155;
}

/* --- Barre de Stats (Haut) --- */
.game-stats-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
    background: #0f172a;
    width: 100%;
}

/* --- Container Principal --- */
#game-content {
    width: 100%;
    max-width: 500px; /* Largeur max pour mobile/tablette */
    padding: 1rem;
    box-sizing: border-box;
}

/* --- La Carte de Jeu --- */
.game-card {
    background: #1e293b;
    padding: 1.2rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Espace automatique entre les éléments enfants */
}

/* --- Image responsive --- */
.car-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10; /* Garde une proportion propre sur mobile */
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid #334155;
    box-sizing: border-box;
}

.car-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: #334155;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
}

/* --- Formulaire centré verticalement --- */
.game-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.game-form label {
    text-align: center;
    font-weight: 600;
    color: #94a3b8;
}

.game-form input {
    width: 100%;
    padding: 15px; /* Plus grand pour les doigts sur mobile */
    border-radius: 12px;
    border: 2px solid #475569;
    background: #0f172a;
    color: white;
    font-size: 1.1rem;
    text-align: center; /* Centre le texte tapé */
    box-sizing: border-box;
    outline: none;
}

.game-form input:focus {
    border-color: #0b74ff;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #0b74ff;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.1s;
}

.submit-btn:active {
    transform: scale(0.98); /* Effet de pression sur mobile */
}

/* --- Résultats Pop-up --- */
.result {
    display: none;
    padding: 1.2rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 0.5rem;
    animation: slideIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.result.show { display: block; }
.result.correct { background: #059669; }
.result.partial { background: #d97706; }
.result.incorrect { background: #dc2626; }

/* --- Écran de fin --- */
.score-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: #1e293b;
    border-radius: 24px;
    width: 100%;
    box-sizing: border-box;
}

.final-score-value {
    font-size: 5rem;
    color: #0b74ff;
    line-height: 1;
    margin: 1rem 0;
    text-shadow: 0 0 20px rgba(11, 116, 255, 0.3);
}

.play-again-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

@keyframes slideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}


:root {
  --main-bg: #0f172a;
  --card-bg: #1e293b;
  --accent-color: #0b74ff;
  --text-color: #f8fafc;
}

/* Thème Neon (Vert/Violet) */
body.theme-neon {
  --main-bg: #0d0221;
  --card-bg: #240b36;
  --accent-color: #00ff88;
}

/* Thème Stealth (Noir/Gris) */
body.theme-stealth {
  --main-bg: #0a0a0a;
  --card-bg: #1a1a1a;
  --accent-color: #ffffff;
}

/* Thème Classic (Rouge Course) */
body.theme-classic {
  --main-bg: #1a1a1a;
  --card-bg: #2d2d2d;
  --accent-color: #e11d48;
}

/* Style des boutons dans le profil */
.theme-selector {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.theme-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid white;
  cursor: pointer;
}

.theme-dot.original { background: #0b74ff; }
.theme-dot.neon { background: #00ff88; }
.theme-dot.stealth { background: #555555; }
.theme-dot.classic { background: #e11d48; }