/* ============================================
   MAPSAT — DUAL THEME UI  (optimised)
   Theme 1: Mission Control (retro-futuristic)
   Theme 2: Clean Modern   (minimal light)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Share+Tech+Mono&family=Exo+2:wght@300;400;500;600&family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ══ Mission Control (default) ══════════════════════════ */
:root,
[data-theme="mission"] {
    --bg-base:        #020409;
    --bg-deep:        #060d1a;
    --bg-mid:         #0a1628;
    --bg-surface:     #0f1f38;
    --bg-raised:      #152844;
    --accent-main:    #00c8ff;
    --accent-alt:     #a855f7;
    --accent-alt2:    #7c3aed;
    --accent-green:   #22d3a0;
    --accent-red:     #ef4444;
    --text-primary:   #e2eaf5;
    --text-secondary: #7fa5c8;
    --text-dim:       #3d5a7a;
    --border-sub:     rgba(0,200,255,0.1);
    --border-main:    rgba(0,200,255,0.35);
    --glow-main:      0 0 12px rgba(0,200,255,0.5),  0 0 30px rgba(0,200,255,0.15);
    --glow-alt:       0 0 12px rgba(168,85,247,0.5), 0 0 30px rgba(168,85,247,0.15);
    --shadow-panel:   0 8px 32px rgba(0,0,0,0.6);
    --font-display:   'Orbitron', monospace;
    --font-mono:      'Share Tech Mono', monospace;
    --font-body:      'Exo 2', sans-serif;
    --radius-sm:      6px;
    --radius-md:      10px;
    --radius-lg:      16px;
    --header-glow:    0 0 8px rgba(0,200,255,0.9),  0 0 20px rgba(0,200,255,0.5);
    --header-glow2:   0 0 12px rgba(0,200,255,1),   0 0 30px rgba(0,200,255,0.7);
}

/* ══ Clean Modern ════════════════════════════════════════ */
[data-theme="modern"] {
    --bg-base:        #f0f4f8;
    --bg-deep:        #ffffff;
    --bg-mid:         #f8fafc;
    --bg-surface:     #eef2f7;
    --bg-raised:      #e2e8f0;
    --accent-main:    #2563eb;
    --accent-alt:     #7c3aed;
    --accent-alt2:    #5b21b6;
    --accent-green:   #059669;
    --accent-red:     #dc2626;
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-dim:       #94a3b8;
    --border-sub:     rgba(37,99,235,0.12);
    --border-main:    rgba(37,99,235,0.4);
    --glow-main:      0 2px 12px rgba(37,99,235,0.18), 0 1px 4px rgba(0,0,0,0.06);
    --glow-alt:       0 2px 12px rgba(124,58,237,0.18),0 1px 4px rgba(0,0,0,0.06);
    --shadow-panel:   0 4px 24px rgba(0,0,0,0.08),    0 1px 4px rgba(0,0,0,0.04);
    --font-display:   'Syne', sans-serif;
    --font-mono:      'DM Sans', sans-serif;
    --font-body:      'DM Sans', sans-serif;
    --radius-sm:      8px;
    --radius-md:      12px;
    --radius-lg:      20px;
    --header-glow:    none;
    --header-glow2:   none;
}

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

html, body {
    width: 100%; height: 100%; overflow: hidden;
    background: var(--bg-base); color: var(--text-primary);
    font-family: var(--font-body); font-size: 14px;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
}

/* ── Scanlines (Mission only) ───────────────────────── */
[data-theme="mission"] body::before {
    content: '';
    position: fixed; inset: 0;
    background: repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,0,0,0.07) 2px,rgba(0,0,0,0.07) 4px);
    pointer-events: none; z-index: 9999;
    animation: scanMove 12s linear infinite;
}
@keyframes scanMove { to { background-position: 0 100px; } }

/* ── Map & dynamic light ────────────────────────────── */
#map { position: fixed; inset: 0; z-index: 1; }

