:root {
    --neon-green: #39ff14;
    --neon-amber: #ffbf00;
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --crt-bg: #0a0a0a;
}

/* --- ANA YAPILANDIRMA (Kritik Düzeltme) --- */
body { 
    background-color: var(--crt-bg); 
    background: radial-gradient(circle at center, #111 0%, #000 100%); 
    /* Mobil tarayıcı çubuklarını hesaba katan dinamik yükseklik */
    height: 100vh;      /* Fallback */
    height: 100dvh;     /* Modern mobil tarayıcılar için tam oturan yükseklik */
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow: hidden;   /* Kaydırmayı engelle */
    user-select: none;
    display: flex;
    flex-direction: column;
}

.font-press-start { font-family: 'Press Start 2P', cursive; }
.font-vt323 { font-family: 'VT323', monospace; font-size: 1.2rem; }

/* CRT Efektleri */
.crt-overlay { pointer-events: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 50; }
.scanlines {
    background: linear-gradient(to bottom, rgba(255,255,255,0) 60%, rgba(0,0,0,0.1) 60%);
    background-size: 100% 3px;
    opacity: 0.3;
}

/* Karusel Alanı */
.perspective-container { 
    perspective: 1000px; 
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible; 
}

.transform-style-3d { 
    transform-style: preserve-3d; 
    position: relative; 
    width: 100%; 
    height: 100%; 
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- KART TASARIMI (MASAÜSTÜ VARSAYILAN) --- */
.game-card {
    position: absolute;
    top: 50%; left: 50%;
    background: rgba(5, 5, 5, 0.95);
    border: 4px solid #333;
    
    /* Masaüstü Sabit Boyutlar */
    width: 300px; 
    height: 440px;
    margin-top: -220px; 
    margin-left: -150px;
    
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex; 
    flex-direction: column;
    justify-content: space-between;
    opacity: 0; 
    filter: grayscale(100%) brightness(0.7);
    z-index: 10;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

.game-card.active {
    opacity: 1; 
    transform: scale(1) translateZ(100px);
    border-color: var(--neon-blue); 
    filter: grayscale(0%) brightness(1); 
    z-index: 40; 
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.15);
    cursor: pointer;
}

.game-card.prev { 
    opacity: 0.3; 
    transform: translateX(-120%) translateZ(-200px) rotateY(25deg); 
    z-index: 5; pointer-events: none; 
}
.game-card.next { 
    opacity: 0.3; 
    transform: translateX(120%) translateZ(-200px) rotateY(-25deg); 
    z-index: 5; pointer-events: none;
}

.card-icon { 
    font-size: 6rem; 
    filter: drop-shadow(0 0 15px var(--neon-pink)); 
    animation: floatIcon 3s ease-in-out infinite; 
    margin-top: 10px;
}
@keyframes floatIcon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.nav-arrow { 
    position: absolute; top: 50%; transform: translateY(-50%); 
    font-size: 3rem; z-index: 60; cursor: pointer; color: rgba(255,255,255,0.3); padding: 20px;
}
.nav-arrow:hover { color: var(--neon-amber); text-shadow: 0 0 15px var(--neon-amber); opacity: 1; }
.left-arrow { left: 10px; }
.right-arrow { right: 10px; }

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 8px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #001100; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #00ff00; border-radius: 4px; }

/* --- MOBİL UYUMLULUK (TAM ÇÖZÜM) --- */
@media (max-width: 768px) {
    
    /* Header Sıkıştırma */
    header { padding-bottom: 5px !important; margin-bottom: 0 !important; }
    .header-content { flex-direction: column; gap: 2px; }
    
    /* İstatistikler (Yatay ve Sıkışık) */
    #live-stats { 
        display: flex; 
        flex-direction: row; 
        justify-content: center; 
        gap: 15px; 
        width: 100%;
        margin-top: 2px;
        padding-bottom: 5px;
        border-bottom: 1px solid #333;
    }
    .stat-box span { font-size: 0.9rem !important; } 

    /* KART BOYUTLARI (Responsive - Ekran Yüksekliğine Göre) */
    .game-card { 
        /* Ekranın %55'ini kapla (Böylece Header ve Footer'a yer kalır) */
        height: 55vh; 
        width: 75vw; /* Genişlik ekranın %75'i */
        
        /* Tam ortalamak için margin ayarı (height / 2) */
        margin-top: -27.5vh; 
        margin-left: -37.5vw; 
        
        border-width: 2px; 
    }
    
    .game-card.active { transform: scale(1) translateZ(30px); }
    
    /* Yan kartları biraz daha dışarı itip küçültelim */
    .game-card.prev { transform: translateX(-80%) translateZ(-150px) rotateY(15deg); }
    .game-card.next { transform: translateX(80%) translateZ(-150px) rotateY(-15deg); }

    /* İkon ve Yazı Boyutları Mobilde Küçülsün (Taşmayı Önler) */
    .card-icon { font-size: 3.5rem; margin-top: 10px; }
    
    /* Kart içi yazılar */
    .game-card p { font-size: 1rem !important; line-height: 1.1; margin-bottom: 10px !important; }
    .game-card h2 { font-size: 0.8rem !important; margin-bottom: 5px; }
    
    /* Oklar: Kenara yapışık */
    .nav-arrow { font-size: 2rem; padding: 10px; z-index: 70; }
    .left-arrow { left: 0; }
    .right-arrow { right: 0; }

    /* FOOTER GÖRÜNÜRLÜĞÜ */
    footer { 
        display: flex !important; 
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        padding: 4px 8px !important;
        margin-top: 0 !important;
        background: #000;
        z-index: 60;
        border-top: 1px solid #333;
        height: 52px; 
        flex-shrink: 0;
    }
    footer p { display: none; }
    footer > div { 
        width: 100%; 
        justify-content: center; 
        display: flex; 
        gap: 6px; 
    }
    footer button,
    footer a {
        font-size: 8px !important;
        padding: 6px 4px !important;
        width: auto !important;
        flex: 1;
        max-width: 110px;
        min-height: 40px;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.4;
        gap: 2px;
    }
}