/* ============================================================
   BIANEYE — GLOBAL INTELLIGENCE PLATFORM
   Futuristic Holographic Design System
   ============================================================ */

:root {
    /* Core Colors */
    --bg-primary: #0a0e17;
    --bg-secondary: #0d1321;
    --bg-tertiary: #111827;
    --bg-panel: rgba(13, 19, 33, 0.85);
    --bg-card: rgba(17, 24, 39, 0.7);

    /* Holographic Palette */
    --holo-cyan: #00f0ff;
    --holo-blue: #3b82f6;
    --holo-purple: #a855f7;
    --holo-pink: #ec4899;
    --holo-green: #00ff88;
    --holo-yellow: #fbbf24;
    --holo-orange: #ff8c00;
    --holo-red: #ff3355;

    /* Text */
    --text-primary: #e2e8f0;
    --text-secondary: rgba(226, 232, 240, 0.6);
    --text-dim: rgba(226, 232, 240, 0.3);
    --text-glow: #00f0ff;

    /* Borders */
    --border-subtle: rgba(0, 240, 255, 0.08);
    --border-glow: rgba(0, 240, 255, 0.25);
    --border-active: rgba(0, 240, 255, 0.5);

    /* Glass */
    --glass-bg: rgba(13, 19, 33, 0.75);
    --glass-border: rgba(0, 240, 255, 0.12);
    --glass-blur: 20px;

    /* Shadows */
    --shadow-glow: 0 0 30px rgba(0, 240, 255, 0.15);
    --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.5);

    /* Sizing */
    --sidebar-w: 320px;
    --intel-w: 340px;
    --cmd-h: 52px;
    --tab-w: 48px;

    /* Fonts */
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Orbitron', sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.4);
}

::selection {
    background: rgba(0, 240, 255, 0.3);
    color: #fff;
}

/* ============================================================
   BOOT SCREEN
   ============================================================ */

.boot-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: radial-gradient(ellipse at center, #0d1321 0%, #050810 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.boot-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot-content {
    text-align: center;
}

.boot-logo {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.holo-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid transparent;
    border-top-color: var(--holo-cyan);
    animation: holoSpin 3s linear infinite;
}

.ring-1 {
    width: 100%;
    height: 100%;
    border-top-color: var(--holo-cyan);
    animation-duration: 3s;
}

.ring-2 {
    width: 80%;
    height: 80%;
    border-top-color: var(--holo-purple);
    animation-duration: 2s;
    animation-direction: reverse;
}

.ring-3 {
    width: 60%;
    height: 60%;
    border-top-color: var(--holo-pink);
    animation-duration: 1.5s;
}

.boot-icon {
    font-size: 42px;
    color: var(--holo-cyan);
    text-shadow: 0 0 30px var(--holo-cyan), 0 0 60px rgba(0, 240, 255, 0.3);
    animation: bootPulse 2s ease-in-out infinite;
}

.boot-title {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 12px;
    color: #fff;
    text-shadow: 0 0 40px var(--holo-cyan), 0 0 80px rgba(0, 240, 255, 0.2);
}

.boot-subtitle {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 6px;
    color: var(--holo-cyan);
    margin-top: 8px;
    opacity: 0.7;
}

.boot-progress {
    width: 280px;
    height: 3px;
    margin: 30px auto 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.boot-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--holo-cyan), var(--holo-purple));
    box-shadow: 0 0 15px var(--holo-cyan);
    transition: width 0.3s ease;
}

.boot-status {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

/* ============================================================
   COMMAND BAR
   ============================================================ */

.command-bar {
    height: var(--cmd-h);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    position: relative;
    z-index: 100;
    overflow: hidden;
}

.command-bar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--holo-cyan), var(--holo-purple), transparent);
    opacity: 0.4;
}

.cmd-left,
.cmd-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cmd-left {
    flex-shrink: 0;
}

.cmd-right {
    flex-shrink: 1;
    min-width: 0;
}

.cmd-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

.cmd-status {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--holo-green);
    white-space: nowrap;
    opacity: 0.7;
}

.logo-compact {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 20px;
    color: var(--holo-cyan);
    text-shadow: 0 0 20px var(--holo-cyan);
    animation: logoPulse 4s ease-in-out infinite;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 4px;
    color: #fff;
}

.defcon-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 4px;
    background: rgba(255, 170, 0, 0.08);
    border: 1px solid rgba(255, 170, 0, 0.25);
    animation: defconPulse 3s ease-in-out infinite;
}

.defcon-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.defcon-level {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--holo-orange);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0 14px;
    flex: 1;
    max-width: 520px;
    min-width: 200px;
    height: 36px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-bar:focus-within {
    border-color: var(--border-active);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1), inset 0 0 20px rgba(0, 240, 255, 0.03);
}

.search-icon {
    color: var(--text-dim);
    font-size: 12px;
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    outline: none;
}

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

.search-kbd {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-dim);
}

.cmd-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.cmd-btn:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--border-glow);
    color: var(--holo-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.cmd-btn.active {
    background: rgba(0, 240, 255, 0.12);
    border-color: var(--holo-cyan);
    color: var(--holo-cyan);
}

/* 3D/2D Mode toggle — more prominent than other cmd-btns */
.cmd-btn.mode-toggle {
    width: auto;
    min-width: auto;
    padding: 0 12px;
    gap: 6px;
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.25);
}

.cmd-btn.mode-toggle .mode-label {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.cmd-btn.mode-toggle:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--holo-cyan);
}

.cmd-btn.mode-toggle.active {
    background: rgba(0, 240, 255, 0.18);
    border-color: var(--holo-cyan);
    color: #00f0ff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

.clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-mono);
    line-height: 1.2;
}

