/* Container principal da seção do jogo */
.game-container {
    display: flex;
    flex-direction: column;
    padding: 8rem 0;
    background-color: white;
    text-align: center;
}

.game-container h3 {
    text-align: center;
    font-family: 'Playfair Display', serif;
    color: #000000;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

/* Container que organiza Jogo + Controles lado a lado */
.game-area {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Moldura do Jogo */
.game-wrapper {
    flex: 3; /* Faz o jogo ocupar mais espaço que a imagem de controles */
    width: 95%;
    max-width: 900px;
    position: relative;
    border: 4px solid #333;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background-color: #f0f0f0;
    line-height: 0;
}

/* Estilo da Imagem de Controles */
.game-controls {
    flex: 1;
    max-width: 180px; /* Tamanho pequeno como você pediu */
    text-align: center;
    margin-top: 50px;

}

.game-controls img {
    width: 100%;
    height: auto;
    /*border-radius: 10px ;*/
    border: solid 2px black;
    /*Uma sombra leve para combinar com o jogo */
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.game-controls p {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #000000;
    margin-top: 10px;
    font-weight: 600;
}

/* O Canvas dentro do wrapper */
canvas {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: pixelated; 
    image-rendering: crisp-edges;
}

/* Ajuste para Celulares e Telas Pequenas */
@media (max-width: 1024px) {
    .game-area {
        flex-direction: column; /* Empilha o jogo e os controles */
        gap: 20px;
    }

    .game-controls {
        max-width: 120px; /* Diminui ainda mais no mobile */
    }
}