body {
    min-height: 100vh;
    margin: 0;
    background-color: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapper {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

#game-container {
    width: 800px;
    height: 300px;
    position: relative;
    margin-bottom: 2rem;
}

#game {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.button-container {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0 1rem;
}

@media (max-width: 840px) {
    .wrapper {
        padding: 10px;
    }

    #game-container {
        width: 100%;
        height: auto;
        aspect-ratio: 8/3;
    }

    /* Center the game canvas */
    #game {
        margin: 0 auto;
    }

    /* Stack buttons vertically on mobile */
    .button-container {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin: 0 auto;
    }

    /* Adjust button width and center text on mobile */
    .button-container button {
        width: 150px;
        justify-content: center;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    /* Ensure the text and icon are centered */
    .button-container button span {
        flex: 1;
        text-align: center;
    }
}