.dynamic-light {
    position: fixed; width: 700px; height: 700px;
    border-radius: 50%; pointer-events: none; z-index: 2;
    filter: blur(60px); mix-blend-mode: screen;
    transition: left 0.08s ease-out, top 0.08s ease-out;
}
[data-theme="mission"] .dynamic-light {
    background: radial-gradient(circle,rgba(124,58,237,0.18) 0%,rgba(56,189,248,0.08) 40%,transparent 70%);
}
[data-theme="modern"] .dynamic-light { display: none; }

/* ── Version badge ──────────────────────────────────── */
.version {
    position: fixed; bottom: 14px; right: 14px; z-index: 1000;
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
    color: var(--text-dim); text-transform: uppercase;
    padding: 4px 10px; border: 1px solid var(--border-sub);
    border-radius: 4px; backdrop-filter: blur(8px);
    background: var(--bg-deep); box-shadow: var(--shadow-panel);
}
[data-theme="modern"] .version {
    background: rgba(255,255,255,0.9); border-color: #e2e8f0;
    font-size: 11px; letter-spacing: 0.5px;
}

/* ── Language selector ──────────────────────────────── */
.lang-selector { position: fixed; top: 12px; left: 12px; z-index: 1000; }

/* ── Top-right controls ─────────────────────────────── */
.top-right-controls {
    position: fixed; top: 12px; right: 12px;
    z-index: 1000; display: flex; gap: 8px; align-items: center;
}

/* ── Shared: icon button base ───────────────────────── */
.github-login,
.menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; background: var(--bg-deep);
    border: 1px solid var(--border-sub); border-radius: var(--radius-sm);
    cursor: pointer; transition: all 0.2s;
    backdrop-filter: blur(12px); box-shadow: var(--shadow-panel);
}
.github-login { color: var(--text-secondary); }
.github-login:hover,
.menu-toggle:hover {
    border-color: var(--border-main); box-shadow: var(--glow-main);
    background: color-mix(in srgb, var(--accent-main) 8%, var(--bg-deep));
}
.github-login:hover { color: var(--accent-main); }
.github-login.logged-in { border-color: var(--accent-green); color: var(--accent-green); }

/* Hamburger */
.hamburger { display: flex; flex-direction: column; gap: 4px; }
.hamburger span {
    display: block; width: 18px; height: 2px;
    background: var(--text-secondary); border-radius: 2px;
    transition: all 0.2s; transform-origin: center;
}
.menu-toggle:hover .hamburger span { background: var(--accent-main); }
.menu-toggle.active .hamburger span:nth-child(1) { transform: translateY(6px)  rotate(45deg);  }
.menu-toggle.active .hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0);           }
.menu-toggle.active .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Menu overlay ───────────────────────────────────── */
.menu-overlay {
    display: none; position: fixed; inset: 0; z-index: 1999;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
}
.menu-overlay.active { display: block; }

/* ── Menu sidebar ───────────────────────────────────── */
.menu-sidebar {
    position: fixed; top: 0; right: -340px;
    width: 320px; height: 100vh; z-index: 2000;
    transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column; overflow: hidden;
}
[data-theme="mission"] .menu-sidebar {
    background: linear-gradient(160deg,var(--bg-deep),var(--bg-mid));
    border-left: 1px solid var(--border-main);
}
[data-theme="mission"] .menu-sidebar::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg,transparent,var(--accent-main),var(--accent-alt),transparent);
}
[data-theme="modern"] .menu-sidebar {
    background: #fff; border-left: 1px solid #e2e8f0;
    box-shadow: -8px 0 40px rgba(0,0,0,0.1);
}
.menu-sidebar.active { right: 0; }

.menu-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 22px 16px; border-bottom: 1px solid var(--border-sub);
}
.menu-header h2 {
    font-family: var(--font-display); text-transform: uppercase;
    color: var(--accent-main);
}
[data-theme="mission"] .menu-header h2 { font-size: 13px; font-weight: 700; letter-spacing: 3px; text-shadow: var(--glow-main); }
[data-theme="modern"]  .menu-header h2 { font-size: 15px; font-weight: 800; letter-spacing: 1px; }

