/* Hafıza Kartı Oyunu v1.1.0 Styles */
.hko-app-container {
    --hko-bg-color: #0f172a;
    --hko-card-bg-front: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --hko-card-bg-back: #1e293b;
    --hko-text-main: #f8fafc;
    --hko-text-muted: #cbd5e1;
    --hko-glass-bg: rgba(30, 41, 59, 0.7);
    --hko-glass-border: rgba(255, 255, 255, 0.1);
    --hko-accent: #10b981;

    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: var(--hko-bg-color);
    color: var(--hko-text-main);
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('gorseller/seffaf_arkaplan.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    font-family: 'Outfit', sans-serif;
    box-sizing: border-box;
}

.hko-app-container * {
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

.hko-app-container .hko-game-header {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--hko-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--hko-glass-border);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hko-app-container .hko-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: -1rem;
}

.hko-app-container .hko-site-logo {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
    transition: transform 0.3s ease;
}

.hko-app-container .hko-site-logo:hover {
    transform: scale(1.02);
}

.hko-app-container .hko-stats {
    display: flex;
    gap: 2rem;
}

.hko-app-container .hko-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hko-app-container .hko-stat-box .hko-label {
    font-size: 0.85rem;
    color: var(--hko-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.hko-app-container .hko-stat-box .hko-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hko-text-main);
}

/* Timer Bar */
.hko-app-container .hko-timer-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 6px;
    border: 1px solid var(--hko-glass-border);
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.hko-app-container .hko-timer-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #b91c1c, #ef4444, #fca5a5);
    border-radius: 6px;
    position: relative;
    transition: width 1s linear;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Sparkler effect */
.hko-app-container .hko-sparkler {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
    animation: hko-sparkle 0.3s infinite alternate;
    pointer-events: none;
}

@keyframes hko-sparkle {
    0% { opacity: 0.8; transform: translateY(-50%) scale(0.8) rotate(-10deg); filter: hue-rotate(0deg) drop-shadow(0 0 5px #ef4444); }
    100% { opacity: 1; transform: translateY(-50%) scale(1.2) rotate(20deg); filter: hue-rotate(45deg) drop-shadow(0 0 10px #fca5a5); }
}

/* Game Board */
.hko-app-container .hko-game-board {
    display: grid;
    gap: 1rem;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    perspective: 1000px;
}

/* Grid Layouts based on level */
.hko-app-container .hko-game-board[data-level="1"] { grid-template-columns: repeat(4, 1fr); max-width: 600px; }
.hko-app-container .hko-game-board[data-level="2"] { grid-template-columns: repeat(4, 1fr); max-width: 600px; }
.hko-app-container .hko-game-board[data-level="3"] { grid-template-columns: repeat(8, 1fr); max-width: 1000px; }

@media (max-width: 768px) {
    .hko-app-container .hko-game-board[data-level="1"] { grid-template-columns: repeat(4, 1fr); }
    .hko-app-container .hko-game-board[data-level="2"] { grid-template-columns: repeat(4, 1fr); }
    .hko-app-container .hko-game-board[data-level="3"] { grid-template-columns: repeat(4, 1fr); }
    
    .hko-app-container .hko-game-header {
        flex-direction: column-reverse;
        gap: 1rem;
    }
}

/* Card Styles */
.hko-app-container .hko-card {
    aspect-ratio: 3 / 4;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 12px;
}

.hko-app-container .hko-card:hover:not(.hko-flipped):not(.hko-matched) {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.hko-app-container .hko-card.hko-flipped, 
.hko-app-container .hko-card.hko-matched {
    transform: rotateY(180deg);
}

.hko-app-container .hko-card.hko-matched {
    animation: hko-pulse 0.5s ease-in-out;
}

@keyframes hko-pulse {
    0% { transform: rotateY(180deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.05); }
    100% { transform: rotateY(180deg) scale(1); }
}

.hko-app-container .hko-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hko-app-container .hko-card-front {
    background: var(--hko-card-bg-front);
    background-image: url('gorseller/oyunkapak.png');
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255,255,255,0.2);
}

.hko-app-container .hko-card-back {
    background: var(--hko-card-bg-back);
    transform: rotateY(180deg);
    border: 2px solid var(--hko-glass-border);
}

/* Modal */
.hko-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99999;
}

.hko-modal-overlay.hko-active {
    opacity: 1;
    pointer-events: all;
}

.hko-modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    max-width: 90%;
    width: 400px;
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
}

.hko-modal-overlay.hko-active .hko-modal-content {
    transform: scale(1);
}

.hko-modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #10b981;
}

.hko-modal-content p {
    color: #cbd5e1;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.hko-modal-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: 16px;
}

.hko-m-stat {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 600;
}

.hko-modal-content .hko-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.hko-modal-content .hko-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.hko-modal-content .hko-btn:active {
    transform: translateY(1px);
}
