/* Hafıza Oyunu Stilleri */
.memory-container {
    position: relative;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: #fff;
    text-align: center;
    box-sizing: border-box;
}

.memory-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 1rem;
}

.game-scoreboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 16px;
    gap: 8px;
}

.player-score, .computer-score {
    text-align: center;
    flex: 1;
}

.player-score h3, .computer-score h3 {
    color: #ffd700;
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.score-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0fbcf9;
    margin: 0;
}

.turn-indicator {
    flex: 1.2;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0fbcf9;
    padding: 6px 12px;
    background: rgba(15, 188, 249, 0.15);
    border: 1px solid rgba(15, 188, 249, 0.3);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.turn-indicator.computer-turn {
    background: rgba(255, 71, 87, 0.15);
    border-color: rgba(255, 71, 87, 0.3);
    color: #ff6b81;
}

.game-board {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(8, 48px);
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin: 0 auto 16px auto;
    max-width: 440px;
}

@media (max-width: 460px) {
    .game-board {
        grid-template-columns: repeat(8, 36px);
        gap: 4px;
        padding: 8px;
        max-width: 320px;
    }
}

.card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: transform 0.2s, background-color 0.2s;
    user-select: none;
}

.card:hover {
    transform: scale(1.06);
    border-color: #ffd700;
}

.card.flipped {
    background: linear-gradient(135deg, #4f46e5, #3730a3);
    border-color: #ffd700;
    transform: rotateY(180deg);
}

.card.matched {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #34d399;
    cursor: default;
    opacity: 0.7;
}

.card.no-match {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #f87171;
}

.card-front {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.restart-btn {
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #0fbcf9, #0984e3);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 188, 249, 0.35);
    transition: transform 0.2s;
}

.restart-btn:hover {
    transform: translateY(-2px);
}

/* Modallar & Overlay */
.screen-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 18, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 50;
    pointer-events: auto;
    border-radius: 20px;
    box-sizing: border-box;
    animation: fadeInModal 0.25s ease-out forwards;
}

.screen-overlay.hidden,
.screen-overlay[style*="display: none"] {
    display: none !important;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.game-modal {
    background: linear-gradient(145deg, #1e272e, #141c22);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 24px 20px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    z-index: 51;
    box-sizing: border-box;
    animation: modalPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-icon-badge {
    font-size: 42px;
    line-height: 1;
    margin-bottom: -2px;
}

.game-modal-title {
    color: #ffffff !important;
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.game-score-card {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
}

.score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.score-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.score-val {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
    color: #0fbcf9;
}

.score-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
}

.game-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.btn-game {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-game:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-game:active {
    transform: translateY(0);
}

.btn-game-primary {
    background: linear-gradient(135deg, #0fbcf9, #0984e3) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(15, 188, 249, 0.4);
}

.btn-game-danger {
    background: rgba(235, 77, 75, 0.15) !important;
    color: #ff7979 !important;
    border: 1px solid rgba(235, 77, 75, 0.3) !important;
}

.btn-game-danger:hover {
    background: rgba(235, 77, 75, 0.25) !important;
    color: #ff5252 !important;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}