.menu-content {
    flex: 1; overflow-y: auto; padding: 14px 16px;
    scrollbar-width: thin; scrollbar-color: var(--bg-raised) transparent;
}

/* ── Menu section buttons ───────────────────────────── */
.menu-section-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px; background: var(--bg-surface);
    border: 1px solid var(--border-sub); border-radius: var(--radius-sm);
    color: var(--text-secondary); font-family: var(--font-body);
    font-size: 12px; font-weight: 600; letter-spacing: 1px;
    text-transform: uppercase; cursor: pointer; margin-bottom: 6px; transition: all 0.2s;
}
[data-theme="modern"] .menu-section-btn { letter-spacing: 0.3px; font-size: 13px; }
.menu-section-btn:hover,
.menu-section-btn.active {
    background: color-mix(in srgb,var(--accent-main) 8%,var(--bg-surface));
    border-color: var(--border-main); color: var(--accent-main);
}
.menu-section-btn .arrow { font-size: 10px; transition: transform 0.2s; }
.menu-section-btn.active .arrow { transform: rotate(180deg); }

.menu-section { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; margin-bottom: 6px; }
.menu-section.active { max-height: 500px; }

/* ── Control / contact list ─────────────────────────── */
.control-list,
.contact-info { padding: 8px 4px; display: flex; flex-direction: column; gap: 6px; }

.control-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: var(--bg-surface);
    border-radius: var(--radius-sm); border-left: 2px solid var(--border-main);
    font-size: 12px; color: var(--text-secondary); line-height: 1.4;
}
.control-icon { font-size: 14px; flex-shrink: 0; }

.contact-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; background: var(--bg-surface);
    border: 1px solid var(--border-sub); border-radius: var(--radius-sm);
    color: var(--text-secondary); text-decoration: none; font-size: 12px; transition: all 0.2s;
}
.contact-link:hover {
    border-color: var(--border-main); color: var(--accent-main);
    background: color-mix(in srgb,var(--accent-main) 6%,var(--bg-surface));
}

/* ── Theme selector ─────────────────────────────────── */
.theme-selector { padding: 8px 4px; display: flex; flex-direction: column; gap: 8px; }

.theme-btn {
    width: 100%; display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; background: var(--bg-surface);
    border: 2px solid var(--border-sub); border-radius: var(--radius-md);
    cursor: pointer; transition: all 0.2s; text-align: left;
}
.theme-btn:hover           { border-color: var(--border-main); box-shadow: var(--glow-main); }
.theme-btn.active {
    border-color: var(--accent-main);
    background: color-mix(in srgb,var(--accent-main) 10%,var(--bg-surface));
    box-shadow: var(--glow-main);
}

.theme-preview {
    width: 38px; height: 38px; border-radius: var(--radius-sm);
    flex-shrink: 0; border: 1px solid rgba(0,0,0,0.1);
}
.mission-preview {
    background: linear-gradient(135deg,#020409 30%,#0a1628 70%,#003344);
    box-shadow: inset 0 0 8px rgba(0,200,255,0.3);
    border-color: rgba(0,200,255,0.2);
}
.modern-preview {
    background: linear-gradient(135deg,#f8fafc,#fff 50%,#dbeafe);
    border-color: #e2e8f0;
}

.theme-info { display: flex; flex-direction: column; gap: 2px; }
.theme-name { font-size: 12px; font-weight: 600; color: var(--text-primary); font-family: var(--font-body); }
.theme-desc { font-size: 10px; color: var(--text-dim); }

/* ── Divider & Powered By ───────────────────────────── */
.menu-divider {
    height: 1px;
    background: linear-gradient(90deg,transparent,var(--border-sub),transparent);
    margin: 12px 0;
}
.menu-section-static { padding: 8px 4px 16px; }
.menu-section-static h3 {
    font-family: var(--font-display); font-size: 9px; letter-spacing: 3px;
    text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px;
}
[data-theme="modern"] .menu-section-static h3 { font-size: 10px; letter-spacing: 1px; }
.menu-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-badge { height: 15px; border-radius: 2px; opacity: 0.6; transition: opacity 0.2s; }
.menu-badge:hover { opacity: 1; }

/* ── Close button ───────────────────────────────────── */
.close-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--border-sub);
    border-radius: var(--radius-sm); color: var(--text-secondary);
    font-size: 18px; cursor: pointer; transition: all 0.2s; line-height: 1;
}
.close-btn:hover { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.4); color: var(--accent-red); }