.clock-utc {
    font-size: 12px;
    color: var(--holo-cyan);
    font-weight: 600;
}

.clock-local {
    font-size: 10px;
    color: var(--text-dim);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* ============================================================
   LEFT SIDEBAR
   ============================================================ */

.sidebar {
    width: var(--sidebar-w);
    display: flex;
    flex-shrink: 0;
    background: var(--glass-bg);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    position: relative;
    z-index: 50;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: var(--tab-w);
}

.sidebar.collapsed .sidebar-content {
    display: none;
}

.sidebar.collapsed .sidebar-collapse i {
    transform: rotate(180deg);
}

.sidebar-tabs {
    width: var(--tab-w);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-subtle);
    padding: 8px 0;
    gap: 2px;
}

.stab {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 15px;
    transition: all 0.3s;
    position: relative;
}

.stab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
}

.stab.active {
    color: var(--holo-cyan);
    text-shadow: 0 0 15px var(--holo-cyan);
}

.stab.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 24px;
    border-radius: 2px;
    background: var(--holo-cyan);
    box-shadow: 0 0 10px var(--holo-cyan);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-collapse {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glow);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 60;
    transition: all 0.3s;
}

.sidebar-collapse:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--holo-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Sidebar Panels */
.spanel {
    display: none;
    padding: 14px;
}

.spanel.active {
    display: block;
}

.spanel-title {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--holo-cyan);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.spanel-title i {
    margin-right: 8px;
}

/* ============================================================
   LAYER TOGGLES
   ============================================================ */

.layer-group {
    margin-bottom: 4px;
}

.layer-group.exclusive .layer-group-header {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    border-color: rgba(168, 85, 247, 0.2);
}

.layer-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s;
}

.layer-group-header:hover {
    background: rgba(0, 240, 255, 0.04);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.layer-group-header i:first-child {
    color: var(--holo-cyan);
    font-size: 12px;
}

.layer-group-header span {
    flex: 1;
}

.group-arrow {
    font-size: 10px;
    transition: transform 0.3s;
}

.layer-group-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding-left: 12px;
}

.layer-group-items.open {
    max-height: 600px;
}

.layer-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-secondary);
    border-radius: 3px;
    transition: all 0.2s;
}

.layer-toggle:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.layer-toggle input {
    display: none;
}

.layer-toggle input:checked+.lt-dot {
    box-shadow: 0 0 8px currentColor;
    transform: scale(1.2);
}

.layer-toggle input:checked~* {
    color: var(--text-primary);
}

.lt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s;
}

.dot-red {
    background: var(--holo-red);
    color: var(--holo-red);
}

.dot-blue {
    background: var(--holo-blue);
    color: var(--holo-blue);
}

.dot-green {
    background: var(--holo-green);
    color: var(--holo-green);
}

.dot-yellow {
    background: var(--holo-yellow);
    color: var(--holo-yellow);
}

.dot-orange {
    background: var(--holo-orange);
    color: var(--holo-orange);
}

.dot-purple {
    background: var(--holo-purple);
    color: var(--holo-purple);
}

.dot-cyan {
    background: var(--holo-cyan);
    color: var(--holo-cyan);
}

.dot-gray {
    background: #6b7280;
    color: #6b7280;
}

/* ============================================================
   MILITARY PANEL
   ============================================================ */

.mil-section {
    margin-bottom: 18px;
}

.mil-header {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--holo-cyan);
    margin-bottom: 10px;
    opacity: 0.8;
}

.mil-header i {
    margin-right: 6px;
}

/* ORBAT */
.orbat-unit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: var(--bg-card);
    border-radius: 4px;
    border-left: 3px solid var(--holo-blue);
}

.nato-symbol {
    width: 28px;
    height: 20px;
    border: 2px solid var(--holo-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--holo-cyan);
}

.nato-symbol.infantry::after {
    content: '✕';
}

.nato-symbol.armor::after {
    content: '◇';
}

.nato-symbol.air {
    border-radius: 0 0 50% 50%;
}

.nato-symbol.air::after {
    content: '≈';
}

.orbat-unit span:nth-child(2) {
    flex: 1;
    font-size: 12px;
}

.readiness {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1px;
    font-weight: 600;
}

.readiness.green {
    color: var(--holo-green);
}

.readiness.yellow {
    color: var(--holo-yellow);
}

.readiness.red {
    color: var(--holo-red);
}

/* Threat Matrix */
.threat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.threat-cat {
    width: 65px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.threat-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.threat-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
    box-shadow: 0 0 8px currentColor;
}

.threat-val {
    font-family: var(--font-display);
    font-size: 12px;
    width: 28px;
    text-align: right;
    color: var(--text-primary);
}

/* Kill Chain */
.killchain {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
}

.kc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    min-width: 50px;
    transition: all 0.3s;
    cursor: pointer;
}

.kc-step:hover {
    border-color: var(--border-glow);
    background: rgba(0, 240, 255, 0.05);
}

.kc-step.active {
    border-color: var(--holo-cyan);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.kc-icon {
    font-size: 16px;
}

.kc-step span:last-child {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 1px;
}

.kc-connector {
    width: 12px;
    height: 1px;
    background: var(--border-glow);
}

/* ISR */
.isr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 3px;
    background: var(--bg-card);
    border-radius: 4px;
}

.isr-asset {
    flex: 1;
    font-family: var(--font-mono);
    font-size: 11px;
}

.isr-time {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
}

.isr-badge {
    font-size: 8px;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-weight: 600;
}

