/* *****************************************************************************
 * style.css - Sürüm: v3.5.30                                                *
 * Hasbi Erdoğmuş | 17 Yıllık Tecrübe - Hibrit Eğitim Mimarı Sürümü           *
 * Karargâh & Saha Tam Uyumlu - Kesin Footer ve Sayfa Düzeni Protokolü        *
 * *************************************************************************** */

/* --- 1. DEĞİŞKENLER VE TEMEL SIFIRLAMA --- */
:root {
    --neon-green: #39FF14;
    --dark-bg: #0a0a0a;
    --matrix-glow: 0 0 10px rgba(57, 255, 20, 0.5);
    --panel-bg: rgba(0, 0, 0, 0.95);
    --border-color: rgba(57, 255, 20, 0.4);
    --warning-red: #ff3e3e;
    --info-blue: #00d4ff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* STICKY FOOTER VE GENEL DÜZEN */
body {
    background-color: var(--dark-bg);
    color: var(--neon-green);
    font-family: 'Courier New', Courier, monospace;
    overflow-x: hidden;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Sayfayı tam ekran boyuna zorlar */
}

/* İçeriği yayarak footer'ı aşağı iten ana konteynerlar */
main, .operation-layout, .dashboard-container {
    flex: 1 0 auto; 
}

/* --- 2. ÜST VE ALT BİLGİ PANELLERİ (HEADER & FOOTER) --- */
.cyber-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2.5rem;
    border-bottom: 2px solid var(--neon-green);
    background: var(--panel-bg);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
    position: relative;
    z-index: 100;
}
#footer-placeholder {
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
}

.cyber-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #000; /* Kesin siyah arka plan */
    text-align: center;
    font-size: 0.9rem;
    color: var(--neon-green);
    letter-spacing: 1px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.7);
    width: 100%;
    margin-top: 0;
    flex-shrink: 0;
    z-index: 100;
}

.cyber-footer-content p {
    margin: 0;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(57, 255, 20, 0.3);
}

/* --- 3. GİRİŞ (INDEX) EKRANI - RESTORASYON --- */
.login-screen {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1; /* Ortadaki boşluğu doldurur */
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    filter: brightness(0.3) contrast(1.1);
}

.login-frame {
    background: rgba(0, 0, 0, 0.85);
    padding: 3.5rem;
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.3);
    text-align: center;
    backdrop-filter: blur(5px);
    max-width: 550px;
    margin: auto;
    z-index: 10;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--neon-green);
    padding-bottom: 15px;
    margin-bottom: 20px;
    min-height: 75px; /* Paneller arası başlık hizalaması için */
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 2.5rem;
}

/* --- 4. OPERASYON VE PANEL DÜZENLERİ --- */
.operation-layout {
    display: grid;
    grid-template-columns: 1fr 750px; /* Sağ panel genişliği artırıldı */
    gap: 25px;
    padding: 25px;
}

.visual-panel, .command-panel {
    border: 1px solid var(--neon-green);
    background: var(--panel-bg);
    padding: 20px;
    position: relative;
    box-shadow: inset 0 0 15px rgba(57, 255, 20, 0.05);
}

.visual-title-box {
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    text-align: center;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1rem;
    margin-top: 20px;
}

.command-panel {
    display: flex;
    flex-direction: column;
}

.map-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-top: none; /* Başlık kutusuyla birleşmesi için */
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 75vh; /* Yükseklik ayarlandı */
    min-height: 500px; /* Çok küçük ekranlarda harita kaybolmasın */
}

.map-frame img {
    max-width: 100%;
    height: auto;
    display: block; 
}

/* Harita içeriğini tutan ve boyutlarını belirleyen sarmalayıcı */
.map-viewport {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Harita iframe'i için eklenen stil */
.map-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    filter: hue-rotate(10deg); /* Temaya uyum için renk filtresi */
}

/* Leaflet Harita Konteynerı */
#leaflet-map-container {
    width: 100%;
    height: 100%;
    z-index: 5;
    position: absolute;
    top: 0;
    left: 0;
}

/* --- ZOOM KONTROL PANELİ --- */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 50; /* En üstte durması için */
    display: flex;
    flex-direction: column; /* Alt alta sırala */
    gap: 5px;
    background: rgba(0, 0, 0, 0.85);
    padding: 8px 15px;
    border: 1px solid var(--neon-green);
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.2);
}

.zoom-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zoom-controls label {
    color: var(--neon-green);
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 1px;
    min-width: 50px; /* Etiketleri hizala */
}

.zoom-controls input[type=range] {
    width: 100px;
    accent-color: var(--neon-green);
    cursor: pointer;
}