/* ── Left control strip ─────────────────────────────── */
.controls {
    position: fixed; left: 12px; top: 50%; transform: translateY(-50%);
    z-index: 1000; display: flex; flex-direction: column; gap: 6px;
    padding: 8px 6px; border-radius: var(--radius-md);
    backdrop-filter: blur(16px); border: 1px solid var(--border-sub);
    background: var(--bg-deep); box-shadow: var(--shadow-panel);
}
[data-theme="mission"] .controls::before {
    content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 1px;
    background: linear-gradient(90deg,transparent,var(--accent-main),transparent);
}
[data-theme="modern"] .controls { background: rgba(255,255,255,0.95); border-color: #e2e8f0; }

.control-btn {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid transparent;
    border-radius: var(--radius-sm); color: var(--text-dim); font-size: 16px;
    cursor: pointer; transition: all 0.2s;
}
.control-btn:hover,
.control-btn.active {
    background: color-mix(in srgb,var(--accent-main) 10%,transparent);
    border-color: var(--border-main); color: var(--accent-main); box-shadow: var(--glow-main);
}
/* active gets slightly stronger background */
.control-btn.active { background: color-mix(in srgb,var(--accent-main) 12%,transparent); }

/* ── Search panel ───────────────────────────────────── */
.search-panel {
    position: fixed; top: 68px; left: 50%; transform: translateX(-50%);
    z-index: 1000; width: 340px;
}
.search-input {
    width: 100%; padding: 10px 16px; background: var(--bg-deep);
    border: 1px solid var(--border-sub); border-radius: var(--radius-md);
    color: var(--text-primary); font-family: var(--font-mono);
    font-size: 13px; letter-spacing: 0.5px; outline: none;
    backdrop-filter: blur(16px); transition: all 0.2s; box-shadow: var(--shadow-panel);
}
[data-theme="modern"] .search-input { background: rgba(255,255,255,0.95); border-color: #e2e8f0; font-size: 14px; letter-spacing: 0; }
.search-input::placeholder { color: var(--text-dim); }
.search-input:focus { border-color: var(--border-main); box-shadow: var(--glow-main); }

.search-results {
    display: none; margin-top: 4px; background: var(--bg-deep);
    border: 1px solid var(--border-main); border-radius: var(--radius-md);
    overflow: hidden; backdrop-filter: blur(20px); box-shadow: var(--shadow-panel);
}
[data-theme="modern"] .search-results { background: #fff; border-color: #bfdbfe; }
.search-results.show { display: block; }

.search-result-item {
    padding: 10px 16px; font-family: var(--font-mono); font-size: 12px;
    color: var(--text-secondary); cursor: pointer;
    border-bottom: 1px solid var(--border-sub); transition: all 0.15s; letter-spacing: 0.5px;
}
[data-theme="modern"] .search-result-item { font-size: 13px; letter-spacing: 0; }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover {
    background: color-mix(in srgb,var(--accent-main) 8%,transparent);
    color: var(--accent-main); padding-left: 22px;
}

/* ── Sat sidebar ────────────────────────────────────── */
.sidebar-overlay {
    display: none; position: fixed; inset: 0; z-index: 1499;
    background: rgba(0,0,0,0.3); backdrop-filter: blur(1px);
}
.sidebar-overlay.active { display: block; }

.sidebar {
    position: fixed; right: -380px; top: 0; width: 340px; height: 100vh;
    z-index: 1500; transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column; overflow: hidden;
}
[data-theme="mission"] .sidebar {
    background: linear-gradient(175deg,var(--bg-deep),var(--bg-mid));
    border-left: 1px solid var(--border-main);
}
[data-theme="mission"] .sidebar::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg,var(--accent-alt),var(--accent-main),transparent);
}
[data-theme="modern"] .sidebar {
    background: #fff; border-left: 1px solid #e2e8f0;
    box-shadow: -8px 0 40px rgba(0,0,0,0.1);
}
.sidebar.active { right: 0; }

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 20px 14px; border-bottom: 1px solid var(--border-sub); flex-shrink: 0;
}
.sidebar-title {
    font-family: var(--font-display); font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--accent-main); line-height: 1.3;
    flex: 1; padding-right: 12px;
}
[data-theme="mission"] .sidebar-title { font-size: 11px; text-shadow: var(--glow-main); }
[data-theme="modern"]  .sidebar-title { font-size: 13px; font-weight: 800; letter-spacing: 0.5px; }

