body{ margin: 0; overflow: hidden; background: black; font-family: "Roboto", sans-serif;}
canvas { display: block; background: transparent; cursor: url('../assets/cursor.png'), auto; } /* Curseur personnalisé */
#fps { position: absolute; color: white; top: 170px; left: 25px; user-select: none; }
img {user-select: none;}

#gameWrapper { position: fixed; inset: 0; overflow: hidden; }
#gameCanvas{ position: absolute; }

#playerStats
{
    position: absolute;
    bottom: 150px;
    left: 10px;
    color: white;
    font-family: Arial, sans-serif;
    background: rgba(0, 0, 0, 0.7); /* Fond semi-transparent */
    padding: 10px;
    border-radius: 5px;
    user-select: none;
}

#playerStats h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

#playerStats p {
    margin: 5px 0;
    font-size: 14px;
}

#difficulty
{
    color: rgb(255, 255, 255);
    font-size: 28px;
}

#playerStats strong {
    color: gold; /* Couleur pour les labels */
}

#timeDisplay {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    user-select: none;
}

#timeDisplay p {
    font-size: 20px;
    font-family: Arial, sans-serif;
    color: white;
    margin: 0 0 5px 0;
    text-align: center;
}

#timeProgressContainer {
    width: 100%;
    height: 5px;
    border-radius: 10px;
    border: 1px solid rgb(40, 40, 40);
}

#timeProgressBar {
    height: 100%;
    background: linear-gradient(to right, #00ff00, #ff0000);
    border-radius: 10px;
}

#enemyBuffsDisplay {
    position: absolute;
    top: 250px;
    left: 10px;
    color: white;
    font-family: Arial, sans-serif;
    background: rgba(0, 0, 0, 0.7); /* Fond semi-transparent */
    padding: 10px;
    border-radius: 5px;
    user-select: none;
}

#enemyBuffsDisplay h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

#enemyBuffsDisplay p {
    margin: 5px 0;
    font-size: 14px;
}

#enemyHealthBuff, 
#enemyDamageBuff
{
    font-size: 25px;
}

#enemyBuffsDisplay strong {
    color: gold; /* Couleur pour les labels */
}


/* Barre de vie *//*
#healthBarContainer
{
    position: absolute;
    top: 5px;
    left: 50%;
    width: 99vw;
    height: 5vh;
    background-color: rgba(255, 0, 0, 0.5);
    border-radius: 5px;
    overflow: hidden;
    transform: translateX(-50%);
    user-select: none;
}

#healthBar {
    height: 100%;
    background-color: green;
    width: 100%;
    transition: width 0.35s ease;
}

#healthText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Consolas', serif;
    font-size: 2em;
    font-weight: bold;
}*/

#healthBarContainer {
    position: absolute;
    left: 10px;
    bottom: 10px;
    width: 20vw;
    height: 40px;
    background: linear-gradient(145deg, rgba(50, 0, 0, 0.4), rgba(80, 0, 0, 0.6));
    border: 2px solid rgba(255, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    user-select: none;
    box-shadow:
        0 0 10px rgba(255, 0, 0, 0.2),
        inset 0 0 6px rgba(255, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    z-index: 999;
}

#healthBar {
    height: 100%;
    background: linear-gradient(to right, #ff3c3c, #c70000);
    width: 100%;
    transition: width 0.3s ease;
    box-shadow:
    0 0 6px rgba(255, 50, 50, 0.8),
    inset 0 0 5px rgba(255, 0, 0, 0.4);
}

#healthText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Consolas', monospace;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(255, 50, 50, 0.8);
}

/* Score */
#scoreDisplay {
    position: absolute;
    top: 210px;
    left: 25px;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: bold;
    user-select: none;
}

/* Style pour le menu de pause */
#pauseMenu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
   /* background: rgba(0, 0, 0, 0.8); /* Fond semi-transparent */
    padding: 20px;
    border-radius: 10px;
    color: white;
    font-family: Arial, sans-serif;
    z-index: 1000; /* Assurer que le menu est au-dessus des autres éléments */
    display: none; /* Masqué par défaut */
}