/* Mouse slider için farklı stil (Pasif görünüm) */
#mouse-zoom-slider {
    accent-color: var(--info-blue);
    cursor: default;
    opacity: 0.8;
}

.zoom-value-display {
    color: #fff;
    background: #000;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    min-width: 35px;
    text-align: center;
}

/* Harita üzerindeki menüleri engellemek için görünmez bariyer */
.map-overlay-barrier {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 18; /* Haritanın üzerinde, scan-line'ın altında */
    pointer-events: none; /* Tıklamaları haritaya geçirir */
    /* background: rgba(255,0,0,0.1); /* Hata ayıklama için */
}

/* --- HARİTA YÜKLEME EKRANI (LOADER) --- */
.map-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20; /* Tarama çizgisinin ve haritanın üzerinde */
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(57, 255, 20, 0.3);
    border-radius: 50%;
    border-top-color: var(--neon-green);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

.loader-text {
    color: var(--neon-green);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
    font-size: 0.9rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* --- 5. KARARGÂH (ADMIN) ÖZEL BİLEŞENLERİ --- */
.ops-instructions {
    margin-bottom: 30px;
}

.instruction-box {
    border: 1px solid var(--neon-green);
    background: rgba(0, 40, 0, 0.2);
    padding: 25px;
    box-shadow: inset 0 0 15px rgba(57, 255, 20, 0.1);
}

.instruction-box h3 {
    margin-top: 0;
    color: var(--neon-green);
    border-bottom: 1px solid var(--neon-green);
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-transform: uppercase;
}

.instruction-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.inst-item h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.inst-item h4::before {
    content: '▶';
    font-size: 0.8rem;
    margin-right: 10px;
    color: var(--neon-green);
}

.inst-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #ccc;
}

.inst-item.warning {
    border: 1px dashed var(--warning-red);
    padding: 15px;
    background: rgba(255, 0, 0, 0.05);
}

.inst-item.warning h4 {
    color: var(--warning-red);
}

/* --- 6. ETKİLEŞİM VE BUTONLAR --- */
.input-group {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.cyber-btn {
    background: transparent;
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
    padding: 12px 24px;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    font-weight: bold;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    display: inline-block;
    text-align: center;
}

.cyber-btn:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 15px var(--neon-green);
}

/* Görev 10 aktif olduğunda araçların konumu ve stili */
.extra-tools.mission-10-layout {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    background: var(--panel-bg);
    padding: 5px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    width: max-content; /* Butonların yan yana durmasını sağlar */
}

input[type="text"], input[type="number"], textarea, select {
    background: #000;
    color: var(--neon-green);
    border: 1px solid var(--border-color);
    padding: 12px;
    font-family: inherit;
    outline: none;
}

/* --- 7. VERİ TABLOLARI VE DASHBOARD --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.4);
}

th, td {
    border: 1px solid var(--border-color);
    padding: 18px;
    text-align: left;
}

.terminal-header {
    color: var(--neon-green);
    text-transform: uppercase;
    font-size: 1.3rem;
    /* Kenarlık, dolgu ve kenar boşlukları artık .panel-header tarafından yönetiliyor */
    margin: 0;
}

.terminal-log {
    flex-grow: 1;
    overflow-y: auto;
}

th {
    background: rgba(57, 255, 20, 0.15);
    color: #fff;
    text-transform: uppercase;
}

.id-tag {
    background: #111;
    border: 1px solid #333;
    padding: 4px 10px;
    color: var(--info-blue);
}

.neon-text {
    text-shadow: 0 0 8px var(--neon-green);
    font-weight: bold;
}

/* --- 8. TERMİNAL VE GÖREV GÜNLÜĞÜ MESAJLARI --- */
.terminal-msg {
    border: 1px solid rgba(57, 255, 20, 0.2);
    background: rgba(0, 20, 0, 0.6);
    padding: 15px;
    margin-bottom: 15px;
    border-left: 5px solid var(--neon-green);
    font-size: 0.95rem;
    animation: slideIn 0.3s ease-out;
}

.terminal-msg.warning { border-color: var(--warning-red); border-left-color: var(--warning-red); }
.terminal-msg.hint { border-color: var(--info-blue); border-left-color: var(--info-blue); }
.terminal-msg.success { border-color: var(--neon-green); }
.terminal-msg.briefing {
    border-left-color: var(--info-blue);
    color: var(--info-blue);
    font-weight: bold; /* Metni daha okunaklı yapmak için kalınlaştır */
}

/* --- 9. ANİMASYONLAR VE EFEKTLER --- */
.scan-line {
    width: 100%;
    height: 4px;
    background: var(--neon-green);
    opacity: 0.4;
    position: absolute;
    top: 0;
    z-index: 19; /* Haritanın ve bariyerin üzerinde */
    animation: scan 6s linear infinite;
    pointer-events: none;
}