.sidebar-content {
    flex: 1; overflow-y: auto; padding: 16px 18px;
    scrollbar-width: thin; scrollbar-color: var(--bg-raised) transparent;
}

/* ── Sat image container ────────────────────────────── */
.sat-image-container {
    width: 100%; height: 170px; background: var(--bg-surface);
    border: 1px solid var(--border-sub); border-radius: var(--radius-md);
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px; position: relative;
}
[data-theme="mission"] .sat-image-container::before,
[data-theme="mission"] .sat-image-container::after {
    content: ''; position: absolute;
    width: 14px; height: 14px; border-color: var(--accent-main);
    border-style: solid; opacity: 0.5;
}
[data-theme="mission"] .sat-image-container::before { top: 6px;    left: 6px;  border-width: 2px 0 0 2px; }
[data-theme="mission"] .sat-image-container::after  { bottom: 6px; right: 6px; border-width: 0 2px 2px 0; }

.sat-image { width: 100%; height: 100%; object-fit: cover; transition: filter 0.3s; }
[data-theme="mission"] .sat-image         { filter: saturate(0.85) brightness(0.9); }
[data-theme="mission"] .sat-image:hover,
[data-theme="modern"]  .sat-image         { filter: saturate(1) brightness(1); }

.image-loading {
    font-family: var(--font-mono); font-size: 11px;
    color: var(--text-dim); letter-spacing: 2px;
    animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Sat info rows ──────────────────────────────────── */
.sat-info-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 12px; margin-bottom: 5px; background: var(--bg-surface);
    border: 1px solid var(--border-sub); border-radius: var(--radius-sm); transition: all 0.15s;
}
.sat-info-item:hover {
    border-color: var(--border-main);
    background: color-mix(in srgb,var(--accent-main) 4%,var(--bg-surface));
}
.info-label {
    font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--text-dim); font-family: var(--font-body);
}
[data-theme="modern"] .info-label { letter-spacing: 0.5px; font-size: 11px; }
.info-value {
    font-family: var(--font-mono); font-size: 13px;
    color: var(--accent-main); letter-spacing: 0.5px;
}
[data-theme="mission"] .info-value { text-shadow: 0 0 8px rgba(0,200,255,0.35); }
[data-theme="modern"]  .info-value { font-size: 14px; font-weight: 500; letter-spacing: 0; }

/* Operator: single line */
.info-value#satOperator {
    font-size: 11px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}