#pauseMenu.visible {
    display: block; /* Afficher le menu de pause */
}

#pauseMenu button {
    display: block;
    width: 200px;
    margin: 10px auto;
    padding: 10px;
    font-size: 20px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#pauseMenu button:hover {
    background: rgba(255, 255, 255, 0.2);
}

#pauseMenu button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Compteur de gold */
#goldCounter {
    position: absolute;
    top: 108px;
    left: 20px;
    display: flex;
    gap: 10px;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: bold;
    user-select: none;
}

#goldIcon {
    width: 30px;
    height: 30px;
}

/* Messages éphémères */
#ephemeralMessages {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Conteneur des messages éphémères (droite de l'écran) */
#ephemeralMessagesContainer {
    position: fixed;
    height: 300px;
    top: 150px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999; /* Assurer que les messages sont au-dessus des autres éléments */
    overflow: hidden;
}

/* Messages éphémères */
.ephemeral-message {
    color: gold;
    padding: 10px;
    font-family: Arial, sans-serif;
    font-size: 30px;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    text-align: right;
    pointer-events: none; /* Empêcher les interactions avec les messages */
}

.ephemeral-message.fade-out {
    opacity: 0;
    transform: translateY(-20px); /* Animation de déplacement vers le haut */
}

#gameTimer
{
    position: absolute;
    top: 100px;
    left: 50%;
    color: white;
    font-size: 2em;
    z-index: 998;
    transform: translateX(-50%);
}

#timelineContainer {
    position: absolute;
    top: 5px;
    left: 10px;
    right: 10px;
    height: 30px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.4), rgba(40, 40, 40, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1), inset 0 0 6px rgba(0, 255, 255, 0.15);
    backdrop-filter: blur(3px);
    z-index: 998;
}

#timelineCursor {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5px;
    background: red;
    box-shadow:
        0 0 8px red,
        0 0 15px red,
        0 0 30px rgba(255, 0, 0, 0.6),
        0 0 60px rgba(255, 0, 0, 0.4);
    z-index: 999;
}

.event-marker
{
    position: absolute;
    bottom: -24px;
    width: 2px;
    background-color: white;
    opacity: 0.8;
}

.event-marker::after {
    content: attr(data-time);
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 15px;
    color: white;
    white-space: nowrap;
    padding: 2px 5px;
    border-radius: 3px;
    pointer-events: none;
}

.event-marker:last-child::after
{
    transform: translateX(-100%);
}

.timeline-icon {
  image-rendering: pixelated;
  transition: transform 0.2s ease;
  transform: translateX(-50%);
}

.last-timeline-icon {
  transform: translate(-100%,-10%);
}

/* Style pour l'affichage du nombre de projectiles, llot et ennemis */
#countersContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: center;
    color: white;
    font-family: Arial, sans-serif;
}

.counter {
    display: flex;
    align-items: center;
    gap: 5px;
}

.counter p {
    margin: 0;
    font-size: 14px;
}



/* Style pour la vidéo de fond */
#backgroundVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    transform: translate(-25%, -7%);
    object-fit: cover; /* Assure que la vidéo couvre tout l'écran */
    z-index: -1; /* Place la vidéo en arrière-plan */
    filter: blur(2px); /* Applique un effet de flou */
}


/* Style pour le logo du jeu */
#gameLogo {
    width: 30vw; /* Ajustez la largeur selon vos besoins */
    height: auto; /* Conserve les proportions de l'image */
    margin-bottom: 20px; /* Espacement entre le logo et les boutons */
    animation: float 3s ease-in-out infinite; /* Animation de flottement (optionnel) */

}

/* Animation de flottement */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

#audioPermissionMessage {
    position: fixed; /* Position fixe pour rester en haut à gauche */
    top: 20px; /* Distance depuis le haut */
    left: 20px; /* Distance depuis la gauche */
    color: white; /* Couleur du texte */
    font-family: Arial, sans-serif; /* Police du texte */
    font-size: 16px; /* Taille du texte */
    background: rgba(0, 0, 0, 0.7); /* Fond semi-transparent */
    padding: 10px; /* Espacement interne */
    border-radius: 5px; /* Coins arrondis */
    z-index: 1000; /* Assurer que le message est au-dessus des autres éléments */
    display: none; /* Masqué par défaut */
    align-items: center; /* Centrer verticalement */
    gap: 10px; /* Espace entre le texte et le bouton */
}