.isr-badge.active {
    background: rgba(0, 255, 136, 0.1);
    color: var(--holo-green);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.isr-badge.standby {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================
   INTEL PANEL (Sidebar)
   ============================================================ */

.intel-section {
    margin-bottom: 18px;
}

.intel-header {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--holo-cyan);
    margin-bottom: 10px;
    opacity: 0.8;
}

.intel-header i {
    margin-right: 6px;
}

.news-feed {
    max-height: 250px;
    overflow-y: auto;
}

.news-item {
    padding: 10px;
    margin-bottom: 4px;
    border-radius: 4px;
    background: var(--bg-card);
    border-left: 3px solid var(--holo-blue);
    cursor: pointer;
    transition: all 0.2s;
}

.news-item:hover {
    background: rgba(0, 240, 255, 0.05);
    border-left-color: var(--holo-cyan);
}

.news-title {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
}

.news-source {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
}

.news-time {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--holo-cyan);
}

.news-skeleton {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin-bottom: 6px;
    animation: shimmer 1.5s infinite;
}

.news-skeleton.short {
    width: 60%;
}

.chart-container {
    padding: 4px;
}

.country-profile .hint-text {
    font-size: 11px;
    color: var(--text-dim);
    font-style: italic;
}

/* Health Panel */
.outbreak-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 4px;
    background: var(--bg-card);
    border-radius: 4px;
}

.outbreak-name {
    flex: 1;
    font-size: 12px;
}

.outbreak-badge {
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    font-weight: 600;
}

.outbreak-badge.critical {
    background: rgba(255, 51, 85, 0.1);
    color: var(--holo-red);
    border: 1px solid rgba(255, 51, 85, 0.2);
}

.outbreak-badge.high {
    background: rgba(255, 170, 0, 0.1);
    color: var(--holo-orange);
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.outbreak-badge.medium {
    background: rgba(251, 191, 36, 0.1);
    color: var(--holo-yellow);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* ============================================================
   ANALYSIS PANEL
   ============================================================ */

.analysis-section {
    margin-bottom: 18px;
}

.analysis-header {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--holo-cyan);
    margin-bottom: 10px;
    opacity: 0.8;
}

.analysis-header i {
    margin-right: 6px;
}

.graph-container {
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.graph-controls {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.graph-btn {
    flex: 1;
    padding: 6px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.3s;
}

.graph-btn:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--border-glow);
    color: var(--holo-cyan);
}

.graph-btn i {
    margin-right: 4px;
}

/* Prediction Cards */
.pred-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin-bottom: 4px;
    background: var(--bg-card);
    border-radius: 4px;
    border-left: 3px solid var(--holo-blue);
}

.pred-region {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
}

.pred-score {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
}

.pred-score.critical {
    color: var(--holo-red);
}

.pred-score.high {
    color: var(--holo-orange);
}

.pred-score.medium {
    color: var(--holo-yellow);
}

.pred-score.low {
    color: var(--holo-green);
}

.pred-trend {
    font-family: var(--font-mono);
    font-size: 10px;
}

.pred-trend.up {
    color: var(--holo-red);
}

.pred-trend.down {
    color: var(--holo-green);
}

/* Disinfo */
.disinfo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 4px;
    background: var(--bg-card);
    border-radius: 4px;
}

.disinfo-narrative {
    width: 100px;
    font-size: 11px;
    flex-shrink: 0;
}

.disinfo-bar {
    flex: 1;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.disinfo-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--holo-orange), var(--holo-red));
}

.disinfo-sources {
    font-size: 9px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* ============================================================
   NOTEBOOK
   ============================================================ */

.notebook-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.nb-btn {
    flex: 1;
    padding: 8px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.3s;
}

.nb-btn:hover {
    background: rgba(0, 240, 255, 0.08);
    color: var(--holo-cyan);
    border-color: var(--border-glow);
}

.nb-btn i {
    margin-right: 4px;
}

.nb-item {
    padding: 10px;
    margin-bottom: 4px;
    background: var(--bg-card);
    border-radius: 4px;
    border-left: 3px solid var(--holo-purple);
    cursor: pointer;
    transition: all 0.2s;
}

.nb-item:hover {
    background: rgba(168, 85, 247, 0.05);
}

.nb-title {
    font-size: 12px;
    font-weight: 500;
}

.nb-date {
    font-size: 10px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.notebook-editor {
    width: 100%;
    height: 200px;
    resize: vertical;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    outline: none;
    transition: border-color 0.3s;
}

.notebook-editor:focus {
    border-color: var(--border-glow);
}

/* ============================================================
   AUTOMATION RULES
   ============================================================ */

.auto-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(168, 85, 247, 0.08));
    border: 1px dashed var(--border-glow);
    border-radius: 6px;
    color: var(--holo-cyan);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    transition: all 0.3s;
}

.auto-btn:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(168, 85, 247, 0.15));
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.auto-btn i {
    margin-right: 6px;
}

.rule-card {
    padding: 12px;
    margin-bottom: 6px;
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}

.rule-card.active {
    border-left: 3px solid var(--holo-green);
}

.rule-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.rule-name {
    font-size: 12px;
    font-weight: 600;
}

.rule-body {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
}

/* Toggle Switch */
.rule-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
}

.rule-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    transition: all 0.3s;
}

.slider::before {
    content: '';
    position: absolute;
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: all 0.3s;
}

.rule-switch input:checked+.slider {
    background: rgba(0, 255, 136, 0.2);
}

.rule-switch input:checked+.slider::before {
    transform: translateX(18px);
    background: var(--holo-green);
    box-shadow: 0 0 8px var(--holo-green);
}

/* ============================================================
   SETTINGS
   ============================================================ */

.settings-group {
    margin-bottom: 20px;
}

