body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #f4a460 0%, #daa520 100%);
    font-family: 'Courier New', monospace;
}

#gameContainer {
    text-align: center;
    position: relative;
}

h1 {
    color: #8b4513;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

/* BOUTON MENU en haut à droite */
#menuButton {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

#menuButton button {
    background: linear-gradient(135deg, #daa520, #b8860b);
    border: 3px solid #8b4513;
    color: #1a0e00;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#menuButton button:hover {
    background: linear-gradient(135deg, #ffd700, #daa520);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(218, 165, 32, 0.5);
}

#menuButton button:active {
    transform: translateY(0px);
}

#gameCanvas {
    border: 3px solid #8b4513;
    background: linear-gradient(to bottom, #ffd700 0%, #f4a460 50%, #daa520 100%);
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#score {
    font-size: 24px;
    color: #8b4513;
    margin: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    font-weight: bold;
}

#gameOver {
    font-size: 32px;
    color: #8b4513;
    margin: 20px;
    display: none;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    font-weight: bold;
}

#instructions {
    color: #8b4513;
    margin: 15px;
    font-size: 16px;
}

/* PANTALLA GAME OVER delante del juego */
#gameOverScreen {
    display: none;
    position: fixed;
    z-index: 10;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 6, 0, 0.87);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
}

#gameOverScreen.active {
    display: flex;
}

.gameOverContent {
    background: #fffbe1;
    border: 4px solid #8b4513;
    border-radius: 18px;
    padding: 40px 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    text-align: center;
}

.gameOverContent h2 {
    color: #b22323;
    font-size: 55px;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
}

.gameOverContent p {
    color: #222;
    font-size: 28px;
    margin: 0 0 30px 0;
}

/* BOUTONS GAME OVER */
.gameOverButtons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.gameOverButtons button {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    padding: 15px 30px;
    border: 3px solid #8b4513;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.btn-restart {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.btn-restart:hover {
    background: linear-gradient(135deg, #66BB6A, #4CAF50);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-leaderboard {
    background: linear-gradient(135deg, #ffd700, #daa520);
    color: #1a0e00;
}

.btn-leaderboard:hover {
    background: linear-gradient(135deg, #ffed4e, #ffd700);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-menu {
    background: linear-gradient(135deg, #daa520, #b8860b);
    color: #1a0e00;
}

.btn-menu:hover {
    background: linear-gradient(135deg, #e6b82e, #c9963f);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.4);
}

.gameOverButtons button:active {
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    #menuButton {
        top: 5px;
        right: 5px;
    }
    
    #menuButton button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .gameOverContent {
        padding: 30px 25px;
    }
    
    .gameOverContent h2 {
        font-size: 40px;
    }
    
    .gameOverContent p {
        font-size: 20px;
    }
    
    .gameOverButtons {
        flex-direction: column;
    }
    
    .gameOverButtons button {
        width: 100%;
        font-size: 16px;
        padding: 12px 25px;
    }
}
