.game-container {
    background: #2c5f2d;
    padding: 20px;
    border-radius: 48px;
    box-shadow: 0 20px 35px rgba(0,0,0,0.5);
    max-width: 950px;
    margin: 2rem auto;
}

.game-header {
    background: #1e3a1e;
    padding: 12px 20px;
    border-radius: 60px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #f5e6c4;
}

.stats {
    display: flex;
    gap: 28px;
    background: #0f2b0f;
    padding: 6px 20px;
    border-radius: 50px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: bold;
}

.game-title {
    text-align: center;
}

.game-title h2 {
    margin: 0;
    font-size: 1.3rem;
}

.game-title p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 20px;
    background: #1e3a1e;
    border-radius: 36px;
    margin-bottom: 15px;
    min-height: 450px;
}

.card {
    aspect-ratio: 1 / 1;
    background: #ffd966;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 6px 0 #b8860b;
    color: #2c1a0c;
    text-align: center;
    padding: 5px;
    word-break: break-word;
}

.card:hover {
    transform: scale(0.97);
    background: #ffed8a;
}

.card.selected {
    background: #ffaa44;
    box-shadow: 0 0 0 3px #ff6600, 0 4px 8px rgba(0,0,0,0.2);
    transform: scale(0.98);
}

.card.flipped {
    background: #97cba9;
    box-shadow: 0 2px 0 #b8860b;
    transform: translateY(4px);
}

.card.matched {
    background: #4caf50;
    color: white;
    cursor: default;
    opacity: 0.8;
    box-shadow: 0 2px 0 #b8860b;
    transform: translateY(4px);
}

.card.flipped:hover, .card.matched:hover {
    transform: translateY(4px);
    cursor: default;
}

.message-area {
    text-align: center;
    margin: 15px 0;
    font-size: 1rem;
    font-weight: bold;
    color: #ffd966;
    min-height: 55px;
}

.game-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.back-btn, .reset-btn {
    background: #b87c3a;
    border: none;
    color: #f9e2b7;
    font-size: 1rem;
    padding: 10px 25px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}

.back-btn:hover, .reset-btn:hover {
    background: #d49442;
    transform: scale(1.02);
    color: white;
}

@media (max-width: 700px) {
    .game-header { flex-direction: column; align-items: stretch; text-align: center; }
    .stats { justify-content: center; }
    .memory-grid { gap: 8px; padding: 12px; }
    .card { font-size: 0.7rem; }
}