.settings-subtitle {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 12px;
}

.setting-select {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 4px 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    outline: none;
}

.settings-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 11px;
    text-align: left;
    transition: all 0.3s;
}

.settings-btn:hover {
    background: rgba(0, 240, 255, 0.06);
    border-color: var(--border-glow);
    color: var(--holo-cyan);
}

.settings-btn i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* ============================================================
   MAP AREA
   ============================================================ */

.map-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.map-container {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
}

/* Particle canvas overlay */
.particle-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.4;
}

/* Holographic grid overlay */
.holo-grid-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.015) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.6;
}

/* Professional military popup */
.mil-popup .leaflet-popup-content-wrapper {
    background: rgba(10, 14, 20, 0.92) !important;
    border: 1px solid rgba(0, 240, 255, 0.2) !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
}

.mil-popup .leaflet-popup-tip {
    background: rgba(10, 14, 20, 0.92) !important;
    border: 1px solid rgba(0, 240, 255, 0.2) !important;
}

/* Military marker cleanup */
.mil-icon,
.ac-icon {
    border: none !important;
    background: none !important;
}

/* Map HUD Overlays */
.map-hud {
    position: absolute;
    z-index: 400;
    pointer-events: none;
}

.map-hud.top-left {
    top: 12px;
    left: 12px;
}

.map-hud.top-right {
    top: 12px;
    right: 12px;
}

.map-hud.bottom-center {
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
}

.hud-coords {
    display: flex;
    gap: 12px;
    padding: 6px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    backdrop-filter: blur(12px);
    pointer-events: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--holo-cyan);
}

.hud-stats {
    display: flex;
    gap: 2px;
    pointer-events: auto;
}

.hud-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
}

.hud-stat:first-child {
    border-radius: 6px 0 0 6px;
}

.hud-stat:last-child {
    border-radius: 0 6px 6px 0;
}

.hud-stat-val {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--holo-cyan);
}

.hud-stat-label {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-dim);
}

/* Timeline Bar */
.timeline-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    backdrop-filter: blur(12px);
    pointer-events: auto;
    min-width: 400px;
}

.tl-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 10px;
    transition: all 0.3s;
}

.tl-btn:hover {
    border-color: var(--holo-cyan);
    color: var(--holo-cyan);
}

.tl-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 3px;
    background: linear-gradient(90deg, var(--holo-cyan), var(--holo-purple));
    border-radius: 3px;
    outline: none;
}

.tl-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--holo-cyan);
    box-shadow: 0 0 10px var(--holo-cyan);
    cursor: pointer;
}

.tl-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--holo-cyan);
    min-width: 44px;
    text-align: center;
    letter-spacing: 1px;
}

/* Map Tools */
.map-tools {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 400;
}

.map-tool-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    backdrop-filter: blur(12px);
    font-size: 14px;
    transition: all 0.3s;
}

.map-tool-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--border-glow);
    color: var(--holo-cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.map-tool-btn.active {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--holo-cyan);
    color: var(--holo-cyan);
}

/* ============================================================
   RIGHT INTEL PANEL
   ============================================================ */

.intel-panel {
    width: var(--intel-w);
    flex-shrink: 0;
    background: var(--glass-bg);
    border-left: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.3s, opacity 0.3s;
}

.intel-panel.collapsed {
    width: 0;
    opacity: 0;
    overflow: hidden;
}

.intel-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.intel-panel-header h3 {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--holo-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.intel-panel-header h3 i {
    margin-right: 8px;
}

.panel-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 12px;
    transition: color 0.3s;
}

.panel-close:hover {
    color: var(--holo-cyan);
}

/* Intel Tabs */
.intel-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
}

.itab {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-dim);
    transition: all 0.3s;
    position: relative;
}

.itab:hover {
    color: var(--text-secondary);
}

.itab.active {
    color: var(--holo-cyan);
}

.itab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--holo-cyan);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--holo-cyan);
}

.itab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.itab-content.active {
    display: block;
}

/* Event Feed */
.event-item {
    padding: 10px;
    margin-bottom: 4px;
    border-radius: 4px;
    background: var(--bg-card);
    cursor: pointer;
    border-left: 3px solid var(--holo-blue);
    transition: all 0.2s;
}

.event-item:hover {
    background: rgba(0, 240, 255, 0.05);
}

.event-item.critical {
    border-left-color: var(--holo-red);
}

.event-item.warning {
    border-left-color: var(--holo-orange);
}

.event-item.info {
    border-left-color: var(--holo-blue);
}

.event-type {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--holo-cyan);
}

.event-title {
    font-size: 12px;
    font-weight: 500;
    margin: 3px 0;
}

.event-detail {
    font-size: 11px;
    color: var(--text-secondary);
}

.event-time {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* Alerts */
.alert-item {
    display: flex;
    gap: 10px;
    padding: 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    animation: alertSlide 0.4s ease;
}

.alert-item.critical {
    background: rgba(255, 51, 85, 0.08);
    border: 1px solid rgba(255, 51, 85, 0.2);
}

.alert-item.critical i {
    color: var(--holo-red);
    animation: alertPulse 1.5s infinite;
}

.alert-item.warning {
    background: rgba(255, 170, 0, 0.08);
    border: 1px solid rgba(255, 170, 0, 0.2);
}

.alert-item.warning i {
    color: var(--holo-orange);
}

.alert-body {
    flex: 1;
}

.alert-title {
    font-size: 12px;
    font-weight: 600;
    display: block;
}

.alert-detail {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

.alert-time {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    display: block;
    margin-top: 4px;
}

/* Reports */
.report-gen-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(168, 85, 247, 0.08));
    border: 1px solid var(--border-glow);
    border-radius: 6px;
    color: var(--holo-cyan);
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 12px;
    transition: all 0.3s;
}

