/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;800&family=Poppins:wght@700;800&display=swap');

/* --- DEĞİŞKENLER --- */
:root {
    --bg-dark: #0a0b1a;
    --bg-panel: #141529;
    --bg-card: rgba(30, 31, 59, 0.6);
    --accent-purple: #7c3aed;
    --accent-hover: #6d28d9;
    --gold: #fbbf24;
    --blue: #3b82f6;
    --red: #ef4444;
    --admin-red: #ff3e3e;
    --green: #4ade80;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-height: 75px;
}

/* --- TEMEL AYARLAR --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    background-image: radial-gradient(circle at top right, #1e1f3b 0%, #0a0b1a 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- RÜTBE TASARIMLARI (RANK SYSTEM) --- */
.rank-founder { color: #ff0000; text-shadow: 0 0 10px rgba(255, 0, 0, 0.6); font-weight: 800; }
.rank-admin { color: #ff8000; font-weight: 700; }
.rank-mod { color: #4ade80; font-weight: 700; }
.rank-legendary { color: var(--gold); text-shadow: 0 0 5px var(--gold); font-weight: 800; }
.rank-lord { color: #a855f7; font-weight: 700; }
.rank-captain { color: #3b82f6; font-weight: 700; }
.rank-native { color: var(--text-muted); }

/* --- NAVBAR --- */
.navbar {
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgba(10, 11, 26, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo a {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: white;
    text-decoration: none;
    letter-spacing: -1px;
    background: linear-gradient(to right, #fff, var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a:hover, .nav-links a.active { color: white; }

/* --- NAVBAR KULLANICI PANELİ --- */
.user-info-panel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-group {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.stat-item {
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-card-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass);
    padding: 4px 4px 4px 12px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
    cursor: pointer;
}

.user-text {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-text span { font-weight: 700; font-size: 0.85rem; }
.user-text small { font-size: 0.65rem; font-weight: 800; color: var(--gold); }

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
}

.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.logout-mini {
    background: rgba(239, 68, 68, 0.1);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.logout-mini:hover { background: var(--red); color: white; }

/* --- ANA WRAPPER --- */
.main-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
    padding: 30px 5%;
    max-width: 1600px;
    margin: 0 auto;
}

.card {
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 25px;
    position: relative;
    overflow: hidden;
}

/* --- LOBİ (INDEX) --- */
.center-stage {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 500px;
}

.hero-content { flex: 1; z-index: 2; }
.hero-content h1 {
    font-family: 'Poppins';
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

.badge {
    background: rgba(124, 58, 237, 0.2);
    color: var(--accent-purple);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 15px;
    display: inline-block;
}

.avatar-display {
    flex: 1;
    height: 450px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent;
}

.platform-shadow {
    position: absolute;
    bottom: 40px;
    width: 200px;
    height: 40px;
    background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.4) 0%, transparent 70%);
    border-radius: 50%;
}

/* --- BUTONLAR --- */
.btn-main {
    background: linear-gradient(135deg, var(--accent-purple), #9333ea);
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-main:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(124, 58, 237, 0.4); }

.pulse { animation: pulse-shadow 2s infinite; }
@keyframes pulse-shadow {
    0% { box-shadow: 0 0 0 0px rgba(124, 58, 237, 0.6); }
    100% { box-shadow: 0 0 0 15px rgba(124, 58, 237, 0); }
}

/* --- PROFİL SAYFASI --- */
.stat-box {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 15px;
    text-align: center;
}

.avatar-store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.avatar-item {
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
}

.avatar-item:hover { border-color: var(--accent-purple); transform: translateY(-5px); }

/* --- GÜZELLEŞTİRİLMİŞ ADMİN GİRİŞİ --- */
.admin-lock-screen {
    background: radial-gradient(circle at center, #1a0b2e 0%, #050505 100%) !important;
}

#admin-auth-screen .auth-container {
    max-width: 400px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.1);
    background: rgba(20, 21, 41, 0.8);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

#admin-auth-screen .auth-container::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, transparent, var(--admin-red), transparent);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#admin-secret-input {
    letter-spacing: 8px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.5);
    padding: 15px;
    margin: 25px 0;
    width: 100%;
    color: white;
    outline: none;
    border-radius: 15px;
}

#admin-secret-input:focus {
    border-color: var(--admin-red);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.shield-icon {
    font-size: 4rem;
    color: var(--admin-red);
    filter: drop-shadow(0 0 15px rgba(239, 68, 68, 0.5));
    margin-bottom: 15px;
}

/* --- ADMİN PANELİ USER ROW --- */
.user-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 100px;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    margin-bottom: 10px;
    border: 1px solid var(--glass-border);
}

/* --- MOBİL NAV --- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(10, 11, 26, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    justify-content: space-around;
    align-items: center;
    padding-bottom: 10px;
    z-index: 1001;
}

.mobile-nav a { color: var(--text-muted); font-size: 1.5rem; transition: 0.3s; }
.mobile-nav a.active { color: var(--accent-purple); }

/* --- RESPONSIVE TASARIM --- */
@media (max-width: 1100px) {
    .main-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .navbar { height: auto; padding: 15px; flex-direction: column; gap: 10px; }
    .nav-links, .stats-group { display: none; }
    .mobile-nav { display: flex; }
    .main-wrapper { padding: 15px; padding-bottom: 100px; }
    .center-stage { flex-direction: column; text-align: center; min-height: auto; }
    .hero-content { order: 2; margin-top: 20px; }
    .hero-content h1 { font-size: 2.2rem; }
    .avatar-display { order: 1; height: 320px; width: 100%; }
    .platform-shadow { bottom: 20px; width: 160px; }
    .user-text { display: none; }
    
    /* Admin Row Mobile */
    .user-row {
        grid-template-columns: 1fr 1fr;
        font-size: 0.8rem;
    }
    .user-row div:nth-child(n+3) { display: none; }
}

/* MODAL TASARIMI */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: var(--bg-panel);
    width: 90%;
    max-width: 600px;
    border-radius: 25px;
    padding: 30px;
    border: 1px solid var(--glass-border);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.modal-input-group label {
    display: block;
    font-size: 0.7rem;
    margin-bottom: 5px;
    color: var(--text-muted);
}

.modal-input-group input, .modal-input-group select {
    width: 100%;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
}