﻿.memory-page {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    margin: 2rem 0;
    padding: 1.5rem;
}

.memory-page h1 {
    color: #ff6b8b;
    font-family: "Fredoka One", cursive;
    margin: 0 0 0.75rem;
    text-align: center;
}

#memorySubtitle {
    margin: 0 auto 1.25rem;
    max-width: 760px;
    text-align: center;
}

.memory-hud {
    background: #f9f7fe;
    border-radius: 14px;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    margin-bottom: 1rem;
    padding: 0.75rem;
}

.hud-item {
    background: #fff;
    border-radius: 10px;
    font-size: 0.95rem;
    padding: 0.45rem 0.6rem;
    text-align: center;
}

.hud-label {
    color: #555;
    font-weight: 700;
}

.memory-board {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    margin-top: 1rem;
}

.memory-card {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #4ecdc4, #06d6a0);
    border: 0;
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-family: "Comic Neue", cursive;
    justify-content: center;
    min-height: 88px;
    padding: 0.4rem;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.memory-card:hover:not([disabled]) {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
    transform: translateY(-2px);
}

.memory-card[disabled] {
    cursor: default;
    opacity: 0.8;
}

.memory-card.is-hidden {
    background: linear-gradient(135deg, #9b5de5, #ff6b8b);
}

.memory-card.is-matched {
    background: linear-gradient(135deg, #ffd166, #fb5607);
}

.card-emoji {
    font-size: 2rem;
    line-height: 1.1;
}

.card-word {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.card-lang {
    font-size: 0.72rem;
    margin-top: 0.15rem;
    opacity: 0.92;
}

.memory-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.2rem;
}

#restartBtn {
    background: #ff6b8b;
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-family: "Fredoka One", cursive;
    padding: 0.7rem 1.2rem;
}

#restartBtn:hover {
    filter: brightness(0.95);
}

.memory-win {
    background: #f1fff8;
    border: 2px solid #06d6a0;
    border-radius: 14px;
    margin-top: 1rem;
    padding: 0.75rem;
    text-align: center;
}