.report-gen-btn:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(168, 85, 247, 0.15));
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.report-gen-btn i {
    margin-right: 8px;
}

.report-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 4px;
    background: var(--bg-card);
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.report-item:hover {
    background: rgba(0, 240, 255, 0.05);
}

.report-item i {
    color: var(--holo-cyan);
}

.report-item span:nth-child(2) {
    flex: 1;
    font-size: 12px;
}

.report-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
}

/* Threat Gauge */
.threat-gauge-container {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

.threat-gauge-container h4 {
    font-family: var(--font-display);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.threat-gauge-container h4 i {
    margin-right: 6px;
    color: var(--holo-cyan);
}

.gauge-svg {
    width: 100%;
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.holo-modal {
    width: 440px;
    max-width: 90vw;
    background: var(--bg-secondary);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    box-shadow: var(--shadow-panel), 0 0 60px rgba(0, 240, 255, 0.1);
    animation: modalSlide 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--holo-cyan);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--holo-red);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--border-active);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.08);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-select option {
    background: var(--bg-secondary);
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
    justify-content: flex-end;
}

.btn-cancel,
.btn-confirm {
    padding: 8px 20px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid;
}

.btn-cancel {
    background: none;
    border-color: var(--border-subtle);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    border-color: var(--border-glow);
    color: var(--text-primary);
}

.btn-confirm {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--holo-cyan);
    color: var(--holo-cyan);
}

.btn-confirm:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

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

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

@keyframes bootPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes logoPulse {

    0%,
    100% {
        text-shadow: 0 0 20px var(--holo-cyan);
    }

    50% {
        text-shadow: 0 0 40px var(--holo-cyan), 0 0 60px rgba(0, 240, 255, 0.3);
    }
}

@keyframes defconPulse {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(255, 170, 0, 0);
    }

    50% {
        box-shadow: 0 0 15px rgba(255, 170, 0, 0.1);
    }
}

@keyframes alertPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

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

@keyframes shimmer {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 0.3;
    }
}

@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100vh);
    }
}

@keyframes holoGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(0, 240, 255, 0.2), inset 0 0 5px rgba(0, 240, 255, 0.05);
    }

    50% {
        box-shadow: 0 0 20px rgba(0, 240, 255, 0.3), inset 0 0 10px rgba(0, 240, 255, 0.08);
    }
}

/* Holographic scan line effect on panels */
.sidebar::before,
.intel-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 100;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--holo-cyan), transparent);
    opacity: 0.15;
    animation: scanline 8s linear infinite;
}

/* Leaflet overrides */
.leaflet-control-zoom {
    border: none !important;
}

.leaflet-control-zoom a {
    background: var(--glass-bg) !important;
    color: var(--holo-cyan) !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(12px);
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    font-size: 16px !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(0, 240, 255, 0.1) !important;
    border-color: var(--border-glow) !important;
}

.leaflet-control-attribution {
    display: none !important;
}

.leaflet-popup-content-wrapper {
    background: var(--glass-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow-panel) !important;
    backdrop-filter: blur(12px);
}

.leaflet-popup-tip {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
}

.leaflet-popup-close-button {
    color: var(--text-dim) !important;
}

/* Custom marker styles */
.marker-earthquake {
    background: radial-gradient(circle, var(--holo-red), transparent);
    border-radius: 50%;
    animation: markerPulse 2s ease-in-out infinite;
}

.marker-event {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--holo-cyan);
    background: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

@keyframes markerPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 51, 85, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(255, 51, 85, 0);
    }
}

/* Grid lines background on map */
.map-area::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Corner brackets on panels */
.hud-coords::before,
.hud-coords::after,
.hud-stats::before,
.hud-stats::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: var(--holo-cyan);
    pointer-events: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ============================================================
   RESPONSIVE — Dynamic layout for all screen sizes
   ============================================================ */

/* ── Tablets / Small laptops (≤1200px) ── */
@media (max-width: 1200px) {
    .intel-panel {
        width: 280px;
    }
    .search-bar {
        width: 280px;
        min-width: 160px;
    }
    .gt-card {
        width: 340px;
    }
}

/* ── Narrow tablets / large phones landscape (≤900px) ── */
@media (max-width: 900px) {
    .sidebar {
        width: var(--tab-w);
    }
    .sidebar .sidebar-content {
        display: none;
    }
    .intel-panel {
        width: 0;
        opacity: 0;
        pointer-events: none;
    }
    .search-bar {
        width: 160px;
        min-width: 100px;
    }
    .clock {
        display: none;
    }
    .cmd-status {
        display: none;
    }
    .gt-card {
        width: 300px;
        right: 8px;
    }
    .panel-toggle-bar {
        bottom: 12px;
        padding: 4px 6px;
    }
    .ptb-label {
        display: none;
    }
    .ptb-btn {
        padding: 6px 10px;
    }
}