/* ── Info panel (bottom-left) ───────────────────────── */
.info-panel {
    position: fixed; bottom: 16px; left: 62px; z-index: 1000;
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-deep); border: 1px solid var(--border-sub);
    border-radius: var(--radius-md); padding: 8px 14px;
    backdrop-filter: blur(14px); box-shadow: var(--shadow-panel);
}
[data-theme="modern"] .info-panel { background: rgba(255,255,255,0.92); border-color: #e2e8f0; }

.info-stat { display: flex; align-items: baseline; gap: 5px; }
.stat-value {
    font-family: var(--font-display); font-size: 18px; font-weight: 700;
    color: var(--accent-main); letter-spacing: 1px;
}
[data-theme="mission"] .stat-value { text-shadow: var(--glow-main); }
.stat-label {
    font-family: var(--font-display); font-size: 8px;
    letter-spacing: 3px; color: var(--text-dim); text-transform: uppercase;
}
[data-theme="modern"] .stat-label { font-size: 9px; letter-spacing: 1px; }

.legend {
    display: flex; align-items: center; gap: 5px;
    border-left: 1px solid var(--border-sub); padding-left: 12px;
}
.legend-dot {
    width: 8px; height: 8px; border-radius: 50%;
    cursor: help; transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 4px currentColor;
}
.legend-dot:hover { transform: scale(1.5); box-shadow: 0 0 10px currentColor; }

/* ── Time Warp panel ────────────────────────────────── */
.timewarp-panel {
    position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
    z-index: 1000; background: var(--bg-deep); border: 1px solid var(--border-sub);
    border-radius: var(--radius-md); padding: 10px 14px;
    backdrop-filter: blur(16px); text-align: center;
    min-width: 300px; box-shadow: var(--shadow-panel);
}
[data-theme="mission"] .timewarp-panel::before {
    content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 1px;
    background: linear-gradient(90deg,transparent,var(--accent-alt),transparent);
}
[data-theme="modern"] .timewarp-panel { background: rgba(255,255,255,0.92); border-color: #e2e8f0; }

.timewarp-title {
    font-family: var(--font-display); font-size: 8px; letter-spacing: 4px;
    color: var(--accent-alt); text-transform: uppercase; margin-bottom: 8px;
}
[data-theme="mission"] .timewarp-title { text-shadow: var(--glow-alt); }
[data-theme="modern"]  .timewarp-title { font-size: 9px; letter-spacing: 2px; font-weight: 700; }

.timewarp-controls { display: flex; gap: 5px; justify-content: center; margin-bottom: 7px; }
.timewarp-btn {
    padding: 5px 10px; background: var(--bg-surface);
    border: 1px solid var(--border-sub); border-radius: var(--radius-sm);
    color: var(--text-secondary); font-family: var(--font-mono); font-size: 11px;
    cursor: pointer; transition: all 0.2s; min-width: 36px;
}
.timewarp-btn:hover,
.timewarp-btn.active {
    border-color: color-mix(in srgb,var(--accent-alt) 50%,transparent);
    color: var(--accent-alt); box-shadow: var(--glow-alt);
    background: color-mix(in srgb,var(--accent-alt) 6%,var(--bg-surface));
}
.timewarp-btn.active { background: color-mix(in srgb,var(--accent-alt) 12%,var(--bg-surface)); }
.timewarp-reset { border-color: color-mix(in srgb,var(--accent-green) 30%,transparent); color: var(--accent-green); }
.timewarp-reset:hover { border-color: var(--accent-green); box-shadow: 0 0 10px rgba(34,211,160,0.2); }

.timewarp-date { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); letter-spacing: 0.5px; }
[data-theme="modern"] .timewarp-date { font-size: 12px; letter-spacing: 0; }

/* ── Tooltip ────────────────────────────────────────── */
.tooltip {
    display: none; position: fixed; z-index: 2000;
    background: var(--bg-deep); border: 1px solid var(--border-main);
    border-radius: var(--radius-sm); padding: 5px 10px;
    font-family: var(--font-mono); font-size: 11px; color: var(--accent-main);
    white-space: nowrap; pointer-events: none;
    box-shadow: var(--glow-main); letter-spacing: 0.5px;
    backdrop-filter: blur(8px); max-width: 220px;
    overflow: hidden; text-overflow: ellipsis;
}
[data-theme="modern"] .tooltip {
    background: #fff; border-color: #bfdbfe;
    box-shadow: 0 4px 16px rgba(37,99,235,0.15); font-size: 12px; letter-spacing: 0;
}

/* ── User location dot ──────────────────────────────── */
.user-location {
    width: 16px; height: 16px;
    background: var(--accent-green); border: 2px solid #fff; border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(34,211,160,0.25),0 0 12px rgba(34,211,160,0.4);
    animation: userPulse 2s ease-in-out infinite;
}
@keyframes userPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(34,211,160,0.25),0 0 12px rgba(34,211,160,0.4); }
    50%       { box-shadow: 0 0 0 8px rgba(34,211,160,0.1), 0 0 20px rgba(34,211,160,0.5); }
}

