body {
    margin: 0;
    overflow: hidden;
    font-family: 'Press Start 2P', cursive;
    background-color: #111;
    /* fond sombre, un peu plus “techno” */
}

/* Score et vies */
#score,
#lives {
    position: absolute;
    padding: 10px 15px;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px #000;
    z-index: 100;
}

/* Score */
#score {
    top: 10px;
    left: 10px;
    color: #FFD700;
    /* jaune chantier */
    background: rgba(20, 20, 20, 0.7);
    border: 2px solid #FFA500;
    /* orange chantier */
    text-shadow: 0 0 6px #FFD700, 0 0 12px #FFA500;
}

/* Lives */
#lives {
    top: 60px;
    left: 10px;
    color: #00FF00;
    /* vert vif */
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00FF00;
    text-shadow: 0 0 6px #00FF00;
}



/* Barre de progression en haut à droite */
#progress-container {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 250px;
    height: 25px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #00CCFF;
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00CCFF, #0066FF);
    box-shadow: 0 0 10px #00CCFF, 0 0 20px #0066FF;
    transition: width 0.3s ease;
}

#progress-text {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 0;
    left: 0;
    line-height: 25px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    color: #ffffff;
    text-shadow: 0 0 6px #000;
}

/* Barre de vie centrée en bas */
#life-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 22px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid #FFD700;
    border-radius: 10px;
}

#life-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00FF00, #88FF00);
    border-radius: 8px;
    box-shadow: 0 0 10px #00FF00, 0 0 20px #88FF00;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Boutons menu */
button {
    padding: 12px 25px;
    margin: 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    color: #111;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border: 2px solid #FFD700;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 0 0 6px #000;
    transition: all 0.2s ease;
}

button:hover {
    background: linear-gradient(90deg, #FFA500, #FFB733);
    box-shadow: 0 0 10px #FFD700, 0 0 20px #FFA500;
}

#ath {
    display: none;
    /* caché par défaut */
}

/* Menu principal */
#menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    color: #FFD700;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    opacity: 0;
    animation: fadeInMenu 1s forwards;
    overflow: hidden;
    padding-top: 170px;
}

/* Fond flou */
#menu::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/ForestRampage.png');
    background-size: cover;
    background-position: center;
    filter: blur(0px);
    /* flou léger */
    z-index: 1;
}

/* Texte et boutons au-dessus */
.menu-buttons {
    position: relative;
    z-index: 2;
}


@keyframes fadeInMenu {
    to {
        opacity: 1;
    }
}

/* Container des boutons pour l’effet cascade */
.menu-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-buttons button {
    padding: 12px 25px;
    margin: 12px;
    font-size: 20px;
    color: #111;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border: 2px solid #FFD700;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 0 0 6px #000;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInButton 0.5s forwards;
}

.menu-buttons button:nth-child(1) {
    animation-delay: 0.5s;
}

.menu-buttons button:nth-child(2) {
    animation-delay: 0.8s;
}

.menu-buttons button:nth-child(3) {
    animation-delay: 1.1s;
}

