* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #333;
}

#game-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: url('img/grass.jpg') repeat;
}

#score {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 24px;
    z-index: 100;
}

#player {
    width: 60px;
    height: 100px;
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: url('img/connor-blankenship-pantsguybackrun.gif') no-repeat;
    background-size: contain;
    z-index: 10;
}

#road {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
}

.lane {
    width: 33.33%;
    height: 100%;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.obstacle {
    width: 150px;
    height: 150px;
    position: absolute;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.collectible {
    width: 150px;
    height: 150px;
    position: absolute;
    background: url('img/tableau.png') no-repeat center center;
    background-size: contain;
    cursor: pointer;
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    color: white;
    text-align: center;
}

.hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

button {
    padding: 10px 20px;
    margin-top: 20px;
    font-size: 18px;
    cursor: pointer;
}

.hole {
    background: url('img/puits.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 150px;
    height: 150px;
}

#pause-button {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    font-size: 24px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#pause-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    color: white;
    text-align: center;
    z-index: 1000;
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out;
    opacity: 1;
}

.story-content {
    padding: 40px;
    background: url(img/interieur_musee.jpg);
    background-position: center;
    border-radius: 10px;
    text-align: center;
    color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100vh;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

.tutorial-content {
    max-width: 80%;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.story-text,
.tutorial-step {
    font-size: 20px;
    line-height: 1.6;
    margin: 20px 0;
    color: white;
}

.story-button {
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: transparent;
    width: 100%;
    height: 100vh;
}
.backmap,
.tutorial-button {
    padding: 15px 30px;
    font-size: 18px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.tutorial-button:hover {
    background-color: #45a049;
}

.fullscreen-overlay.hidden {
    opacity: 0;
}

/* Ajout des styles pour les personnages */
.character {
    position: absolute;
    width: 200px;
    height: 300px;
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 1s ease-in-out;
}

.character-left {
    left: -250px;
    bottom: 50px;
    background-image: url('img/character1.png');
}

.character-right {
    right: -250px;
    bottom: 50px;
    background-image: url('img/character2.png');
}

.character.active {
    transform: translateX(250px);
}

.character-right.active {
    transform: translateX(-250px);
}

.character.exit {
    transition: transform 1s ease-in-out;
    transform: translateX(-250px);
}

.dialog-box {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
}