/* ── Leaflet attribution ────────────────────────────── */
.leaflet-control-attribution {
    font-size: 9px; border: none; border-top-left-radius: 4px;
    backdrop-filter: blur(8px);
}
[data-theme="mission"] .leaflet-control-attribution {
    background: rgba(6,13,26,0.7); color: var(--text-dim); font-family: var(--font-mono);
}
[data-theme="modern"] .leaflet-control-attribution { background: rgba(255,255,255,0.85); color: #94a3b8; }
.leaflet-control-attribution a { color: inherit; }

/* ── Header ─────────────────────────────────────────── */
#custom-header-unique {
    position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
    z-index: 99999; display: flex; align-items: center;
    pointer-events: none; white-space: nowrap; gap: 10px;
}
.header-logo-unique { height: 28px; width: auto; }
[data-theme="mission"] .header-logo-unique { filter: drop-shadow(0 0 8px rgba(0,200,255,0.8)); }

.header-title-unique {
    font-family: var(--font-display);
    font-weight: 900; text-transform: uppercase; line-height: 1;
}
[data-theme="mission"] .header-title-unique {
    font-size: 20px; color: #fff; letter-spacing: 6px;
    text-shadow: var(--header-glow);
    animation: titlePulse 4s ease-in-out infinite;
}
[data-theme="modern"] .header-title-unique {
    font-size: 18px; color: #0f172a; letter-spacing: 3px;
}
@keyframes titlePulse {
    0%, 100% { text-shadow: var(--header-glow);  }
    50%       { text-shadow: var(--header-glow2); }
}

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-raised); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── AI Description ─────────────────────────────────── */
.ai-desc-section {
    margin-top: 10px; border-radius: var(--radius-md);
    overflow: hidden; border: 1px solid var(--border-sub); transition: opacity 0.2s;
}
.ai-desc-section.loading { opacity: 0.5; }