@keyframes fadeInButton {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-buttons button:hover {
    background: linear-gradient(90deg, #FFA500, #FFB733);
    box-shadow: 0 0 10px #FFD700, 0 0 20px #FFA500;
}

/* Boutons du menu (sauf Play) */
.menu-buttons button {
    padding: 10px 20px;
    /* plus petits que Play */
    font-size: 16px;
    /* réduit */
}

/* Play mis en avant */
#play-btn {
    font-size: 22px;
    padding: 14px 28px;
    background: linear-gradient(90deg, #FFD700, #FF9900);
    color: #111;
    border: 2px solid #FFD700;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 0 0 6px #000;
    position: relative;
    z-index: 3;
    /* animations combinées */
    animation: fadeInButton 0.5s 0.5s forwards,
        pulsePlay 1.6s 2s infinite alternate;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

/* Hover spécifique Play (supplémentaire par rapport au pulse) */
#play-btn:hover {
    transform: scale(1.08);
    background: linear-gradient(90deg, #FFA500, #FFB733);
    box-shadow:
        0 0 30px #FFD700,
        0 0 60px #FFA500,
        0 0 90px #FF8C00;
    /* halo nettement plus large */
}

/* Animation "respiration" sans conflit (uniquement luminosité + glow) */
@keyframes pulsePlay {
    from {
        transform: scale(1);
        filter: brightness(1);
    }

    to {
        transform: scale(1.03);
        filter: brightness(1.05);
    }
}

/* Menu Pause */
#pause-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 300;
    background: rgba(17, 17, 17, 0.95);
    /* fond sombre */
    color: #FFD700;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    opacity: 0;
    pointer-events: none;
    /* désactive les interactions quand masqué */
    transition: opacity 0.3s ease;
}

#pause-menu.active {
    opacity: 1;
    pointer-events: auto;
    /* active les interactions */
}

#pause-menu h1 {
    font-size: 48px;
    margin-bottom: 40px;
    text-shadow: 0 0 10px #FFD700, 0 0 20px #FFA500;
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pause-buttons button {
    padding: 12px 25px;
    margin: 12px;
    font-size: 18px;
    /* légèrement plus petit que Play */
    color: #111;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border: 2px solid #FFD700;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 0 0 6px #000;
    transition: all 0.2s ease;
}

.pause-buttons button:hover {
    background: linear-gradient(90deg, #FFA500, #FFB733);
    box-shadow: 0 0 10px #FFD700, 0 0 20px #FFA500;
}

/* Bouton pause transparent avec barres */
#pause-btn-in-game {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: transparent;
    /* fond transparent */
    border: none;
    /* pas de bordure */
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    /* espace entre les barres */
    z-index: 150;
    padding: 0;
}

/* Les barres verticales */
#pause-btn-in-game .pause-bar {
    width: 6px;
    height: 30px;
    background: #FFD700;
    border-radius: 3px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Glow sur les barres au hover du bouton */
#pause-btn-in-game:hover .pause-bar {
    box-shadow:
        0 0 10px #FFD700,
        0 0 20px #FFA500,
        0 0 30px #FFB733;
    transform: scaleY(1.1);
    /* optionnel : effet léger de “pulsation” */
}

/* Menu Game Over */
#game-over-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 300;
    /* Image de fond */
    background-image: url('../assets/images/gameOverBackground.png');
    /* chemin relatif à ton CSS */
    background-size: cover;
    /* couvre tout le div */
    background-position: center;
    /* centré */
    background-repeat: no-repeat;
    color: #FFD700;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#game-over-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.game-over-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-over-buttons button {
    padding: 12px 25px;
    margin: 12px;
    font-size: 18px;
    color: #111;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border: 2px solid #FFD700;
    border-radius: 12px;
    cursor: pointer;
    text-shadow: 0 0 6px #000;
    transition: all 0.2s ease;
}

.game-over-buttons button:hover {
    background: linear-gradient(90deg, #FFA500, #FFB733);
    box-shadow: 0 0 10px #FFD700, 0 0 20px #FFA500;
}

/* Turbo Boost HUD texte */
#turbo-text {
    position: absolute;
    bottom: 50px;
    /* un peu au-dessus de la barre de vie */
    left: 50%;
    transform: translateX(-50%);
    /* centre horizontalement exactement */
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    color: #FFD700;
    /* jaune glowy */
    text-shadow: 0 0 6px #FFD700, 0 0 12px #FFA500;
    z-index: 150;
    animation: pulseTurbo 1s infinite alternate;
}

@keyframes pulseTurbo {
    from {
        transform: translateX(-50%) scale(1);
        filter: brightness(1);
    }

    to {
        transform: translateX(-50%) scale(1.05);
        filter: brightness(1.2);
    }
}

#shield-hud {
    position: absolute;
    bottom: 12px;
    /* même hauteur que la barre de vie */
    left: calc(50% - 160px);
    /* placé à gauche de la barre de vie */
    width: 35px;
    height: 35px;
    border: 2px solid #00CCFF;
    /* bleu néon */
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    /* visible uniquement quand actif */
    z-index: 150;
    box-shadow: 0 0 12px #00CCFF, 0 0 24px #0066FF;
    justify-content: center;
    align-items: center;
    font-family: 'Orbitron', sans-serif;
    color: #00CCFF;
    font-size: 16px;
    /* réduit pour correspondre à la taille */
    text-shadow: 0 0 5px #00CCFF, 0 0 10px #0066FF;
    animation: pulseShield 1s infinite alternate;
}

@keyframes pulseShield {
    from {
        transform: scale(1);
        box-shadow: 0 0 12px #00CCFF, 0 0 24px #0066FF;
    }

    to {
        transform: scale(1.08);
        box-shadow: 0 0 22px #00CCFF, 0 0 40px #0066FF;
    }
}