body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #283a3d;
    color: #ffffff;
    font-family: 'Arial', sans-serif;
}

.container {
    text-align: center;
    width: 100%;
    height: 100%;
    display: none; /* Hide all containers by default */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative; /* Ensures that the ::before overlay works */
}

#initialScreen {
    display: flex; /* Display the initial screen by default */
    background-image: url('src/planches.png');
    background-size: cover;
    background-position: center;
}

#mainMenu {
    background-image: url('src/planches.png');
    background-size: cover;
    background-position: center;
}

#pauseMenu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    text-align: center;
    z-index: 20;
}

h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#buttonContainer {
    display: flex;
    gap: 20px; /* Espacement entre les boutons */
    justify-content: center;
    margin-bottom: 20px; /* Ajustez l'espacement sous le conteneur si nécessaire */
}

button {
    padding: 15px 30px;
    font-size: 1.5em;
    color: #ffffff;
    background-color: #356175;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.3s;
}

button:hover {
    background-color: #3794b1;
    transform: scale(1.05);
}

button:active {
    background-color: #3794b1;
    transform: scale(1);
}

#gameCanvas {
    display: none; /* Hidden by default */
    margin-top: 20px;
    border: 2px solid #000000;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
}

#commands {
    margin-top: 20px;
    text-align: left;
    display: inline-block;
}

#commands h2 {
    margin-bottom: 10px;
}

#commands ul {
    list-style-type: none;
    padding: 0;
}

#commands li {
    margin: 5px 0;
}

#commands strong {
    display: inline-block;
    width: 200px;
}

#version {
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 14px;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
}

.volume-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.volume-control input[type="range"] {
    -webkit-appearance: none;
    width: 100px;
    height: 10px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
    border-radius: 5px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #356175;
    cursor: pointer;
    border-radius: 50%;
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #356175;
    cursor: pointer;
    border-radius: 50%;
}

.volume-control input[type="range"]::-ms-thumb {
    width: 20px;
    height: 20px;
    background: #356175;
    cursor: pointer;
    border-radius: 50%;
}



#gameSection {
    background-image: url('src/planches.png');
    background-size: cover;
    background-position: center;
    position: relative; /* Ensure that the ::before overlay works */
    padding: 20px; /* Add padding around the game section */
}

#retryButton {
    margin-top: 20px; /* Add margin above the retry button */
}

#pauseButton {
    margin-top: 20px; /* Add margin above the pause button */
}

#pauseMenu .volume-control {
    margin-top: 20px; /* Add margin above the volume control in the pause menu */
}

#pauseMenu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
    color: #ffffff;
    text-align: center;
    z-index: 20; /* Ensure the pause menu is above the game section */
}

#gameSection.paused::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 10; /* Ensure the overlay is above the game canvas but below the pause menu */
}

.score-container {
    font-size: 3em; /* Increase the font size for the score */
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

#highScoresSection {
    text-align: center;
    margin-top: 20px;
}

#highScoresSection h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#highScoresContainer {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 20px;
    gap: 20px; /* Ajouter de l'espace entre les colonnes */
}

.highScoresColumn {
    width: 30%;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
}

.highScoresColumn h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #ffffff;
}

.highScoresColumn ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 1.2em;
    color: #ffffff;
}

.highScoresColumn ul li {
    margin: 5px 0;
}

#gameCanvas.bonus-speed {
    border: 5px solid rgb(49, 195, 231);
}

#gameCanvas.bonus-strenght {
    border: 5px solid rgb(223, 61, 56);
}