@keyframes scan { 0% { top: 0; } 100% { top: 100%; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* --- 10. GLITCH EFEKTİ (EKLENDİ) --- */
.glitch-title {
    position: relative;
    color: var(--neon-green);
    font-size: 2rem;
    letter-spacing: 3px;
    text-shadow: 2px 2px var(--warning-red);
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    20% { transform: skew(-2deg); }
    40% { transform: skew(2deg); }
    60% { transform: skew(0deg); }
    80% { transform: skew(1deg); }
    100% { transform: skew(0deg); }
}

/* EOF: v3.5.30 - Takım Sayfası ve Footer Kurtarıldı. */

/* --- 11. YILDIZ BİLDİRİM ANİMASYONU --- */
.star-pulse {
    animation: starPulse 1s ease-in-out 3;
}

@keyframes starPulse {
    0% { transform: scale(1); text-shadow: 0 0 0px var(--neon-green); }
    50% { transform: scale(1.2); text-shadow: 0 0 20px var(--neon-green), 0 0 40px #fff; }
    100% { transform: scale(1); text-shadow: 0 0 0px var(--neon-green); }
}

/* MOBİL UYUMLULUK: 1024px altındaki ekranlarda tek sütuna geç (DOĞRU YERE TAŞINDI) */
@media (max-width: 1024px) {
    .operation-layout {
        grid-template-columns: 1fr; /* Tek sütunlu yapı */
    }
}

/* --- 12. SABİT İLETİŞİM MENÜSÜ --- */
.side-comms-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-right: 1px solid var(--neon-green);
    box-shadow: 5px 0 25px -10px var(--neon-green);
    transform: translateX(-100%);
    transition: transform 0.4s ease-in-out;
    z-index: 1100; /* Header'ın üzerinde */
    padding: 20px;
}

.side-comms-menu.active {
    transform: translateX(0);
}

.side-comms-menu h3 {
    color: var(--neon-green);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.side-comms-menu ul {
    list-style: none;
}

.side-comms-menu ul li a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(57, 255, 20, 0.2);
    transition: background 0.2s;
    font-size: 0.9rem;
}

.side-comms-menu ul li a:hover {
    background: rgba(57, 255, 20, 0.15);
    text-shadow: 0 0 5px #fff;
}

.comms-toggle {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 1200; /* Menünün üzerinde */
    display: flex;
    align-items: center;
    gap: 15px;
}

.comms-toggle-btn {
    background: var(--panel-bg);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 0 10px var(--neon-green);
}

.comms-toggle-btn:hover {
    transform: scale(1.1);
    background: var(--neon-green);
    color: #000;
}

.comms-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.7);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: var(--warning-red);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background-color: var(--warning-red);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--warning-red);
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 62, 62, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 62, 62, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 62, 62, 0);
    }
}

/* --- 13. KRİPTO ERİŞİM PANELİ --- */
.crypto-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    background-image:
        linear-gradient(rgba(57, 255, 20, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(57, 255, 20, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.crypto-panel {
    background: rgba(0, 0, 0, 0.9);
    padding: 2.5rem 3.5rem;
    border: 1px solid var(--neon-green);
    box-shadow: 0 0 40px rgba(57, 255, 20, 0.4);
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: 500px;
    width: 90%;
}

.crypto-panel h2 {
    color: var(--neon-green);
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.crypto-panel p {
    color: #ccc;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.crypto-input-group {
    display: flex;
    gap: 10px;
}

.crypto-input-group input {
    flex-grow: 1;
}

.crypto-error {
    color: var(--warning-red);
    margin-top: 1rem;
    font-weight: bold;
    height: 20px; /* prevent layout shift */
    text-shadow: 0 0 5px var(--warning-red);
}

.crypto-panel.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* --- 14. MODAL (POP-UP) PENCERESİ --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2100; /* Kripto panelinin (2000) üzerinde */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: #0a0a0a;
    margin: 4% auto;
    padding: 20px;
    border: 1px solid var(--neon-green);
    width: 85%;
    height: 90%;
    position: relative;
    box-shadow: 0 0 40px rgba(57, 255, 20, 0.3);
}

.modal-content .close-btn {
    position: absolute;
    right: 15px;
    top: 10px;
    color: var(--warning-red);
    font-size: 1.5rem;
    cursor: pointer;
    border: 1px solid var(--warning-red);
    padding: 5px 12px;
    line-height: 1;
    transition: all 0.2s;
    z-index: 10;
}
.modal-content .close-btn:hover { background: var(--warning-red); color: #000; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }