/* --- CONFIGURATION ZENITH COBRA : STABILITÉ & PROPRETÉ --- */
* {
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Orbitron', sans-serif;
    overflow: hidden;
    color: #fff;
}

#game-container {
    position: relative;
    width: 100vw;
    max-width: 450px;
    height: 100vh;
    background: #010101;
    overflow: hidden;
    border: 2px solid #00f2ff;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
}

/* --- HUD (DATA EN TEMPS RÉEL) --- */
#ui-layer {
    position: absolute;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    z-index: 10;
    pointer-events: none;
}

.stat-box {
    background: rgba(0, 0, 0, 0.85);
    padding: 8px 15px;
    border: 1px solid #00f2ff;
    color: #00f2ff;
    font-size: 0.8rem;
    text-shadow: 0 0 5px #00f2ff;
    letter-spacing: 1px;
}

/* --- MENUS --- */
#menu, #game-over {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 25px;
    text-align: center;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    letter-spacing: 5px;
    text-shadow: 0 0 15px #ff00ff;
}

/* --- SCORE & TOP 5 (GAME OVER) --- */
#final-score {
    font-size: 1.1rem;
    margin: 10px 0;
    color: #fff;
}

#final-score-value {
    color: #ff3131; /* Rouge alerte pour la distance finale */
    font-weight: 900;
    font-size: 1.6rem;
    text-shadow: 0 0 10px rgba(255, 49, 49, 0.6);
}

.score-board {
    width: 100%;
    max-width: 300px;
    background: rgba(0, 242, 255, 0.05);
    padding: 12px;
    margin: 15px 0;
    border: 1px solid rgba(0, 242, 255, 0.2);
}

.score-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
    font-size: 0.85rem;
    color: #39ff14; /* Vert néon pour le classement */
}

/* --- BOUTONS --- */
.btn-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}

.btn-main {
    padding: 15px 30px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    background: transparent;
    border: 2px solid #39ff14;
    color: #39ff14;
    cursor: pointer;
    text-shadow: 0 0 10px #39ff14;
    transition: 0.2s;
    text-transform: uppercase;
}

.btn-main:hover {
    background: #39ff14;
    color: #000;
}

.btn-menu {
    border-color: #00f2ff;
    color: #00f2ff;
    text-shadow: 0 0 10px #00f2ff;
    padding: 10px;
    font-size: 0.8rem;
}

.btn-menu:hover {
    background: #00f2ff;
    color: #000;
}

/* --- BOUTIQUE --- */
#skin-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    margin-bottom: 20px;
    width: 100%;
}

#buy-button {
    background: transparent;
    border: 1px solid #f1c40f;
    color: #f1c40f;
    padding: 5px 10px;
    font-size: 0.7rem;
    cursor: pointer;
}

#buy-button:disabled {
    border-color: #39ff14;
    color: #39ff14;
}

.arrow {
    background: transparent;
    border: 1px solid #00f2ff;
    color: #00f2ff;
    width: 35px;
    height: 35px;
    cursor: pointer;
}

.instructions {
    margin-top: 20px;
    color: rgba(0, 242, 255, 0.5);
    font-size: 0.6rem;
    line-height: 1.5;
    text-transform: uppercase;
}