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

        :root {
            --bg-primary: #0a0e17;
            --bg-secondary: #111827;
            --bg-glass: rgba(15, 23, 42, 0.75);
            --border-glass: rgba(56, 189, 248, 0.15);
            --accent-cyan: #38bdf8;
            --accent-blue: #3b82f6;
            --accent-purple: #8b5cf6;
            --accent-green: #22d3ee;
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --text-muted: #64748b;
            --glow-cyan: 0 0 20px rgba(56, 189, 248, 0.3);
            --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
        }

        html,
        body {
            width: 100%;
            height: 100%;
            overflow: hidden;
            background: var(--bg-primary);
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            color: var(--text-primary);
        }

        /* ── Cesium container ── */
        #cesiumContainer {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
        }

        /* Override Cesium credit styling */
        .cesium-viewer-bottom {
            display: none !important;
        }

        .cesium-viewer .cesium-widget-credits {
            display: none !important;
        }

        /* ── Top bar ── */
        .top-bar {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 24px;
            background: linear-gradient(180deg, rgba(10, 14, 23, 0.95) 0%, rgba(10, 14, 23, 0.7) 100%);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--border-glass);
            z-index: 1000;
        }

        .logo-section {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .logo-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            box-shadow: var(--glow-cyan);
        }

        .logo-text {
            font-size: 18px;
            font-weight: 700;
            letter-spacing: 3px;
            background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .logo-subtitle {
            font-size: 10px;
            font-weight: 400;
            letter-spacing: 2px;
            color: var(--text-muted);
            text-transform: uppercase;
        }

        .status-section {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        .status-badge {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 14px;
            border-radius: 20px;
            background: rgba(34, 211, 238, 0.08);
            border: 1px solid rgba(34, 211, 238, 0.2);
            font-size: 11px;
            font-weight: 500;
            color: var(--accent-green);
            letter-spacing: 0.5px;
        }

        .status-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--accent-green);
            animation: pulse-dot 2s ease-in-out infinite;
        }

        @keyframes pulse-dot {

            0%,
            100% {
                opacity: 1;
                box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.4);
            }

            50% {
                opacity: 0.7;
                box-shadow: 0 0 0 4px rgba(34, 211, 238, 0);
            }
        }

        .clock {
            font-family: 'JetBrains Mono', monospace;
            font-size: 13px;
            color: var(--text-secondary);
            letter-spacing: 1px;
        }

        /* ── Sidebar ── */
        .sidebar {
            position: fixed;
            top: 56px;
            left: 0;
            bottom: 0;
            width: 52px;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 16px 0;
            gap: 8px;
            background: linear-gradient(180deg, rgba(10, 14, 23, 0.9) 0%, rgba(10, 14, 23, 0.75) 100%);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-right: 1px solid var(--border-glass);
            z-index: 999;
        }

        .sidebar-btn {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            border: 1px solid transparent;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            transition: all 0.25s ease;
            position: relative;
        }

        .sidebar-btn:hover {
            background: rgba(56, 189, 248, 0.08);
            border-color: var(--border-glass);
            color: var(--accent-cyan);
        }

        .sidebar-btn.active {
            background: rgba(56, 189, 248, 0.12);
            border-color: rgba(56, 189, 248, 0.3);
            color: var(--accent-cyan);
            box-shadow: var(--glow-cyan);
        }

        .sidebar-btn .tooltip {
            position: absolute;
            left: 48px;
            padding: 6px 12px;
            background: var(--bg-secondary);
            border: 1px solid var(--border-glass);
            border-radius: 6px;
            font-size: 11px;
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
            pointer-events: none;
            opacity: 0;
            transform: translateX(-4px);
            transition: all 0.2s ease;
        }

        .sidebar-btn:hover .tooltip {
            opacity: 1;
            transform: translateX(0);
        }

        .sidebar-divider {
            width: 24px;
            height: 1px;
            background: var(--border-glass);
            margin: 4px 0;
        }

        /* ── Info panels ── */
        .coords-panel {
            position: fixed;
            bottom: 20px;
            left: 72px;
            display: flex;
            gap: 12px;
            z-index: 998;
        }

        .coord-card {
            padding: 10px 16px;
            background: var(--bg-glass);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--border-glass);
            border-radius: 10px;
            min-width: 120px;
        }

        .coord-label {
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: var(--text-muted);
            margin-bottom: 4px;
        }

        .coord-value {
            font-family: 'JetBrains Mono', monospace;
            font-size: 13px;
            color: var(--accent-cyan);
            font-weight: 500;
        }

        /* ── Center Globe Button ── */
        .center-globe-btn {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            border: 1px solid var(--border-glass);
            background: var(--bg-glass);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            color: var(--accent-cyan);
            font-size: 22px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            line-height: 1;
            flex-shrink: 0;
        }

        .center-globe-btn:hover {
            background: rgba(56, 189, 248, 0.15);
            border-color: var(--accent-cyan);
            transform: scale(1.1);
        }

        /* ── Bottom Controls Bar ── */
        .bottom-controls {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 998;
            display: flex;
            align-items: flex-end;
            gap: 12px;
        }

        .bottom-menu {
            position: relative;
        }

        .bottom-menu-trigger {
            padding: 8px 16px;
            border-radius: 10px;
            border: 1px solid var(--border-glass);
            background: var(--bg-glass);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            color: var(--text-secondary);
            font-family: 'Inter', sans-serif;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
        }

        .bottom-menu-trigger:hover {
            color: var(--accent-cyan);
            border-color: var(--accent-cyan);
        }

        .bottom-menu.open .bottom-menu-trigger {
            color: var(--accent-cyan);
            border-color: var(--accent-cyan);
            background: rgba(56, 189, 248, 0.1);
        }

        .bottom-menu-items {
            position: absolute;
            bottom: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%) scaleY(0);
            transform-origin: bottom center;
            min-width: 160px;
            background: var(--bg-glass);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-glass);
            border-radius: 12px;
            padding: 6px;
            display: flex;
            flex-direction: column;
            gap: 2px;
            opacity: 0;
            pointer-events: none;
            transition: all 0.25s ease;
        }

        .bottom-menu.open .bottom-menu-items {
            transform: translateX(-50%) scaleY(1);
            opacity: 1;
            pointer-events: auto;
        }

        .bottom-menu-item {
            padding: 8px 12px;
            border: none;
            border-radius: 8px;
            background: transparent;
            color: var(--text-secondary);
            font-family: 'Inter', sans-serif;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            text-align: left;
            transition: all 0.15s ease;
            white-space: nowrap;
        }

        .bottom-menu-item:hover {
            background: rgba(56, 189, 248, 0.1);
            color: var(--text-primary);
        }

        .bottom-menu-item.active {
            color: var(--accent-cyan);
            background: rgba(56, 189, 248, 0.12);
        }

        .bmi-icon {
            margin-right: 6px;
        }

        /* ── Overlay Widget (always visible) ── */
        .overlay-widget {
            position: fixed;
            top: 76px;
            right: 20px;
            width: 220px;
            background: var(--bg-glass);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-glass);
            border-radius: 14px;
            padding: 12px;
            z-index: 998;
        }

        .overlay-widget .panel-header {
            margin-bottom: 10px;
            padding-bottom: 8px;
        }

        /* ── Layer panel ── */
        .layer-panel {
            position: fixed;
            top: 76px;
            right: 20px;
            width: 260px;
            background: var(--bg-glass);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-glass);
            border-radius: 14px;
            padding: 16px;
            z-index: 998;
            display: none;
        }

        .layer-panel.visible {
            display: block;
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-8px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .panel-header {
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1.5px;
            color: var(--text-secondary);
            margin-bottom: 14px;
            padding-bottom: 10px;
            border-bottom: 1px solid var(--border-glass);
        }

        .layer-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        }

        .layer-item:last-child {
            border-bottom: none;
        }

        /* ── Overlay Mode Selector ── */
        .overlay-mode-selector {
            display: flex;
            gap: 4px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            padding: 3px;
        }

        .overlay-mode-btn {
            flex: 1;
            padding: 7px 0;
            border: none;
            border-radius: 6px;
            background: transparent;
            color: var(--text-muted);
            font-family: 'Inter', sans-serif;
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            letter-spacing: 0.5px;
        }

        .overlay-mode-btn:hover {
            color: var(--text-secondary);
            background: rgba(255, 255, 255, 0.05);
        }

        .overlay-mode-btn.active {
            color: var(--accent-cyan);
            background: rgba(56, 189, 248, 0.12);
        }

        /* ── Overlay Density Slider ── */
        .overlay-density-row {
            margin-top: 10px;
            padding-top: 8px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
        }

        .overlay-density-row input[type="range"] {
            width: 100%;
            height: 4px;
            -webkit-appearance: none;
            appearance: none;
            background: rgba(56, 189, 248, 0.15);
            border-radius: 2px;
            outline: none;
            cursor: pointer;
            margin-top: 6px;
        }

        .overlay-density-row input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--accent-cyan);
            cursor: pointer;
        }

        .layer-item-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .layer-icon {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }

        .layer-name {
            font-size: 12px;
            font-weight: 500;
            color: var(--text-primary);
        }

        .layer-meta {
            font-size: 10px;
            color: var(--text-muted);
            margin-top: 2px;
        }

        /* Toggle switch */
        .toggle {
            width: 36px;
            height: 20px;
            border-radius: 10px;
            background: rgba(100, 116, 139, 0.3);
            border: 1px solid rgba(100, 116, 139, 0.2);
            position: relative;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .toggle.on {
            background: rgba(56, 189, 248, 0.25);
            border-color: rgba(56, 189, 248, 0.4);
        }

        .toggle::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 14px;
            height: 14px;
            border-radius: 50%;
            background: var(--text-muted);
            transition: all 0.3s ease;
        }

        .toggle.on::after {
            left: 18px;
            background: var(--accent-cyan);
            box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
        }

        /* ── Loading screen ── */
        .loading-overlay {
            position: fixed;
            inset: 0;
            background: var(--bg-primary);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            transition: opacity 0.8s ease, visibility 0.8s ease;
        }

        .loading-overlay.hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        .loading-spinner {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            border: 2px solid rgba(56, 189, 248, 0.1);
            border-top-color: var(--accent-cyan);
            animation: spin 1s linear infinite;
            margin-bottom: 24px;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .loading-text {
            font-size: 12px;
            font-weight: 500;
            letter-spacing: 3px;
            text-transform: uppercase;
            color: var(--text-muted);
            animation: pulse-text 2s ease-in-out infinite;
        }

        @keyframes pulse-text {

            0%,
            100% {
                opacity: 0.5;
            }

            50% {
                opacity: 1;
            }
        }

        /* ── Minimap ── */
        .minimap {
            position: fixed;
            bottom: 20px;
            right: 20px;
            width: 160px;
            height: 100px;
            background: var(--bg-glass);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--border-glass);
            border-radius: 10px;
            overflow: hidden;
            z-index: 998;
        }

        .minimap canvas {
            width: 100%;
            height: 100%;
        }

        /* ── Cesium overrides ── */
        .cesium-viewer-toolbar,
        .cesium-viewer-animationContainer,
        .cesium-viewer-timelineContainer,
        .cesium-viewer-fullscreenContainer,
        .cesium-viewer-vrContainer,
        .cesium-viewer-geocoderContainer {
            display: none !important;
        }

        .cesium-viewer-infoBoxContainer {
            display: none !important;
        }

        /* ── Search bar ── */
        .search-container {
            position: fixed;
            top: 76px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 998;
            width: 380px;
            display: none;
        }

        .search-container.visible {
            display: block;
            animation: slideIn 0.3s ease;
        }

        .search-input {
            width: 100%;
            padding: 12px 18px 12px 42px;
            background: var(--bg-glass);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid var(--border-glass);
            border-radius: 12px;
            font-family: 'Inter', sans-serif;
            font-size: 13px;
            color: var(--text-primary);
            outline: none;
            transition: border-color 0.3s ease;
        }

        .search-input::placeholder {
            color: var(--text-muted);
        }

        .search-input:focus {
            border-color: rgba(56, 189, 248, 0.4);
            box-shadow: var(--glow-cyan);
        }

        .search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
            color: var(--text-muted);
        }

        /* ── Atmosphere glow scanline ── */
        .scanline {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
            opacity: 0.15;
            animation: scanline-move 8s linear infinite;
            pointer-events: none;
            z-index: 997;
        }

        @keyframes scanline-move {
            0% {
                top: 0;
            }

            100% {
                top: 100%;
            }
        }

        /* ═══════════════════════════════════════════════
           RESPONSIVE — Tablet (≤ 768px)
           ═══════════════════════════════════════════════ */
        @media (max-width: 768px) {

            /* Top bar: compact */
            .top-bar {
                height: 48px;
                padding: 0 14px;
            }

            .logo-icon {
                width: 28px;
                height: 28px;
                font-size: 14px;
            }

            .logo-text {
                font-size: 15px;
                letter-spacing: 2px;
            }

            .logo-subtitle {
                display: none;
            }

            .clock {
                font-size: 11px;
            }

            .status-badge {
                padding: 4px 10px;
                font-size: 10px;
            }

            /* Sidebar → bottom bar */
            .sidebar {
                top: auto;
                bottom: 0;
                left: 0;
                right: 0;
                width: 100%;
                height: 56px;
                flex-direction: row;
                justify-content: center;
                padding: 0 8px;
                gap: 4px;
                border-right: none;
                border-top: 1px solid var(--border-glass);
                overflow-x: auto;
                overflow-y: hidden;
                -webkit-overflow-scrolling: touch;
            }

            .sidebar-btn {
                width: 44px;
                height: 44px;
                min-width: 44px;
                font-size: 18px;
            }

            .sidebar-btn .tooltip {
                display: none;
            }

            .sidebar-divider {
                width: 1px;
                height: 24px;
                margin: 0 2px;
            }

            /* Coords panel */
            .coords-panel {
                left: 12px;
                right: 12px;
                bottom: 68px;
                gap: 8px;
                justify-content: center;
            }

            .coord-card {
                padding: 8px 12px;
                min-width: 90px;
                flex: 1;
            }

            .coord-value {
                font-size: 12px;
            }

            /* Search */
            .search-container {
                width: calc(100% - 24px);
                left: 12px;
                right: 12px;
                top: 60px;
                transform: none;
            }

            /* Layer panel */
            .layer-panel {
                top: auto;
                bottom: 68px;
                left: 12px;
                right: 12px;
                width: auto;
                max-height: 50vh;
                overflow-y: auto;
            }

            /* Minimap: hide on tablet */
            .minimap {
                display: none;
            }
        }

        /* ═══════════════════════════════════════════════
           RESPONSIVE — Phone (≤ 480px)
           ═══════════════════════════════════════════════ */
        @media (max-width: 480px) {

            .top-bar {
                height: 44px;
                padding: 0 10px;
            }

            .logo-icon {
                width: 24px;
                height: 24px;
                font-size: 12px;
                border-radius: 6px;
            }

            .logo-section {
                gap: 8px;
            }

            .logo-text {
                font-size: 13px;
                letter-spacing: 1.5px;
            }

            .status-section {
                gap: 8px;
            }

            .clock {
                display: none;
            }

            .status-badge {
                font-size: 9px;
                padding: 3px 8px;
                gap: 5px;
            }

            /* Bottom bar: tighter */
            .sidebar {
                height: 52px;
                gap: 2px;
                padding: 0 4px;
            }

            .sidebar-btn {
                width: 40px;
                height: 40px;
                min-width: 40px;
                font-size: 16px;
                border-radius: 8px;
            }

            /* Coords: single row, very compact */
            .coords-panel {
                bottom: 62px;
                gap: 6px;
            }

            .coord-card {
                padding: 6px 8px;
                min-width: 70px;
                border-radius: 8px;
            }

            .coord-label {
                font-size: 8px;
                letter-spacing: 1px;
            }

            .coord-value {
                font-size: 11px;
            }

            /* Search */
            .search-container {
                top: 54px;
            }

            .search-input {
                padding: 10px 14px 10px 38px;
                font-size: 14px;
                border-radius: 10px;
            }

            /* Layer panel */
            .layer-panel {
                bottom: 62px;
                left: 8px;
                right: 8px;
                border-radius: 12px;
                padding: 14px;
                max-height: 55vh;
            }

            .layer-item {
                padding: 12px 0;
            }

            .toggle {
                width: 40px;
                height: 22px;
            }

            .toggle::after {
                width: 16px;
                height: 16px;
            }

            .toggle.on::after {
                left: 20px;
            }

            /* Scanline: hide on small phones for perf */
            .scanline {
                display: none;
            }
        }

        /* ── Radar Theme Effects ── */
        .radar-filters {
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 400;
            /* above globe, below UI */
        }

        .radar-mask {
            position: absolute;
            inset: 0;
            background: radial-gradient(circle 45vh at center, transparent 96%, rgba(0, 0, 0, 0.8) 98%, #000 100%);
        }

        .radar-scanlines {
            position: absolute;
            inset: 0;
            background: repeating-linear-gradient(0deg,
                    rgba(0, 0, 0, 0.4),
                    rgba(0, 0, 0, 0.4) 2px,
                    transparent 2px,
                    transparent 4px);
            opacity: 0.9;
        }

        /* Touch-device helpers */
        @media (hover: none) and (pointer: coarse) {
            .sidebar-btn:active {
                background: rgba(56, 189, 248, 0.15);
                transform: scale(0.92);
            }

            .toggle:active {
                transform: scale(0.95);
            }
        }

        /* ── Visual Style Presets ── */
        .visual-style-crt #cesiumContainer {
            filter: contrast(1.2) brightness(0.9);
        }
        .visual-style-crt .scanline {
            opacity: 0.4 !important;
            display: block !important;
        }
        .visual-style-crt::after {
            content: '';
            position: fixed;
            inset: 0;
            background: repeating-linear-gradient(0deg,
                rgba(0, 0, 0, 0.15) 0px,
                rgba(0, 0, 0, 0.15) 1px,
                transparent 1px,
                transparent 3px);
            pointer-events: none;
            z-index: 399;
        }

        .visual-style-nvg #cesiumContainer {
            filter: brightness(0.7) contrast(1.3) saturate(0.1) sepia(1) hue-rotate(70deg) brightness(1.1);
        }
        .visual-style-nvg .scanline {
            background: linear-gradient(90deg, transparent, #00ff44, transparent) !important;
            opacity: 0.2 !important;
            display: block !important;
        }

        .visual-style-flir #cesiumContainer {
            filter: brightness(0.8) contrast(1.4) saturate(0) invert(1) hue-rotate(180deg);
        }
        .visual-style-flir .scanline {
            background: linear-gradient(90deg, transparent, #ff6600, transparent) !important;
            opacity: 0.15 !important;
            display: block !important;
        }

        .visual-style-scanline .scanline {
            display: block !important;
            opacity: 0.25 !important;
        }
        