#audioPermissionMessage.visible {
    display: flex; /* Afficher le message en mode flex */
}

#closeAudioMessage {
    background: rgba(255, 255, 255, 0.1); /* Fond semi-transparent */
    border: 1px solid white; /* Bordure blanche */
    color: white; /* Texte blanc */
    padding: 5px 10px; /* Espacement interne */
    border-radius: 5px; /* Coins arrondis */
    cursor: pointer; /* Curseur pointer */
    font-size: 14px; /* Taille du texte */
    transition: background 0.3s ease; /* Transition fluide */
}

#closeAudioMessage:hover {
    background: rgba(255, 255, 255, 0.2); /* Fond plus clair au survol */
}

/* Style pour le menu principal */
#unifiedMenu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    color: white;
    font-family: 'Arial', sans-serif;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    gap: 15px;
}

#unifiedMenu.hidden {
    display: none;
}

/* Style pour les boutons du menu principal */
#unifiedMenu button {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px 30px;
    font-size: 2em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#unifiedMenu button:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

#unifiedMenu button:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Style pour le bouton "Charger une partie" (désactivé par défaut) */
#loadGameButton {
    opacity: 0.5;
    cursor: not-allowed;
}

#loadGameButton:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Style pour les sous-menus */
.sub-menu {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.9), rgba(30, 30, 30, 0.9));
    color: white;
    font-family: 'Arial', sans-serif;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.sub-menu.visible {
    display: block;
}

/* Style pour les boutons des sous-menus */
.sub-menu button {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin: 10px 0;
}

.sub-menu button:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.sub-menu button:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Style pour les titres des sous-menus */
.sub-menu h2 {
    font-size: 50px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

#graphicsSubMenu h2,
#graphicsSubMenu div,
#graphicsSubMenu button
{
    margin:20px 0
}

.container_input_range
{
    display: flex;
    flex-direction: column;
    margin:50px 0;
    gap:25px 0;
}

.container_input_range label
{
    font-size: 2em;
}

/* Style pour les sliders de volume */
.audioSubMenu input[type="range"] {
    -webkit-appearance: none; /* Désactiver le style par défaut */
    appearance: none;
    width: 100%; /* Largeur réduite */
    height: 8px; /* Hauteur du slider */
    background: rgba(255, 255, 255, 0.1); /* Fond semi-transparent */
    border-radius: 5px; /* Coins arrondis */
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    margin: 10px 0;
}

/* Style pour la poignée du slider */
.audioSubMenu input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; /* Désactiver le style par défaut */
    appearance: none;
    width: 16px; /* Largeur de la poignée */
    height: 16px; /* Hauteur de la poignée */
    background: #fff; /* Couleur de la poignée */
    border-radius: 50%; /* Poignée ronde */
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Ombre légère */
}

/* Style pour la piste du slider */
.audioSubMenu input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.1); /* Fond semi-transparent */
    border-radius: 5px; /* Coins arrondis */
}

/* Style pour la poignée du slider (Firefox) */
.audioSubMenu input[type="range"]::-moz-range-thumb {
    width: 16px; /* Largeur de la poignée */
    height: 16px; /* Hauteur de la poignée */
    background: #fff; /* Couleur de la poignée */
    border-radius: 50%; /* Poignée ronde */
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Ombre légère */
}

/* Effet au survol */
.audioSubMenu input[type="range"]:hover {
    opacity: 1;
}

.pause-only {
  display: none !important;
}

/* Style pour l'élément de superposition flou */
#blurOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Fond semi-transparent */
    backdrop-filter: blur(17px); /* Appliquer un flou */
    z-index: 999; /* S'assurer qu'il est au-dessus du canvas mais en dessous du menu */
    display: none; /* Masqué par défaut */
}

/* Afficher l'élément de superposition lorsque le jeu est en pause */
#blurOverlay.visible {
    display: block;
}

#flashOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 0, 0, 0.2); /* Rouge semi-transparent */
    pointer-events: none; /* Empêche l'élément d'interférer avec les clics */
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10000; /* Assurez-vous qu'il est au-dessus de tout */
    user-select: none;
}

#flashOverlay.visible {
    opacity: 1; /* Affiche le flash */
}

#difficultyMenu {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 50vh;
    transform: translate(-50%, -50%);
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.9), rgba(30, 30, 30, 0.9));
    color: white;
    font-family: 'Arial', sans-serif;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    user-select: none;
}

#difficultyMenu button {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 45px;
    font-size: 2em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    margin: 25px;
}

#difficultyMenu button:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

#difficultyMenu h2
{
    font-size: 2em;
}

#difficultyMenu.hidden {
    display: none;
}


/* Style pour l'interface des statistiques de difficulté */
#difficultyStats
{
    color: white;
    padding: 33px;
    border-radius: 15px;
    font-family: Arial, sans-serif;
    z-index: 1000;
}

#difficultyStats p {
    font-size: 16px;
    margin: 5px 0;
}

#difficultyStats strong {
    color: gold;
}


/* Style pour l'écran de chargement */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    font-size: 24px;
}

#loadingScreen p
{
    text-align: center;
    font-family: 'Arial', sans-serif;
    font-size: 1em;
    color: #ffffff;
    text-shadow: 0px 0px 50px #87cefd, 0 0 50px #70c6ff;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none;
}

/* Styles pour la mini-carte */

    #miniMap_container {
        position: fixed;
        bottom: 200px;
        right: 20px;
        width: 100px;
        height: 100px;
        background-color: rgba(0, 0, 0, 1);
        border: 2px solid white;
        border-radius: 10px;
        display: none;
        justify-content: center;
        align-items: center;
        padding:20px;
        z-index: 998;
        user-select: none;
    }
    
    #miniMap {
        position: absolute;
        bottom: 50%;
        right: 50%;
        transform: translate(50%, 50%);
        width: 50px;
        height: 50px;
        background-color: rgba(0, 0, 0, 1);
        border-radius: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 20px;
        z-index: 998;
        user-select: none;
    }

    #playerPosition {
        width: 10px;
        height: 10px;
        background-color: red;
        border-radius: 50%;
        position: absolute;
        transform: translate(-50%, -50%); /* Centre l'icône sur la position */
        user-select: none;
    }

    #playerCoordinates {
        position: fixed;
        bottom: 142px; /* Position en dessous de la mini-carte */
        right: 36px;
        text-align: center;
        color: white;
        font-family: Arial, sans-serif;
        font-size: 25px;
        display: none;
        user-select: none;
    }
/*****/

#gameOverScreen
{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Arial', sans-serif;
    z-index: 1000;
    user-select: none;
}

.game-over-content
{
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 50%;
    height:85vh;
    transform: translate(50%, 10%);
    overflow: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.game-over-content h2 {
    margin: 0;
    font-size: 4em;
    user-select: none;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1.2em;
    text-align: left;
}

.stats-table th, .stats-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ffffff24;
}

.stats-table th {
    background-color: #333;
    color: white;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

#restartButton {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1em;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
}

#restartButton:hover {
    background-color: #cc0000;
}

.scoreTitre
{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap:0 20px
}

.scoreTitre img
{
    width:25px;
}

#logContainer {
    position: fixed;
    right: 20px;
    top: 150px;
    width: 300px;
    height: 300px;
    color: white;
    font-size: 14px;
    z-index: 998;
    text-align: right;
    scrollbar-color: rgb(10, 10, 10) rgb(25, 25, 25);
    scrollbar-width: thin;
    overflow-y: hidden;
    padding-right:20px;
    user-select: none;
}

#logMessages {
    display: flex;
    flex-direction: column; /* Les nouveaux messages apparaissent en haut */
}

.log-message {
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: right;
    gap:0 10px;
}

/* Conteneur de la barre d'expérience */
#expBarContainer {
    position: fixed;
    bottom: 20px; /* Position en bas de l'écran */
    left: 50%;
    transform: translateX(-50%); /* Centrer horizontalement */
    text-align: center;
    z-index: 999; /* S'assurer qu'elle est au-dessus des autres éléments */
}

