body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #333;
    font-family: 'Press Start 2P', cursive;
}

/*.game-container {
    position: relative;
    width: 800px;
    height: 300px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-container.loaded {
    opacity: 1;
}

#gameCanvas {
    border: 2px solid #fff;
    background-color: #f0f0f0;
}*/

.score {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #000;
    font-size: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.hidden {
    display: none !important;
}

button {
    padding: 10px 20px;
    margin: 10px;
    font-family: 'Press Start 2P', cursive;
    cursor: pointer;
}

#playerName {
    padding: 5px;
    margin: 10px;
    font-family: 'Press Start 2P', cursive;
}

#scoresList {
    text-align: left;
    padding: 0 20px;
}

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

#scoresList {
    display: inline-block;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    max-width: 400px;
}

#menu {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 300px;
}

#newHighScore {
    margin: 20px 0;
}

#playerName {
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    padding: 10px;
    margin: 10px 0;
    width: 200px;
}

button {
    font-family: 'Press Start 2P', cursive;
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background 0.3s;
}

button:hover {
    background: #357ABD;
}

/* Message d'orientation - caché par défaut */
#orientationMessage {
    display: none;
}

/* Media query pour les appareils mobiles en mode portrait */
@media screen and (orientation: portrait) and (max-width: 720px) {
    #orientationMessage {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #fff;
        z-index: 1000;
        text-align: center;
        padding: 0;
        font-family: 'Press Start 2P', cursive;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .game-container {
        display: none;
    }
}

/* Media query pour les appareils mobiles en mode paysage */
@media screen and (orientation: landscape) and (max-width: 720px) {
    #orientationMessage {
        display: none;
    }
    
    .game-container {
        display: block;
    }
    
    #gameCanvas {
        width: 100vw;
        height: 100vh;
    }
}

/* Media query pour les appareils mobiles en mode paysage */
@media screen and (orientation: landscape) and (max-height: 500px) {
    #orientationMessage {
        display: none;
    }
    
    .game-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 0;
        position: fixed;
        top: 0;
        left: 0;
        background-color: #fff;
    }
    
    #gameCanvas {
        width: 100vw;
        height: 100vh;
        margin: 0;
        display: block;
    }
    
    .score {
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 100;
        font-size: 14px;
        background-color: rgba(255, 255, 255, 0.8);
        padding: 8px 15px;
        border-radius: 12px;
    }
    
    #menu {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: rgba(255, 255, 255, 0.95);
        padding: 20px;
        border-radius: 10px;
        z-index: 1000;
        width: 90vw;
        display: flex;
        justify-content: space-between;
        gap: 20px;
    }
    
    #menu.hidden {
        display: none !important;
    }
    
    .menu-left, .menu-right {
        flex: 1;
        text-align: center;
    }
    
    #menu h2 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    #menu h3 {
        font-size: 12px;
        margin: 10px 0;
    }
    
    #menu p {
        font-size: 12px;
        margin: 10px 0;
    }
    
    #playerName {
        width: 80%;
        padding: 5px;
        margin: 5px 0;
        font-family: 'Press Start 2P', cursive;
        font-size: 12px;
    }
    
    #menu button {
        font-size: 12px;
        padding: 8px 15px;
        margin: 5px 0;
    }
    
    #scoresList {
        padding: 0;
        margin: 10px 0;
        max-height: 120px;
        overflow-y: auto;
    }
    
    #scoresList li {
        font-size: 12px;
        padding: 5px 0;
    }
}

/* Assurer que le body et html n'ont pas de marges ou de scroll */
@media screen and (orientation: landscape) and (max-height: 500px) {
    html, body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        position: fixed;
    }
} 