/* Estilos específicos do Jogo da Memória com a renovação visual */

#jogo-memoria p {
    color: var(--cor-texto);
}

.game-options {
    background-color: var(--cor-painel);
    border: 1px solid var(--cor-borda);
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 4px 15px var(--cor-sombra);
}

.option-group {
    text-align: left;
}

.option-group label {
    font-weight: 600;
    color: var(--cor-titulo);
    display: block;
    margin-bottom: 0.5rem;
}

.option-group select {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid var(--cor-borda);
    border-radius: 8px;
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
}

.difficulty-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.difficulty-btn {
    border: none;
    display: block;
    width: 100%;
    max-width: 280px;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    font-weight: 600;
    color: white;
    background: var(--cor-titulo);
}

.difficulty-btn:hover {
    background-color: var(--cor-principal-acao);
    transform: translateY(-2px);
}

.info-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--cor-titulo);
}

.recorde {
    margin-bottom: 20px;
    font-weight: 600;
    background-color: var(--cor-painel);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--cor-borda);
    color: var(--cor-texto);
}

.recorde span {
    color: var(--cor-sucesso);
    font-weight: bold;
}

.memory-game {
    width: 100%;
    max-width: 800px; /* Aumentei o tamanho máximo do tabuleiro */
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem; /* Aumentei o espaçamento entre as cartas */
    perspective: 1000px;
}

.memory-card {
    aspect-ratio: 1 / 1;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
    min-height: 120px; /* Garante que as cartas tenham um tamanho mínimo */
}

.memory-card.flip {
    transform: rotateY(180deg);
}

.front-face, .back-face {
    width: 100%;
    height: 100%;
    position: absolute;
    border-radius: 16px; /* Bordas mais arredondadas */
    background: var(--cor-painel);
    border: 1px solid var(--cor-borda);
    box-shadow: 0 5px 15px var(--cor-sombra);
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-face {
    background: var(--cor-principal-acao);
    background: linear-gradient(135deg, #84a98c, #588157);
}

.front-face {
    transform: rotateY(180deg);
    font-size: clamp(3rem, 10vw, 5rem); /* Aumentei o tamanho da fonte para os emojis */
    color: var(--cor-titulo);
}

.front-face .card-image {
    max-width: 90%; /* Aumentei o tamanho máximo das imagens */
    max-height: 90%;
    object-fit: contain;
}

#memoria-status {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--cor-titulo);
}