/* ── Phone landscape / small tablets (≤700px) ── */
@media (max-width: 700px) {
    :root {
        --cmd-h: 44px;
        --tab-w: 40px;
    }
    .command-bar {
        padding: 0 8px;
        gap: 6px;
    }
    .sidebar {
        width: var(--tab-w);
    }
    .sidebar .sidebar-content {
        display: none;
    }
    .sidebar-tabs {
        width: var(--tab-w);
    }
    .stab {
        font-size: 14px;
    }
    .search-bar {
        width: 120px;
        min-width: 80px;
        height: 30px;
        padding: 0 8px;
    }
    .search-bar input {
        font-size: 10px;
    }
    .logo-text {
        font-size: 12px !important;
        letter-spacing: 2px !important;
    }
    .logo-ver {
        display: none;
    }
    .defcon-level {
        display: none;
    }
    .cmd-btn {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    .gt-card {
        width: calc(100vw - 56px);
        right: 8px;
        top: 48px;
        max-height: calc(100vh - 56px);
    }
    .hud-coords {
        font-size: 9px;
        padding: 4px 8px;
        gap: 6px;
    }
    .hud-stats {
        font-size: 9px;
    }
    .map-hud.top-left {
        top: 8px;
        left: 8px;
    }
    .map-hud.top-right {
        top: 8px;
        right: 8px;
    }
    .panel-toggle-bar {
        bottom: 8px;
        gap: 2px;
        padding: 3px 5px;
        border-radius: 8px;
    }
    .ptb-btn {
        padding: 5px 8px;
        border-radius: 5px;
    }
    .ptb-btn i {
        font-size: 12px;
    }
    .ptb-label {
        display: none;
    }
}

/* ── Phone portrait (≤480px) ── */
@media (max-width: 480px) {
    :root {
        --cmd-h: 40px;
        --tab-w: 36px;
    }
    .command-bar {
        padding: 0 6px;
        gap: 4px;
    }
    .sidebar {
        position: fixed;
        top: var(--cmd-h);
        left: 0;
        bottom: 0;
        width: var(--tab-w);
        z-index: 600;
    }
    .sidebar .sidebar-content {
        display: none;
    }
    .sidebar-tabs {
        width: var(--tab-w);
        padding: 4px 0;
    }
    .stab {
        font-size: 12px;
        padding: 6px 0;
    }
    .main-content {
        flex-direction: column;
    }
    .search-bar {
        width: 90px;
        min-width: 60px;
        height: 28px;
        padding: 0 6px;
        gap: 4px;
    }
    .search-bar input {
        font-size: 9px;
    }
    .search-bar i {
        font-size: 10px;
    }
    .logo-compact {
        gap: 4px;
    }
    .logo-icon {
        font-size: 16px;
    }
    .logo-text {
        font-size: 10px !important;
        letter-spacing: 1px !important;
    }
    .logo-ver,
    .cmd-status,
    .defcon-level,
    .clock {
        display: none !important;
    }
    .cmd-btn {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }
    .cmd-center {
        gap: 4px;
    }
    .cmd-left,
    .cmd-right {
        gap: 4px;
    }
    .gt-card {
        position: fixed;
        top: var(--cmd-h);
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: calc(100vh - var(--cmd-h));
        border-radius: 0;
        border: none;
        z-index: 8500;
    }
    .gt-card-header {
        padding: 8px 12px;
    }
    .gt-streetview {
        height: 35vh;
        min-height: 120px;
    }
    .gt-info {
        padding: 6px 10px;
    }
    .gt-photos {
        grid-template-columns: repeat(2, 1fr);
    }
    .gt-env-grid {
        grid-template-columns: 1fr;
    }
    .map-hud.bottom-center {
        bottom: 52px;
    }
    .panel-toggle-bar {
        bottom: 6px;
        left: 50%;
        transform: translateX(-50%);
        gap: 1px;
        padding: 2px 4px;
        border-radius: 6px;
    }
    .ptb-btn {
        padding: 4px 6px;
        border-radius: 4px;
    }
    .ptb-btn i {
        font-size: 11px;
    }
    .ptb-label {
        display: none;
    }
    .intel-panel {
        position: fixed;
        top: var(--cmd-h);
        right: 0;
        bottom: 0;
        width: 0;
        opacity: 0;
        pointer-events: none;
        z-index: 500;
    }
    .intel-panel:not(.collapsed) {
        width: 100%;
        opacity: 1;
        pointer-events: auto;
    }
    /* Boot screen */
    .boot-title {
        font-size: 28px !important;
    }
    .boot-subtitle {
        font-size: 9px !important;
        letter-spacing: 2px !important;
    }
    .boot-progress {
        width: 200px;
    }
    /* Modal */
    .modal-content {
        width: 95vw !important;
        max-height: 90vh !important;
    }
}

/* ── Very small phones (≤360px) ── */
@media (max-width: 360px) {
    :root {
        --cmd-h: 36px;
        --tab-w: 32px;
    }
    .sidebar {
        display: none;
    }
    .search-bar {
        width: 70px;
        min-width: 50px;
    }
    .cmd-btn {
        width: 24px;
        height: 24px;
        font-size: 9px;
    }
    .gt-streetview {
        height: 30vh;
        min-height: 100px;
    }
}

/* ── Short screens / landscape phones ── */
@media (max-height: 500px) {
    :root {
        --cmd-h: 36px;
    }
    .boot-screen .boot-logo .holo-ring {
        display: none;
    }
    .boot-progress {
        margin: 12px auto 8px;
    }
    .gt-card {
        max-height: calc(100vh - 42px);
    }
    .gt-streetview {
        height: 30vh;
        min-height: 80px;
    }
    .panel-toggle-bar {
        bottom: 4px;
    }
}


/* ============================================================
   GROUND TRUTH INTEGRATED CARD
   ============================================================ */

.gt-card {
    position: fixed;
    top: 54px;
    right: 16px;
    width: 380px;
    max-height: calc(100vh - 70px);
    background: linear-gradient(170deg, rgba(10, 14, 23, 0.97), rgba(6, 10, 18, 0.98));
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 8px;
    z-index: 8000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 0 30px rgba(0, 240, 255, 0.06),
        0 0 60px rgba(0, 0, 0, 0.5),
        inset 0 0 40px rgba(0, 240, 255, 0.02);
    backdrop-filter: blur(20px);
    animation: gtSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    font-family: 'Inter', sans-serif;
}

.gt-card.gt-fullscreen {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    z-index: 9600;
}

.gt-card.gt-fullscreen .gt-streetview {
    height: 60vh;
    min-height: 300px;
}

@keyframes gtSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Scanline overlay on the card */
.gt-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 240, 255, 0.015) 2px,
        rgba(0, 240, 255, 0.015) 3px
    );
    pointer-events: none;
    z-index: 1;
}