.ai-desc-header {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px 6px; background: var(--bg-surface);
    border-bottom: 1px solid var(--border-sub);
}
.ai-badge {
    font-size: 10px; font-weight: 700; padding: 2px 7px;
    border-radius: 20px; letter-spacing: 1px;
    background: linear-gradient(90deg,var(--accent-main),var(--accent-alt));
    color: #fff; flex-shrink: 0;
}
[data-theme="modern"] .ai-badge { background: linear-gradient(90deg,#2563eb,#7c3aed); }

.ai-desc-label {
    font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--text-dim);
}
.ai-desc-text { padding: 10px 12px; font-size: 12px; line-height: 1.65; color: var(--text-secondary); background: var(--bg-deep); }
[data-theme="modern"] .ai-desc-text { background: #fafafa; font-size: 13px; }

/* ── API Key panel ──────────────────────────────────── */
.apikey-panel { padding: 10px 4px 6px; display: flex; flex-direction: column; gap: 8px; }
.apikey-hint { font-size: 11px; color: var(--text-dim); line-height: 1.5; }
.apikey-hint a { color: var(--accent-main); text-decoration: none; }
.apikey-hint a:hover { text-decoration: underline; }
.apikey-row { display: flex; gap: 6px; }
.apikey-input {
    flex: 1; padding: 8px 10px; background: var(--bg-surface);
    border: 1px solid var(--border-sub); border-radius: var(--radius-sm);
    color: var(--text-primary); font-family: var(--font-mono); font-size: 11px;
    outline: none; transition: border-color 0.2s;
}
.apikey-input:focus { border-color: var(--border-main); box-shadow: var(--glow-main); }
[data-theme="modern"] .apikey-input { background: #f8fafc; border-color: #e2e8f0; }
.apikey-btn {
    padding: 8px 14px;
    background: color-mix(in srgb,var(--accent-main) 12%,var(--bg-surface));
    border: 1px solid var(--border-main); border-radius: var(--radius-sm);
    color: var(--accent-main); font-family: var(--font-body);
    font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.apikey-btn:hover { background: color-mix(in srgb,var(--accent-main) 20%,var(--bg-surface)); box-shadow: var(--glow-main); }
.apikey-status { font-size: 11px; font-weight: 600; min-height: 16px; transition: color 0.2s; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 600px) {
    .search-panel  { width: calc(100vw - 100px); }
    .menu-sidebar,
    .sidebar        { width: 290px; }
    .timewarp-panel { min-width: 260px; }
    [data-theme="mission"] .header-title-unique { font-size: 15px; letter-spacing: 3px; }
    [data-theme="modern"]  .header-title-unique { font-size: 14px; }
    .controls       { gap: 4px; padding: 6px 4px; }
    .control-btn    { width: 32px; height: 32px; font-size: 14px; }
}

/* ══ TRACK BUTTON ══════════════════════════════════════ */
.track-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; margin-top: 14px; padding: 12px 16px;
    background: var(--bg-surface); border: 1px solid var(--border-sub);
    border-radius: var(--radius-md); color: var(--text-secondary);
    font-family: var(--font-display); font-size: 11px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    cursor: pointer; transition: all 0.25s; position: relative; overflow: hidden;
}
[data-theme="modern"] .track-btn { font-size: 12px; letter-spacing: 0.5px; }
.track-btn:hover {
    border-color: var(--border-main); color: var(--accent-main);
    background: color-mix(in srgb,var(--accent-main) 8%,var(--bg-surface));
    box-shadow: var(--glow-main);
}
.track-btn.active {
    border-color: var(--accent-green); color: var(--accent-green);
    background: color-mix(in srgb,var(--accent-green) 12%,var(--bg-surface));
    box-shadow: 0 0 12px rgba(34,211,160,0.4), 0 0 30px rgba(34,211,160,0.1);
}
.track-btn-icon { font-size: 16px; line-height: 1; }
.track-btn-label { flex: 1; text-align: center; }
.track-pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-green); opacity: 0; transition: opacity 0.3s;
}
.track-btn.active .track-pulse {
    opacity: 1; animation: trackPulse 1.2s ease-in-out infinite;
}
@keyframes trackPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(34,211,160,0.7); }
    50%      { box-shadow: 0 0 0 6px rgba(34,211,160,0); }
}

/* ══ CONTROLS DIVIDER ═══════════════════════════════════ */
.controls-divider {
    width: 24px; height: 1px; margin: 2px auto;
    background: var(--border-sub);
}

/* ══ 3D / LEO ZOOM BUTTONS ══════════════════════════════ */
#leoZoomBtn { opacity: 0.35; cursor: not-allowed; font-size: 15px; }
#leoZoomBtn.leo-available { opacity: 1; cursor: pointer; }
#leoZoomBtn.leo-available:hover,
#leoZoomBtn.active {
    background: color-mix(in srgb,var(--accent-alt) 12%,transparent);
    border-color: rgba(168,85,247,0.5); color: var(--accent-alt);
    box-shadow: var(--glow-alt);
}
#btn3D.active {
    background: color-mix(in srgb,var(--accent-main) 15%,transparent);
    border-color: var(--border-main); color: var(--accent-main);
    box-shadow: var(--glow-main);
}

/* ══ 3D GLOBE CONTAINER ═════════════════════════════════ */
#globe-container {
    position: fixed; inset: 0; z-index: 600; display: none;
    background: radial-gradient(ellipse at center, #030814 0%, #000205 100%);
}
#globe-container canvas { display: block; width: 100% !important; height: 100% !important; }
#globe-container::after {
    content: '3D — drag to rotate · scroll to zoom';
    position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%);
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px;
    color: rgba(255,255,255,0.3); pointer-events: none; white-space: nowrap;
}