/* Affichage du niveau */
#levelDisplay {
    font-size: 18px;
    font-weight: bold;
    color: white;
    margin-bottom: 5px; /* Espace entre le niveau et la barre */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Ombre pour améliorer la lisibilité */
}

/* Barre d'expérience */
#expBar {
    width: 50vw; /* Largeur de la barre */
    height: 20px; /* Hauteur de la barre */
    background-color: rgba(0, 0, 0, 0.5); /* Fond semi-transparent */
    border-radius: 10px; /* Bords arrondis */
    overflow: hidden; /* Masquer le débordement */
    position: relative; /* Pour positionner le texte */
}

/* Progression de la barre d'expérience */
#expProgress {
    height: 100%;
    width: 0%; /* Largeur initiale (sera mise à jour dynamiquement) */
    background-color: #4CAF50; /* Couleur de la barre de progression */
    transition: width 0.3s ease; /* Animation fluide */
}

/* Texte du pourcentage */
#expPercentageText {
    position: absolute; /* Position absolue par rapport à #expBar */
    top: 50%; /* Centrer verticalement */
    left: 50%; /* Centrer horizontalement */
    transform: translate(-50%, -50%); /* Centrer parfaitement */
    font-size: 14px;
    font-weight: bold;
    color: white;
}

#expPercentageText {
    color: white; /* Couleur verte par défaut */
}

#expPercentageText.high {
    color: rgb(255 255 255);
    text-shadow: 1px 1px #000000;
}


/* Conteneur de l'indication de niveau */
#levelUpIndicator {
    position: fixed;
    bottom: 5%; /* Centrer verticalement */
    left: 50%; /* Centrer horizontalement */
    transform: translate(-50%, -50%); /* Centrer parfaitement */
    font-size: 30px;
    font-weight: bold;
    color: gold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px 30px;
    border-radius: 5px;
    border: 2px solid gold;
    opacity: 0; /* Initialement invisible */
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 1001; /* S'assurer qu'elle est au-dessus des autres éléments */
}

/* Animation d'apparition */
#levelUpIndicator.show {
    opacity: 1; /* Rendre visible */
    transform: translate(-50%, -50%) scale(1.2); /* Effet de zoom */
}

/* Animation de disparition */
#levelUpIndicator.hide {
    opacity: 0; /* Rendre invisible */
    transform: translate(-50%, -50%) scale(0.8); /* Effet de rétrécissement */
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

#teleportCooldownIndicator {
    position: fixed;
    bottom: 50%;
    right: 50%;
    width: 30px;
    height: 30px;
    transform: translate(70px, 70px);
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 1);
    /*display: flex;*/
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    z-index: 100;
    overflow: hidden;
    box-shadow: inset 0 0 0 3px rgba(0, 200, 255, 0.3); /* Bordure bleue subtile */
}

#teleportCooldownIndicator .cooldown-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    box-shadow: 
         0 0 10px rgba(0, 200, 255, 0.8),
         0 0 20px rgba(0, 150, 255, 0.6);
    transition: height 0.1s linear;
    border-radius: 50%;
}

#teleportCooldownIndicator .cooldown-text {
    position: relative;
    z-index: 2;
    text-align: center;
    transform: translate(0%, 50%);
    text-shadow: 0 0 5px rgba(0, 200, 255, 0.8);
}

.voirGameOverScreen
{
    background: black;
    width: 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    text-align: center;
    color: red;
    font-size: 2em;
    border: 2px solid red;
    border-radius: 10px;
    user-select: none;
    margin-bottom: 30px;
    justify-self: center;
    cursor: pointer;
}

.voirGameOverScreen:hover
{
    color: rgb(144, 0, 0);
}

.seeGame
{
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 1em;
    background-color: #00459f;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
}

.seeGame:hover
{
    background-color: #2675dd;
}

#bossArrow {
  position: absolute;
  pointer-events: none;
  display: none;
}

#bossArrow.visible {
  display: block;
}

#bossArrow img {
  width: 120px;
  height: 120px;
  transform-origin: center center;
}