/**
 * FerdiSoft 3D CBM & Container Loading Tool
 * Custom Styles & Glassmorphism
 * Author: FerdiSoft.Com.TR & FerdiGiden.Com.TR
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --bg-dark-1: #071426;
    --bg-dark-2: #102c53;
    --bg-dark-3: #121d42;
    --brand-primary: #3b82f6;
    --brand-accent: #8b5cf6;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark-1);
    color: #f8fafc;
    overflow-x: hidden;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Lojistik Izgara Arka Plan Deseni (Grid) */
.hero-grid-pattern {
    background-color: #071426;
    background-image: 
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.18) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
}

/* Özel Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0b1528;
}
::-webkit-scrollbar-thumb {
    background: #1e3a8a;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* 3D Viewport Konteyneri - Tam Duyarlı (Responsive) Yükseklikler */
#three-viewport-container {
    position: relative;
    width: 100%;
    height: 540px;
    background: radial-gradient(circle at center, #0f1c3f 0%, #080f21 100%);
    border-radius: 1rem;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

@media (max-width: 1024px) {
    #three-viewport-container {
        height: 440px;
    }
}

@media (max-width: 640px) {
    #three-viewport-container {
        height: 330px;
        border-radius: 0.75rem;
    }
}

/* Yatay Kaydırmalarda Scrollbar Gizleyici */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Dokunmatik Kaydırma Akıcılığı */
.touch-scroll-x {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Koli Hover Tooltip */
.box-hover-tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 50;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    font-size: 11px;
    color: #e2e8f0;
    transform: translate(-50%, -120%);
    transition: opacity 0.15s ease-out;
}

/* Özel Form Inputları */
.cbm-input {
    background-color: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.8);
    color: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.75rem;
    outline: none;
    transition: all 0.2s ease;
}
.cbm-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Ağırlık Merkezi Slider Göstergeleri */
.gauge-track {
    height: 8px;
    border-radius: 9999px;
    background: linear-gradient(90deg, #f43f5e 0%, #fbbf24 35%, #10b981 50%, #fbbf24 65%, #f43f5e 100%);
    position: relative;
}
.gauge-marker {
    position: absolute;
    top: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.6), 0 0 4px #3b82f6;
    border: 2px solid #3b82f6;
    transform: translateX(-50%);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Yazdırma & PDF Stilleri */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .no-print {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
}

/* Video Oynatıcı Slider & Kontrolleri */
#player-timeline-slider {
    -webkit-appearance: none;
    appearance: none;
    background: #1e293b;
    border-radius: 9999px;
    height: 7px;
    outline: none;
}
#player-timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #38bdf8;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}
#player-timeline-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    background: #60a5fa;
}
#player-timeline-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #38bdf8;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
    cursor: pointer;
}

/* ========================================================================= */
/* Tam Ekran Modu (Fullscreen Unified Layout & Collapsible Panel) */
/* ========================================================================= */
#viewport-wrapper:fullscreen,
#viewport-wrapper:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    padding: max(0.5rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left)) !important;
    background: #061325 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Tam Ekran Açıkken Normal Görünüm (Alt Panel Görünür) */
#viewport-wrapper:fullscreen #three-viewport-container,
#viewport-wrapper:-webkit-full-screen #three-viewport-container {
    height: 48vh !important;
    height: 48dvh !important;
    min-height: 280px !important;
    border-radius: 0.75rem !important;
    flex-shrink: 0 !important;
}

/* Tam Ekran & İsteğe Bağlı Gizlenmiş Durum (Alt Panel Kapalı - 3D Sahne Maksimum Büyür) */
#viewport-wrapper:fullscreen.panel-collapsed #three-viewport-container,
#viewport-wrapper:-webkit-full-screen.panel-collapsed #three-viewport-container {
    height: calc(100vh - 130px) !important;
    height: calc(100dvh - 130px) !important;
    min-height: calc(100vh - 130px) !important;
    flex: 1 1 auto !important;
}

/* Panel Gizlendiğinde */
#viewport-wrapper.panel-collapsed #fullscreen-lower-panel {
    display: none !important;
}

#viewport-wrapper:fullscreen #player-control-bar,
#viewport-wrapper:-webkit-full-screen #player-control-bar {
    margin-top: 0.4rem !important;
    margin-bottom: 0.4rem !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
    flex-shrink: 0 !important;
}

#viewport-wrapper:fullscreen #fullscreen-lower-panel,
#viewport-wrapper:-webkit-full-screen #fullscreen-lower-panel {
    margin-top: 0.35rem !important;
    padding-bottom: 2.5rem !important;
    width: 100% !important;
}

/* Senaryo Kartı Özel Stilleri (Görsel Birebir Eşleşmesi) */
.scenario-card-item {
    background-color: #0b1a30;
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 0.85rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}
.scenario-card-item:hover {
    border-color: rgba(56, 189, 248, 0.5);
    background-color: #0f2444;
    transform: translateY(-2px);
}
.scenario-card-item.active-scenario {
    background: linear-gradient(135deg, #092e44 0%, #071f30 100%) !important;
    border: 2px solid #06b6d4 !important;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.25) !important;
}


