:root { 
    --primary: #44e1fe;       /* Neon Mavi */
    --primary-dim: #008cba;   
    --accent: #001f3f;        /* Gece Mavisi */
    --bg: #02040a;            /* Zifiri Siyah */
    --glass: rgba(10, 20, 40, 0.9);
    --hex-color: rgba(68, 225, 254, 0.05);
}

/* TÜM KUTULARI KONTROL ALTINA ALAN KOD */
* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0; 
    /* KRİTİK DÜZELTME: Yanlardan 15px boşluk bırakarak taşmayı engelliyoruz */
    padding: 100px 15px 0 15px !important;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #f5f5ff;
    background-color: var(--bg);
    overflow-x: hidden;
    display: flex; flex-direction: column; align-items: center;
}

/* ARKA PLAN (Noktalı & Mavi Işık) */
body::before {
    content: ''; position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(68, 225, 254, 0.2), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 31, 63, 0.6), transparent 50%);
    z-index: -2;
    animation: bgFlow 15s infinite alternate ease-in-out;
    pointer-events: none;
}
.grid-arka {
    position: fixed; inset: 0; z-index: -1;
    background-image: radial-gradient(#44e1fe 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.15; pointer-events: none;
}
@keyframes bgFlow { 0% { transform: translate(0,0); } 100% { transform: translate(5%, 5%); } }

/* HEADER */
#app-header { 
    position: fixed; top: 0; left: 0; width: 100%; height: 80px; 
    background: var(--glass); backdrop-filter: blur(12px); z-index: 9000; 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 0 20px; border-bottom: 1px solid rgba(68, 225, 254, 0.3);
    box-shadow: 0 0 30px rgba(68, 225, 254, 0.1); 
}
.app-logo { 
    font-weight: 900; font-size: 22px; color: #fff; text-decoration: none; 
    letter-spacing: 1px; text-transform: uppercase; text-shadow: 0 0 20px var(--primary);
    flex-shrink: 0;
} 
.app-logo span { color: var(--primary); }

.user-area { display: flex; align-items: center; justify-content: flex-end; flex: 1; min-width: 0; }

.user-btn { 
    background: rgba(68, 225, 254, 0.1); border: 1px solid var(--primary); color: #fff; 
    padding: 0 15px; border-radius: 6px; height: 38px; cursor: pointer; 
    display: flex; align-items: center; gap: 8px; font-weight: 700; transition: 0.3s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.user-btn:hover { background: var(--primary); color: #000; box-shadow: 0 0 20px var(--primary); }

/* MENÜLER & MODALLAR */
.user-dropdown { position: absolute; top: 70px; right: 15px; background: #050a14; border: 1px solid var(--primary); border-radius: 12px; width: 200px; display: none; flex-direction: column; overflow: hidden; box-shadow: 0 10px 50px rgba(0,0,0,0.9); z-index: 9100; }
.user-dropdown.active { display: flex; animation: slideDown 0.2s ease; }
.ud-item { padding: 15px; color: #ccc; text-decoration: none; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; display: block; transition: 0.2s; }
.ud-item:hover { background: var(--primary); color: #000; font-weight: bold; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 10000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-box { 
    background: #050a14; padding: 30px; border-radius: 16px; 
    border: 1px solid var(--primary); text-align: center; 
    width: 90%; max-width: 350px; 
    box-shadow: 0 0 50px rgba(68, 225, 254, 0.2); 
    overflow: hidden; 
}
.modal-title { font-size: 24px; font-weight: 900; color: var(--primary); margin-bottom: 20px; text-transform: uppercase; }
.modal-input { 
    width: 100% !important; padding: 14px; background: #111; 
    border: 1px solid #333; border-radius: 8px; color: #fff; margin-bottom: 20px; 
    outline: none; text-align: center; 
}
.modal-input:focus { border-color: var(--primary); box-shadow: 0 0 15px rgba(68, 225, 254, 0.3); }
.modal-btn { 
    width: 100% !important; padding: 14px; background: var(--primary); 
    border: none; border-radius: 8px; color: #000; font-weight: 900; 
    cursor: pointer; text-transform: uppercase; box-shadow: 0 0 20px rgba(68, 225, 254, 0.4); 
}

/* CHAT */
.chat-badge { position: absolute; top: -5px; right: -5px; background: #ff0055; color: #fff; font-size: 11px; font-weight: bold; min-width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid #000; opacity: 0; transform: scale(0); transition: 0.3s; z-index: 9600; pointer-events: none; }
.chat-badge.visible { opacity: 1; transform: scale(1); }
.chat-badge.pop { animation: badgePop 0.2s ease; }
@keyframes badgePop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }

#chat-fab { position: fixed; bottom: 30px; right: 25px; width: 60px; height: 60px; background: #000; border: 2px solid var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; cursor: pointer; z-index: 9500; color: var(--primary); box-shadow: 0 0 25px rgba(68, 225, 254, 0.4); }
.chat-panel { position: fixed; bottom: 105px; right: 25px; width: 340px; height: 450px; background: #050a14; border: 1px solid var(--primary); border-radius: 12px; display: none; flex-direction: column; z-index: 9500; overflow: hidden; box-shadow: 0 20px 60px #000; }
.chat-panel.active { display: flex; }
.chat-header { padding: 15px; background: rgba(68, 225, 254, 0.1); font-weight: bold; color: var(--primary); border-bottom: 1px solid rgba(68, 225, 254, 0.2); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 15px; display: flex; flex-direction: column; gap: 8px; }
.chat-input-area { display: flex; border-top: 1px solid #222; padding: 10px; background: #000; }
.chat-input { flex: 1; background: #111; border: none; padding: 10px; color: #fff; outline: none; border-radius: 4px; }
.chat-send { background: transparent; border: none; color: var(--primary); padding: 0 15px; cursor: pointer; font-weight: bold; font-size: 20px; }
.c-msg { color: #eee; background: rgba(255,255,255,0.05); padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.c-msg.admin { background: rgba(68, 225, 254, 0.1); border-left: 3px solid var(--primary); }

/* GRID & CARDS */
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; width: 100%; max-width: 1100px; padding: 0; box-sizing: border-box; justify-content: center; }
.game-card { background: rgba(5, 10, 20, 0.8); border: 1px solid rgba(68, 225, 254, 0.2); border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 15px; text-decoration: none; color: #fff; transition: 0.3s; }
.game-card:hover { transform: translateY(-5px); border-color: var(--primary); background: rgba(68, 225, 254, 0.05); box-shadow: 0 0 30px rgba(68, 225, 254, 0.15); }
.card-icon { width: 60px; height: 60px; border-radius: 12px; background: #000; display: flex; align-items: center; justify-content: center; font-size: 30px; border: 1px solid var(--primary); color: var(--primary); box-shadow: 0 0 15px rgba(68, 225, 254, 0.2); }
.card-title { font-size: 18px; font-weight: 800; text-transform: uppercase; }
.card-desc { font-size: 13px; color: #888; }

/* FEATURED GAME */
.featured-card { 
    background: linear-gradient(135deg, rgba(68, 225, 254, 0.15), rgba(0, 31, 63, 0.8)); 
    border: 2px solid var(--primary); 
    width: 100%; 
    max-width: 900px; 
    margin: 0 auto 30px auto; 
    border-radius: 20px; 
    padding: 30px; 
    text-align: center; position: relative; overflow: hidden;
    box-shadow: 0 0 40px rgba(68, 225, 254, 0.2);
}
.fc-title { font-size: 32px; font-weight: 900; color: var(--primary); margin-bottom: 10px; text-shadow: 0 0 20px var(--primary); }
.fc-desc { color: #fff; font-size: 16px; margin-bottom: 20px; }
.fc-badge { background: #ff0055; color: #fff; padding: 5px 15px; border-radius: 20px; font-size: 12px; font-weight: bold; position: absolute; top: 15px; right: 15px; box-shadow: 0 0 15px #ff0055; }

/* FOOTER BUTTONS */
.footer-links { margin: 40px auto; display: flex; flex-direction: column; gap: 15px; width: 100%; max-width: 400px; padding: 0; box-sizing: border-box; }
.f-btn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-radius: 50px; text-decoration: none; font-weight: 900; font-size: 16px; text-transform: uppercase; transition: 0.3s; border: 2px solid transparent; }
.f-tg { background: #29a9ea; color: #fff; box-shadow: 0 0 20px rgba(41, 169, 234, 0.4); }
.f-site { background: var(--primary); color: #000; box-shadow: 0 0 20px rgba(68, 225, 254, 0.4); }

/* --- MEDYA SORGULARI (MOBİL UYUM) --- */
@media (max-width: 768px) {
    .chat-panel { width: 90%; right: 5%; bottom: 100px; }
    .app-logo { font-size: 20px; }
    .user-btn { padding: 0 10px; font-size: 12px; height: 34px; }
    .featured-card { padding: 20px; margin-bottom: 20px; }
    .fc-title { font-size: 24px; }
    .fc-desc { font-size: 14px; }
    .fc-badge { font-size: 10px; padding: 4px 8px; top: 10px; right: 10px; }
    .main-logo { font-size: 32px !important; }
    .hero-text { font-size: 14px !important; }
}

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
