/**
 * Likya Mini Games - Oyun 7: Hafıza Ustası Stilleri
 */

.game7-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
    min-height: 520px;
}

.g7-difficulty-bar {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    margin-bottom: 10px;
}

.g7-diff-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.g7-diff-btn.active {
    background: var(--neon-purple);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(157, 78, 221, 0.45);
}

.g7-hud {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-bottom: 12px;
}

.memory-board-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1 / 1.05;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.memory-grid {
    display: grid;
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 8px;
    background: rgba(18, 22, 42, 0.55);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.memory-grid.grid-4x4 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
}

.memory-grid.grid-4x5 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 6px;
}

.memory-card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, #161c38, #0f1328);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    color: transparent;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.memory-card::before {
    content: '?';
    position: absolute;
    font-size: 1.2rem;
    font-weight: 900;
    font-family: var(--font-mono);
    color: rgba(0, 210, 255, 0.35);
    transition: opacity 0.15s ease;
}

.memory-card:hover:not(.flipped):not(.matched) {
    border-color: rgba(0, 210, 255, 0.45);
    transform: translateY(-2px);
}

.memory-card.flipped,
.memory-card.matched {
    background: linear-gradient(145deg, #1e2952, #151d3c);
    border-color: var(--neon-blue);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
}

.memory-card.flipped::before,
.memory-card.matched::before {
    opacity: 0;
}

.memory-card.matched {
    background: linear-gradient(145deg, rgba(0, 245, 196, 0.22), rgba(15, 29, 48, 0.9));
    border-color: var(--neon-cyan);
    box-shadow: 0 0 18px rgba(0, 245, 196, 0.4);
    animation: matchPop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

.memory-card.mismatch {
    border-color: var(--neon-red);
    background: linear-gradient(145deg, rgba(255, 51, 102, 0.25), #1a1025);
    animation: shakeAnim 0.28s ease;
}

@keyframes matchPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}