.gt-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.08), transparent);
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    position: relative;
    z-index: 2;
    cursor: move;
}

.gt-card-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #00f0ff;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.gt-card-coords {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
    flex: 1;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gt-card-close {
    background: rgba(255, 51, 85, 0.1);
    border: 1px solid rgba(255, 51, 85, 0.35);
    color: #ff3355;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gt-card-close:hover {
    background: rgba(255, 51, 85, 0.25);
    box-shadow: 0 0 12px rgba(255, 51, 85, 0.3);
}

/* Street View iframe area */
.gt-streetview {
    width: 100%;
    height: 220px;
    position: relative;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    overflow: hidden;
    flex-shrink: 0;
}

.gt-streetview iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* View mode tabs (Street / Satellite / Map) */
.gt-sv-tabs {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 2px;
    background: rgba(10, 14, 23, 0.85);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 6px;
    padding: 2px;
    backdrop-filter: blur(8px);
}

.gt-sv-tab {
    background: transparent;
    color: rgba(200, 220, 255, 0.6);
    border: none;
    padding: 3px 10px;
    font-size: 9px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gt-sv-tab:hover {
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.08);
}

.gt-sv-tab.active {
    color: #00f0ff;
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.2);
}

.gt-sv-tab i {
    font-size: 9px;
}

.gt-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(10, 14, 23, 0.95);
    z-index: 5;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #00f0ff;
    letter-spacing: 1.5px;
}

/* Location info */
.gt-info {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.08);
    position: relative;
    z-index: 2;
}

.gt-location {
    font-size: 12px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 2px;
    line-height: 1.4;
}

.gt-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gt-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
}

.gt-detail-key {
    color: rgba(0, 240, 255, 0.5);
    letter-spacing: 1.5px;
    width: 70px;
    flex-shrink: 0;
    font-size: 9px;
}

.gt-detail-val {
    color: rgba(255, 255, 255, 0.7);
}

/* Photos section */
.gt-photos-section,
.gt-wiki-section,
.gt-webcam-section {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.06);
    position: relative;
    z-index: 2;
}

.gt-section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(0, 240, 255, 0.6);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gt-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.gt-photo {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.gt-photo:hover {
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
    transform: scale(1.02);
}

.gt-photo.gt-photo-zoom {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 80vw;
    max-width: 600px;
    height: auto;
    aspect-ratio: auto;
    z-index: 9999;
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 240, 255, 0.1);
}

.gt-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gt-photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: rgba(255, 255, 255, 0.7);
    font-size: 7px;
    font-family: 'JetBrains Mono', monospace;
    padding: 10px 4px 3px;
    letter-spacing: 0.5px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Real photo highlight (Wikimedia Commons) */
.gt-photo.gt-photo-real {
    border-color: rgba(0, 255, 136, 0.25);
}

.gt-photo.gt-photo-real:hover {
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.15);
}

/* Wikipedia nearby items */
.gt-wiki {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gt-wiki-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.08);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.gt-wiki-item:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.25);
}

.gt-wiki-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.gt-wiki-dist {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(0, 240, 255, 0.5);
    letter-spacing: 1px;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Action buttons */
.gt-actions {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.gt-action-btn {
    flex: 1;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(0, 180, 255, 0.04));
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: #00f0ff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.gt-action-btn:hover {
    background: rgba(0, 240, 255, 0.18);
    box-shadow: 0 0 16px rgba(0, 240, 255, 0.15);
}

/* ── Environment / Weather section ── */
.gt-env-section {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.06);
    position: relative;
    z-index: 2;
}

.gt-env-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.gt-env-item {
    background: rgba(0, 240, 255, 0.03);
    border: 1px solid rgba(0, 240, 255, 0.06);
    border-radius: 4px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gt-env-item.gt-env-wide {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(0,100,200,0.03));
    border-color: rgba(0, 240, 255, 0.12);
}

.gt-env-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
}

.gt-env-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

/* Card inner overflow scroll */
.gt-card > .gt-info,
.gt-card > .gt-photos-section,
.gt-card > .gt-wiki-section,
.gt-card > .gt-webcam-section,
.gt-card > .gt-env-section {
    overflow-y: auto;
}

.gt-card > .gt-photos-section,
.gt-card > .gt-wiki-section,
.gt-card > .gt-webcam-section {
    max-height: 200px;
    overflow-y: auto;
}

/* Allow the card body to scroll */
.gt-card {
    overflow-y: auto;
}

/* Scrollbar inside card */
.gt-card ::-webkit-scrollbar { width: 4px; }
.gt-card ::-webkit-scrollbar-track { background: transparent; }
.gt-card ::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.2); border-radius: 2px; }
.gt-card ::-webkit-scrollbar-thumb:hover { background: rgba(0, 240, 255, 0.4); }

/* ══════════════════════════════════════════════════════════════
   GT SECTION RESIZE HANDLES (drag between sections)
   ══════════════════════════════════════════════════════════════ */
