:root {
    --color-bg-dark: #050505;
    --color-bg-panel: rgba(15, 15, 18, 0.85);
    --color-red: #ff1e1e;
    --color-red-glow: rgba(255, 30, 30, 0.5);
    --color-white: #ffffff;
    --color-text-muted: #888888;
    --color-border: #333333;
    --font-heading: 'Black Ops One', display;
    --font-body: 'Share Tech Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--color-bg-dark); color: var(--color-white); font-family: var(--font-body); overflow: hidden; user-select: none; }
.text-red { color: var(--color-red) !important; text-shadow: 0 0 5px var(--color-red-glow); }
.text-white { color: var(--color-white) !important; }

#battlefield-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; background: radial-gradient(circle at center, #111 0%, #000 100%); }

#ui-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100vh; z-index: 10; overflow-y: auto; padding: 20px; background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%); background-size: 100% 4px; }
#ui-wrapper::-webkit-scrollbar { width: 8px; } #ui-wrapper::-webkit-scrollbar-thumb { background: var(--color-red); }

.btn-military { font-family: var(--font-heading); letter-spacing: 1px; cursor: pointer; border: none; padding: 12px 20px; transition: 0.3s; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.btn-military.solid-red { background: var(--color-red); color: #fff; }
.btn-military.solid-red:hover { background: #ff4444; transform: scale(1.02); }
.btn-military.outline { background: rgba(255,30,30,0.1); color: var(--color-red); box-shadow: inset 0 0 0 1px var(--color-red); }
.btn-military.outline:hover { background: var(--color-red); color: #fff; }
.full-width { width: 100%; }

/* --- 3 KOLON DÜZENİ --- */
.battlefront-layout { display: grid; grid-template-columns: 320px 1fr 350px; gap: 20px; max-width: 1800px; margin: 0 auto; }

/* --- SOL PANEL (BATTLE CARD) --- */
.left-panel { display: flex; flex-direction: column; gap: 20px; }
.intel-box { background: var(--color-bg-panel); border: 1px solid var(--color-border); border-top: 3px solid var(--color-red); padding: 20px; }
.intel-box h4 { font-family: var(--font-heading); font-size: 20px; margin-bottom: 10px; }

.battle-card { background: rgba(10,10,10,0.9); border: 2px solid #444; border-left: 4px solid var(--color-red); overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.8); }
.card-header { display: flex; align-items: center; gap: 15px; padding: 15px; background: #1a1a1a; border-bottom: 1px solid #333; }
.card-header img { width: 60px; height: 60px; border-radius: 5px; border: 2px solid var(--color-red); }
.bc-info h3 { font-family: var(--font-heading); font-size: 18px; color: #fff; }
.bc-info span { font-size: 12px; color: var(--color-red); }
.card-body { padding: 15px; border-bottom: 1px dashed #333; }
.bc-stat { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px; }
.bc-stat span { color: var(--color-text-muted); }
.card-claim { padding: 15px; background: rgba(255,0,0,0.05); text-align: center; }
.claim-amount span { font-size: 12px; color: #888; }
.claim-amount h2 { font-size: 28px; margin: 5px 0 15px 0; font-family: var(--font-heading); }
.card-footer { padding: 10px 15px; background: #0a0a0a; text-align: center; font-size: 13px; color: #888; }

.ref-code-wrapper { display: flex; background: #000; border: 1px solid #444; }
#ref-code-display { flex: 1; padding: 10px; font-size: 18px; color: var(--color-red); text-align: center; font-weight: bold; }
.btn-copy { background: #333; color: #fff; border: none; padding: 0 15px; cursor: pointer; }

/* --- ORTA PANEL (DİKDÖRTGEN KARTLAR) --- */
.commanders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.commander-rect-card { background: var(--color-bg-panel); border: 1px solid var(--color-border); border-radius: 5px; overflow: hidden; display: flex; flex-direction: column; position: relative; transition: 0.3s; }
.commander-rect-card:hover { border-color: #666; box-shadow: 0 5px 15px rgba(255,0,0,0.2); }
.commander-rect-card.locked { opacity: 0.7; filter: grayscale(100%); border-color: #222; }

/* Komutan Resmi Alanı */
.cmd-image-area { 
    width: 100%; 
    height: 160px; 
    background-color: #111; /* Eski url placeholder silindi, sadece siyah arka plan kaldı */
    background-size: contain; /* Görseli kesmeden kutuya sığdır */
    background-repeat: no-repeat;
    background-position: center bottom; /* Karakterler havada uçmasın, alt çizgiye otursun */
    position: relative; 
    border-bottom: 2px solid var(--color-red); 
}
.cmd-name-tag { position: absolute; bottom: 0; left: 0; width: 100%; background: rgba(0,0,0,0.8); padding: 5px 10px; font-family: var(--font-heading); font-size: 18px; color: #fff; }

.cmd-stats { padding: 10px; background: #1a1a1a; display: flex; justify-content: space-between; font-size: 12px; border-bottom: 1px solid #333; }

/* Ekipman Slotları (2'li kolon düzeni) */
.equipment-slots-area { padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 300px; overflow-y: auto; }
.equipment-slots-area::-webkit-scrollbar { width: 4px; } .equipment-slots-area::-webkit-scrollbar-thumb { background: #444; }

.eq-rect-slot { height: 60px; border: 1px dashed #444; background: #0a0a0a; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; text-align: center; position: relative; transition: 0.2s; }
.eq-rect-slot:hover { border-color: var(--color-red); background: rgba(255,0,0,0.1); }
.eq-rect-slot.filled { 
    border-style: solid; 
    border-color: var(--color-red); 
    background-size: 70%; /* 'cover' yerine %70 yaptık, silah küçüldü ve kutuya sığdı */
    background-repeat: no-repeat;
    background-position: center 30%; /* Yazının altında ezilmemesi için biraz yukarı çektik */
}
.eq-rect-slot.filled span { background: rgba(0,0,0,0.7); width: 100%; font-size: 10px; position: absolute; bottom: 0; }

.cmd-overlay-btn { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 5; }

/* --- SAĞ PANEL (LEADERBOARD) --- */
.leaderboard-box { background: var(--color-bg-panel); border: 1px solid var(--color-border); border-top: 3px solid #ffcc00; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.leaderboard-box h4 { padding: 15px; font-family: var(--font-heading); color: #ffcc00; text-align: center; border-bottom: 1px solid #333; }
.lb-header { display: flex; justify-content: space-between; padding: 10px 15px; font-size: 12px; color: #888; border-bottom: 1px solid #222; }
.lb-list { flex: 1; overflow-y: auto; }
.lb-item { display: flex; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid #1a1a1a; font-size: 14px; align-items: center; }
.lb-item:nth-child(even) { background: rgba(255,255,255,0.02); }
.lb-item.top-1 { color: #ffcc00; font-weight: bold; background: rgba(255, 204, 0, 0.1); }
.lb-item.top-2 { color: #c0c0c0; }
.lb-item.top-3 { color: #cd7f32; }
.lb-item.is-me { background: rgba(255, 30, 30, 0.2); border-left: 3px solid var(--color-red); color: #fff; font-weight: bold; }
.lb-rank { width: 30px; } .lb-name { flex: 1; } .lb-power { color: var(--color-red); }

.lb-user-rank { background: #111; padding: 15px; border-top: 2px solid var(--color-red); text-align: center; }

/* --- MODALLAR VE TABLO --- */
.military-modal { 
    position: fixed; top:0; left:0; width:100%; height:100%; 
    background:rgba(0,0,0,0.9); z-index:2000; 
    display:flex; justify-content:center; align-items:center; 
}

.modal-wrapper { 
    background: var(--color-bg-dark); 
    border: 1px solid #333; 
    border-top: 3px solid var(--color-red); 
    width: 90%; 
    max-width: 600px; 
    padding: 25px; 
    position: relative; 
    /* EKRANA SIĞMASI VE İÇİNİN KAYDIRILABİLMESİ İÇİN EKLENENLER */
    max-height: 90vh; 
    display: flex; 
    flex-direction: column; 
}

.large-modal { max-width: 800px; }

.modal-title { margin-bottom: 20px; text-align: center; color: #fff; font-family: var(--font-heading); }

.close-btn { 
    position: absolute; top: 10px; right: 15px; 
    background: transparent; border: none; color: #fff; 
    font-size: 30px; cursor: pointer; z-index: 10;
}
.close-btn:hover { color: var(--color-red); }

/* LİSTENİN KENDİ İÇİNDE KAYMASI İÇİN */
.equipment-list { 
    overflow-y: auto; 
    flex: 1; 
    padding-right: 10px; 
}
.equipment-list::-webkit-scrollbar { width: 6px; }
.equipment-list::-webkit-scrollbar-thumb { background: var(--color-red); border-radius: 3px; }

/* TABLONUN KAYMASI İÇİN */
.table-responsive {
    overflow-y: auto;
    flex: 1;
}
.table-responsive::-webkit-scrollbar { width: 6px; }
.table-responsive::-webkit-scrollbar-thumb { background: var(--color-red); border-radius: 3px; }

.military-table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.military-table th { background: #1a1a1a; color: var(--color-red); padding: 12px; border-bottom: 2px solid #333; position: sticky; top: 0; }
.military-table td { padding: 12px; border-bottom: 1px solid #222; }

@media(max-width: 1200px) { .battlefront-layout { grid-template-columns: 280px 1fr; } .right-panel { display: none; } }
@media(max-width: 800px) { .battlefront-layout { grid-template-columns: 1fr; } }
/* =========================================
   KARŞILAMA EKRANI (LANDING SCREEN)
   ========================================= */
.landing-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    display: flex; justify-content: center; align-items: center; z-index: 50;
    background: rgba(5,5,5,0.7); backdrop-filter: blur(8px);
    transition: opacity 0.5s ease;
}

.landing-panel {
    background: var(--color-bg-panel); border: 1px solid var(--color-border); border-top: 4px solid var(--color-red);
    padding: 50px; text-align: center; max-width: 600px; box-shadow: 0 0 50px rgba(255,30,30,0.2);
}

.game-title { font-family: var(--font-heading); font-size: 56px; color: #fff; margin-bottom: 20px; text-shadow: 0 0 15px var(--color-red); }
.game-briefing { color: #ccc; font-size: 16px; margin-bottom: 30px; line-height: 1.6; }
.briefing-list { list-style: none; text-align: left; margin: 0 auto 40px auto; max-width: 350px; color: var(--color-text-muted); }
.briefing-list li { margin-bottom: 15px; border-bottom: 1px dashed #333; padding-bottom: 8px; font-size: 18px; }

/* =========================================
   SABİT 3 SÜTUNLU KOMUTAN IZGARASI (3x4)
   ========================================= */
.commanders-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* Otomatik sığdırmayı iptal ettik, kesin 3 sütun */
    gap: 20px; 
}

/* Küçük ekranlarda (Tablet/Telefon) sığması için responsive ayarı */
@media(max-width: 1400px) {
    .commanders-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width: 900px) {
    .commanders-grid { grid-template-columns: 1fr; }
}
/* =========================================
   WALLET SELECTION MODAL
   ========================================= */
.wallet-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.wallet-option {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-border);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.wallet-option img {
    width: 35px;
    height: 35px;
    border-radius: 5px;
}

.wallet-option span {
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 16px;
    letter-spacing: 1px;
}

.wallet-option:hover {
    border-color: var(--color-red);
    background: rgba(255, 30, 30, 0.1);
    transform: translateY(-2px);
}

@media(max-width: 600px) {
    .wallet-list { grid-template-columns: 1fr; }
}
/* =========================================
   YENİ ANA LOGO BUTONU (TAMAMEN HAYALET / PANELSİZ)
   ========================================= */
.btn-home-nav {
    position: absolute !important;
    top: 5px !important;
    left: 100px !important;
    background: transparent !important; /* Arka planı KESİN OLARAK YOK ET */
    border: none !important;            /* Çerçeveyi KESİN OLARAK YOK ET */
    outline: none !important;           /* Tıklama çizgisini YOK ET */
    box-shadow: none !important;        /* Kutu gölgesini YOK ET */
    padding: 0 !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    display: block !important;
    transition: transform 0.3s ease !important;
}

.btn-home-nav img {
    height: 100px !important; /* Görsel boyutu (İstersen artır) */
    width: auto !important;
    display: block !important;
    filter: drop-shadow(0 0 10px rgba(255, 30, 30, 0.8)); /* Hafif kırmızı parlama */
    transition: filter 0.3s ease !important;
}

/* Sadece görselin kendisi büyür ve parlar, arkada kutu falan olmaz */
.btn-home-nav:hover {
    transform: scale(1.1) !important; 
}

.btn-home-nav:hover img {
    filter: drop-shadow(0 0 20px rgba(255, 204, 0, 0.9)) !important; 
}
.fullscreen-welcome {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: #000; /* Resim yerine siyah arka plan, video üstüne binecek */
    display: flex; justify-content: center; align-items: flex-end; 
    z-index: 9999; 
    overflow: hidden; /* Video taşarsa gizle */
}

.bg-video {
    position: absolute; top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 1; /* Butonların arkasında kalsın */
    object-fit: cover;
    opacity: 0.8; /* Videoyu biraz koyulaştır ki butonlar net okunsun */
}

.welcome-buttons-wrapper {
    display: flex; gap: 40px; margin-bottom: 15%; 
}

.metal-btn {
    background: url('images/buton.png') no-repeat center center;
    background-size: 100% 100%; border: none;
    width: 250px; height: 90px; cursor: pointer;
    font-family: var(--font-heading); font-size: 32px; color: #fff;
    text-shadow: 0 0 10px #ff1e1e, 0 0 20px #ff1e1e, 2px 2px 0px #000;
    transition: transform 0.2s, color 0.2s;
    display: flex; justify-content: center; align-items: center;
}
.metal-btn:hover { transform: scale(1.05); color: #ffcc00; }

/* --- WIKI ODA TASARIMI --- */
.wiki-layout {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: url('images/welcome.jpg') no-repeat center center;
    background-size: cover;
    z-index: 9998; display: flex; justify-content: center; align-items: center;
}
.wiki-content {
    background: rgba(10,10,10,0.95); border: 2px solid var(--color-red);
    padding: 50px; max-width: 800px; width: 90%;
    box-shadow: 0 0 30px rgba(255,30,30,0.4); text-align: center;
}
/* =========================================
   GLOBAL HUD BUTONLARI (SAĞ/SOL ALT)
   ========================================= */
.bottom-left-huds { 
    position: fixed; bottom: 20px; left: 20px; 
    display: flex; gap: 15px; 
    z-index: 999999 !important; /* VİDEOLARI DELİP GEÇER */
    pointer-events: auto !important; 
}
.bottom-right-huds { 
    position: fixed; bottom: 20px; right: 20px; 
    display: flex; gap: 15px; 
    z-index: 999999 !important; /* VİDEOLARI DELİP GEÇER */
    pointer-events: auto !important; 
}

.hud-btn { 
    width: 50px; height: 50px; border-radius: 8px; 
    background: rgba(10,10,10,0.85); border: 1px solid #444; 
    color: #ccc; display: flex; justify-content: center; align-items: center; 
    font-size: 22px; cursor: pointer; text-decoration: none; transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.hud-btn:hover { 
    border-color: var(--color-red); color: #fff; 
    background: rgba(255,30,30,0.2); transform: scale(1.1); 
}
.hud-btn.active-music { color: #0f0; border-color: #0f0; box-shadow: 0 0 10px rgba(0,255,0,0.3); }


/* =========================================================
   4. KARŞILAMA EKRANI LOGO VE ANİMASYONU
   ========================================================= */
.entry-logo {
    /* Logo Bayağı Büyük (700px yapıyorum, eskiden 450px önermiştim) */
    width: 700px;
    max-width: 90vw; /* Küçük ekranlarda taşmasın */
    margin-bottom: 50px; /* Butonlarla ara açıldı */
    display: block;
    
    /* Parlama efekti */
    filter: drop-shadow(0 0 15px rgba(255, 30, 30, 0.6));
    
    /* Animasyon uygulanması (Nefes Alma + Süzülme) */
    animation: breathAndFloat 4s ease-in-out infinite;
}

/* Logonun hem büyüyüp parlaması hem yukarı aşağı süzülmesi */
@keyframes breathAndFloat {
    0% {
        transform: scale(1) translateY(0px);
        filter: drop-shadow(0 0 15px rgba(255, 30, 30, 0.6));
    }
    50% {
        /* %5 büyüsün (scale 1.05) ve -25px bayağı yukarı çıksın */
        transform: scale(1.05) translateY(-25px);
        filter: drop-shadow(0 0 35px rgba(255, 30, 30, 1)); /* Daha parlak */
    }
    100% {
        transform: scale(1) translateY(0px);
        filter: drop-shadow(0 0 15px rgba(255, 30, 30, 0.6));
    }
}
/* =========================================================
   WARZONE COM-LINK GÖRSEL EFEKTLERİ (AŞAMA 1.5 - MAT VE HİZALI)
   ========================================================= */

/* Büyütülmüş (Expanded) Chat Modu - Daha Küçük ve MAT */
.chat-box.expanded-mode {
    position: fixed !important;
    top: 15% !important; /* Biraz daha aşağıya çektik */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 65% !important; /* 90'dan 65'e düşürdük */
    max-width: 800px !important; /* 1200'den 800'e kıstık */
    height: 70vh !important; /* Boyunu kısalttık */
    z-index: 100000 !important;
    background: #08080a !important; /* TAMAMEN MAT - Arkası görünmez */
    box-shadow: 0 0 50px rgba(0,0,0,1), 0 0 20px rgba(29, 161, 242, 0.4) !important;
    border: 1px solid #1da1f2 !important;
    border-radius: 8px; /* Askeri köşeleri hafif yumuşattık */
}

/* Global Ekranı da DM gibi mat yapalım */
#view-global {
    background: #08080a !important;
}

/* Online/Offline Durum Noktası */
.status-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block; position: relative;
}
.status-dot.online { background-color: #0f0; box-shadow: 0 0 8px #0f0; animation: pulse-green 2s infinite; }
.status-dot.offline { background-color: #555; box-shadow: inset 0 0 2px #000; }

.friend-item { display: flex; align-items: center; justify-content: space-between; padding: 10px; background: #111; border: 1px solid #222; cursor: pointer; transition: 0.2s; }
.friend-item:hover { background: rgba(29, 161, 242, 0.1); border-color: #1da1f2; }
.chat-tab:hover { color: #fff !important; text-shadow: 0 0 5px #fff !important; }
#btn-expand-chat:hover { color: #fff !important; transform: scale(1.1); }

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(0, 255, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}
/* Tıklanan İsmin Üzerinde Açılan Komuta Menüsü */
.user-action-menu {
    position: fixed; /* absolute YERİNE fixed YAPTIK - EKRANIN NERESİNDE OLURSA OLSUN GÖRÜNÜR */
    background: rgba(10, 10, 12, 0.98);
    border: 1px solid #1da1f2;
    border-radius: 4px;
    padding: 5px;
    display: none; 
    flex-direction: column;
    gap: 5px;
    z-index: 1000000;
    box-shadow: 0 0 20px rgba(0,0,0,1);
    min-width: 120px;
}
.user-action-btn {
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    font-size: 10px;
    padding: 8px 10px;
    cursor: pointer;
    text-align: left;
    transition: 0.2s;
    border-radius: 3px;
    font-family: var(--font-body);
}
.user-action-btn:hover { 
    background: rgba(29, 161, 242, 0.2); 
    border-color: #1da1f2; 
    color: #1da1f2; 
}