.gt-section-resize-handle {
    height: 7px;
    cursor: ns-resize;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    background: transparent;
    transition: background 0.2s;
}
.gt-section-resize-handle::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 3px;
    background: rgba(0, 240, 255, 0.15);
    border-radius: 2px;
    transition: all 0.2s;
}
.gt-section-resize-handle:hover {
    background: rgba(0, 240, 255, 0.06);
}
.gt-section-resize-handle:hover::before {
    background: rgba(0, 240, 255, 0.5);
    width: 50px;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}
.gt-section-resize-handle.gt-resizing::before {
    background: #00f0ff;
    width: 60px;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

/* ══════════════════════════════════════════════════════════════
   GT CARD EDGE RESIZE HANDLES (resize whole card)
   ══════════════════════════════════════════════════════════════ */
.gt-resize-edge {
    position: absolute;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.2s;
}
.gt-resize-edge:hover { opacity: 1; }
.gt-resize-left {
    left: -3px; top: 0; bottom: 0; width: 6px;
    cursor: ew-resize;
    background: linear-gradient(90deg, rgba(0,240,255,0.3), transparent);
}
.gt-resize-top {
    top: -3px; left: 0; right: 0; height: 6px;
    cursor: ns-resize;
    background: linear-gradient(180deg, rgba(0,240,255,0.3), transparent);
}
.gt-resize-bottom {
    bottom: -3px; left: 0; right: 0; height: 6px;
    cursor: ns-resize;
    background: linear-gradient(0deg, rgba(0,240,255,0.3), transparent);
}
.gt-resize-corner-bl {
    bottom: -4px; left: -4px; width: 12px; height: 12px;
    cursor: nesw-resize;
    background: rgba(0,240,255,0.3);
    border-radius: 2px;
}
.gt-resize-corner-tl {
    top: -4px; left: -4px; width: 12px; height: 12px;
    cursor: nwse-resize;
    background: rgba(0,240,255,0.3);
    border-radius: 2px;
}

/* ══════════════════════════════════════════════════════════════
   GT COLLAPSIBLE SECTIONS
   ══════════════════════════════════════════════════════════════ */
.gt-collapse-toggle {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gt-collapse-toggle:hover {
    color: #00f0ff;
}
.gt-collapse-icon {
    margin-left: auto;
    font-size: 8px;
    color: rgba(0, 240, 255, 0.35);
    transition: transform 0.25s ease;
}
.gt-collapsible-section.gt-collapsed .gt-collapse-icon {
    transform: rotate(180deg);
}
.gt-collapsible-section.gt-collapsed .gt-collapse-body {
    display: none;
}
.gt-collapse-body {
    transition: max-height 0.3s ease;
}

/* Active resize state — prevent iframe stealing pointer */
.gt-card.gt-resizing-active,
.gt-card.gt-resizing-active * {
    user-select: none !important;
}
.gt-card.gt-resizing-active iframe {
    pointer-events: none !important;
}

/* ═══════════════════════════════════════════════════════
   FLOATING PANEL TOGGLE BAR
   ═══════════════════════════════════════════════════════ */
.panel-toggle-bar {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    padding: 5px 8px;
    background: rgba(8,12,20,0.92);
    border: 1px solid rgba(0,240,255,0.2);
    border-radius: 10px;
    backdrop-filter: blur(16px);
    z-index: 10000;
    box-shadow: 0 4px 24px rgba(0,0,0,0.6), inset 0 1px 0 rgba(0,240,255,0.08);
    transition: opacity 0.3s;
}
.panel-toggle-bar::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(0,240,255,0.12), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.ptb-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 14px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 7px;
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.25s ease;
    position: relative;
}
.ptb-btn i {
    font-size: 14px;
    transition: color 0.25s, text-shadow 0.25s;
}
.ptb-label {
    font-size: 8px;
    letter-spacing: 1.5px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.ptb-btn:hover {
    background: rgba(0,240,255,0.08);
    border-color: rgba(0,240,255,0.25);
    color: rgba(255,255,255,0.7);
}
.ptb-btn:hover i {
    color: #00f0ff;
    text-shadow: 0 0 8px rgba(0,240,255,0.4);
}

.ptb-btn.active {
    background: rgba(0,240,255,0.12);
    border-color: rgba(0,240,255,0.4);
    color: #00f0ff;
    box-shadow: 0 0 12px rgba(0,240,255,0.15), inset 0 0 8px rgba(0,240,255,0.06);
}
.ptb-btn.active i {
    color: #00f0ff;
    text-shadow: 0 0 10px rgba(0,240,255,0.5);
}
.ptb-btn.active .ptb-label {
    color: #00f0ff;
}
.ptb-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #00f0ff;
    border-radius: 2px;
    box-shadow: 0 0 6px #00f0ff;
}

/* Pulse dot when panel is hidden (reminder) */
.ptb-btn.ptb-hidden-hint::before {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff3355;
    box-shadow: 0 0 6px #ff3355;
    animation: ptbPulse 1.5s ease-in-out infinite;
}
@keyframes ptbPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.7); }
}

/* ============================================================
   TOUCH & MOBILE ENHANCEMENTS
   ============================================================ */
.sidebar,
.intel-panel,
.gt-card,
.wv-panel {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Safe area padding for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    .panel-toggle-bar {
        padding-bottom: calc(4px + env(safe-area-inset-bottom));
    }
    .command-bar {
        padding-top: env(safe-area-inset-top);
    }
}

/* Prevent text selection on UI controls */
.cmd-btn, .stab, .ptb-btn, .panel-close {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

/* Smoother scrolling in panels on touch devices */
@media (pointer: coarse) {
    .sidebar-content,
    .intel-feed,
    .gt-card {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    .cmd-btn {
        min-width: 32px;
        min-height: 32px;
    }
    .stab {
        min-height: 36px;
    }
}
