/* ============================================
   AQL DATA - World Wars Monitoring
   Ultra-creative premium dark interface
   Nuclear palette: Gold/Amber/Black + Red accents
   ============================================ */

:root {
    --gold: #FFD600;
    --gold-dim: #B8A000;
    --gold-bright: #FFEA00;
    --amber: #FF8F00;
    --amber-dark: #E65100;
    --red: #FF1744;
    --red-dark: #D50000;
    --red-dim: #B71C1C;
    --cyan: #00E5FF;
    --blue: #2979FF;
    --green: #00E676;

    --bg-0: #050505;
    --bg-1: #0A0A0A;
    --bg-2: #0F0F0F;
    --bg-3: #151515;
    --bg-4: #1A1A1A;
    --bg-5: #222222;
    --border: #1E1E1E;
    --border-light: #2A2A2A;
    --border-gold: rgba(255,214,0,0.2);
    --border-gold-strong: rgba(255,214,0,0.4);

    --text-0: #FFFFFF;
    --text-1: #E0E0E0;
    --text-2: #999999;
    --text-3: #666666;

    --glow-gold: 0 0 20px rgba(255,214,0,0.3);
    --glow-gold-strong: 0 0 40px rgba(255,214,0,0.4), 0 0 80px rgba(255,214,0,0.1);
    --glow-red: 0 0 20px rgba(255,23,68,0.4);
    --glow-cyan: 0 0 15px rgba(0,229,255,0.3);

    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-arabic: 'Cairo', 'Almarai', 'Tajawal', 'Noto Naskh Arabic', sans-serif;
    --font-arabic-display: 'Almarai', 'Amiri', serif;

    --panel-width: 320px;
    --header-h: 56px;
    --ticker-h: 32px;
    --footer-h: 28px;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

body {
    background: var(--bg-0);
    color: var(--text-1);
    font-family: var(--font-body);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    cursor: default;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,214,0,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,214,0,0.5); }

/* Arabic text utility */
.ar-small {
    font-family: var(--font-arabic);
    font-size: 0.85em;
    opacity: 0.6;
    direction: rtl;
}
.fl-ar, .panel-title-ar, .boot-sub-ar, .header-ar, .empty-ar {
    font-family: var(--font-arabic);
    direction: rtl;
}

/* =============================================
   BOOT SCREEN - Cinematic
   ============================================= */
#boot-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: bootFadeOut 0.8s cubic-bezier(0.4,0,0.2,1) 4.5s forwards;
}

.boot-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,214,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,214,0,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: gridSlide 20s linear infinite;
}

@keyframes gridSlide {
    to { background-position: 40px 40px; }
}

@keyframes bootFadeOut {
    to { opacity: 0; pointer-events: none; visibility: hidden; }
}

.boot-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

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

.boot-ring-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.boot-spinner {
    animation: spinRing 2s linear infinite;
    transform-origin: 100px 100px;
}

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

.boot-logo-text {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 8px;
    text-shadow: var(--glow-gold-strong);
}

.boot-title-en {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 14px;
    text-shadow: var(--glow-gold-strong);
    display: block;
}

.boot-subtitle-dual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.boot-sub-en {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-2);
    letter-spacing: 4px;
}

.boot-sub-divider {
    width: 1px;
    height: 16px;
    background: var(--border-gold);
}

.boot-sub-ar {
    font-family: var(--font-arabic-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 3px;
    text-shadow: 0 0 30px rgba(255,214,0,0.3);
    line-height: 1.4;
}

.boot-progress {
    width: 320px;
    height: 2px;
    background: var(--border);
    margin: 32px auto;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.boot-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--amber));
    width: 0;
    animation: bootLoad 4s cubic-bezier(0.4,0,0.2,1) forwards;
    border-radius: 2px;
}

.boot-progress-glow {
    position: absolute;
    top: -4px;
    left: 0;
    width: 60px;
    height: 10px;
    background: radial-gradient(ellipse, rgba(255,214,0,0.5), transparent);
    animation: bootGlow 4s cubic-bezier(0.4,0,0.2,1) forwards;
    filter: blur(4px);
}

@keyframes bootLoad { to { width: 100%; } }
@keyframes bootGlow { to { left: calc(100% - 60px); } }

.boot-status {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gold-dim);
    letter-spacing: 2px;
    animation: textBlink 1s step-end infinite;
}

@keyframes textBlink { 50% { opacity: 0.3; } }

.boot-stats {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-3);
    letter-spacing: 1px;
}

.boot-stats em {
    color: var(--gold);
    font-style: normal;
}

/* Boot screen - Missiles (left) */
.boot-missiles {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 180px;
    z-index: 1;
    pointer-events: none;
}
.boot-missiles-left { left: 40px; }
.boot-missiles-right { right: 40px; }

.boot-missile, .boot-anti-missile {
    position: absolute;
    top: var(--y, 50%);
    opacity: 0;
}

.boot-missile {
    left: -100px;
    animation: missileFlightRight 3.5s ease-in-out var(--delay, 0s) infinite;
}

.boot-anti-missile {
    right: -100px;
    animation: missileFlightLeft 3.5s ease-in-out var(--delay, 0s) infinite;
}

@keyframes missileFlightRight {
    0% { left: -100px; opacity: 0; }
    10% { opacity: 0.9; }
    90% { opacity: 0.6; }
    100% { left: 160px; opacity: 0; }
}

@keyframes missileFlightLeft {
    0% { right: -100px; opacity: 0; }
    10% { opacity: 0.9; }
    90% { opacity: 0.6; }
    100% { right: 160px; opacity: 0; }
}

.boot-missile-label {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 8px;
    letter-spacing: 3px;
    opacity: 0.3;
}
.boot-missiles-left .boot-missile-label { color: #FF1744; }
.boot-missiles-right .boot-missile-label { color: #00E5FF; }

/* Boot screen - Orbital trajectory */
.boot-orbit-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    pointer-events: none;
    z-index: 0;
}

.boot-orbit-svg {
    width: 100%;
    height: 100%;
}

/* =============================================
   TOP HEADER
   ============================================= */
#top-header {
    height: var(--header-h);
    background: linear-gradient(180deg, rgba(20,20,10,0.95) 0%, var(--bg-1) 100%);
    border-bottom: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    z-index: 100;
    backdrop-filter: blur(20px);
}

/* Subtle gold line at very top */
#top-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.6;
}

.header-left { display: flex; align-items: center; }

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

.brand-logo {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 900;
    color: var(--bg-0);
    background: linear-gradient(135deg, var(--gold), var(--amber));
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    letter-spacing: 3px;
    line-height: 1;
    box-shadow: var(--glow-gold);
}

.brand-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: 4px;
    display: block;
}

.brand-tagline {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-3);
    letter-spacing: 2px;
    display: block;
    margin-top: 1px;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.header-title-dual {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-en {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: 3px;
}

.header-divider {
    color: var(--border-gold);
    font-size: 14px;
}

.header-ar {
    font-family: var(--font-arabic);
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    direction: rtl;
    letter-spacing: 1px;
}

.threat-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.threat-segments {
    display: flex;
    gap: 2px;
}

.threat-seg {
    width: 20px;
    height: 4px;
    border-radius: 1px;
    background: var(--border-light);
    transition: all 0.3s;
}

.threat-seg[data-level="1"] { background: var(--gold); opacity: 0.9; }
.threat-seg[data-level="2"] { background: var(--gold); opacity: 0.9; }
.threat-seg[data-level="3"] { background: var(--amber); opacity: 0.9; }
.threat-seg[data-level="4"] { background: var(--amber-dark); opacity: 0.9; }
.threat-seg[data-level="5"].active {
    background: var(--red);
    box-shadow: var(--glow-red);
    animation: segPulse 2s ease-in-out infinite;
}

@keyframes segPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.threat-text {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--red);
    letter-spacing: 2px;
    animation: segPulse 2s ease-in-out infinite;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    color: var(--green);
    letter-spacing: 2px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(0,230,118,0.6);
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.5; }
}

.header-clock {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--gold);
    letter-spacing: 2px;
}

.lang-toggle {
    background: var(--bg-3);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    gap: 6px;
    align-items: center;
    transition: all 0.2s;
}

.lang-toggle:hover {
    background: rgba(255,214,0,0.1);
    box-shadow: var(--glow-gold);
}

.lang-en {
    font-family: var(--font-display);
    font-size: 10px;
    color: var(--gold);
    font-weight: 700;
}

.lang-ar {
    font-family: var(--font-arabic);
    font-size: 14px;
    color: var(--gold-dim);
    font-weight: 700;
    line-height: 1;
}

/* =============================================
   ALERT TICKER
   ============================================= */
#alert-ticker {
    height: var(--ticker-h);
    background: rgba(255,23,68,0.06);
    border-bottom: 1px solid rgba(255,23,68,0.15);
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.ticker-badge {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    letter-spacing: 2px;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--red);
    white-space: nowrap;
    animation: tickerScroll 80s linear infinite;
    padding-left: 100%;
    opacity: 0.8;
}

@keyframes tickerScroll {
    to { transform: translateX(-100%); }
}

/* =============================================
   MAIN LAYOUT
   ============================================= */
#main-layout {
    display: flex;
    height: calc(100vh - var(--header-h) - var(--ticker-h) - var(--footer-h));
}

/* =============================================
   PANELS
   ============================================= */
.panel {
    width: var(--panel-width);
    min-width: var(--panel-width);
    background: var(--bg-2);
    overflow-y: auto;
    position: relative;
    z-index: 10;
}

#left-panel {
    border-right: 1px solid var(--border);
}

#right-panel {
    border-left: 1px solid var(--border);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-1);
    position: sticky;
    top: 0;
    z-index: 5;
}

.panel-icon {
    color: var(--gold);
    display: flex;
    align-items: center;
    opacity: 0.8;
}

.panel-title-en {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 3px;
}

.panel-title-ar {
    font-family: var(--font-arabic);
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-dim);
    margin-left: auto;
    opacity: 0.8;
}

/* =============================================
   FILTERS
   ============================================= */
.filter-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.filter-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.fl-en {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-2);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.fl-ar {
    font-family: var(--font-arabic);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.chip {
    background: var(--bg-4);
    border: 1px solid var(--border-light);
    color: var(--text-2);
    font-family: var(--font-body);
    font-size: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(255,214,0,0.06);
}

.chip.active {
    background: linear-gradient(135deg, rgba(255,214,0,0.15), rgba(255,214,0,0.05));
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 12px rgba(255,214,0,0.1);
}

.intensity-val {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--gold);
    font-weight: 700;
}

.slider-container { padding: 4px 0; }

.aql-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--amber) 50%, var(--red) 100%);
    outline: none;
    opacity: 0.8;
}

.aql-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    cursor: pointer;
    box-shadow: var(--glow-gold), 0 2px 8px rgba(0,0,0,0.5);
    border: 2px solid var(--bg-0);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-3);
    margin-top: 4px;
}

/* =============================================
   STATS
   ============================================= */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 12px 16px;
}

.stat-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-1px);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    opacity: 0.5;
}

.stat-card.wide { grid-column: 1 / -1; }

.stat-card.accent::after { background: linear-gradient(90deg, var(--amber), transparent); }
.stat-card.danger::after { background: linear-gradient(90deg, var(--red), transparent); opacity: 0.8; }

.stat-number {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(255,214,0,0.2);
    line-height: 1;
}

.stat-card.danger .stat-number {
    color: var(--red);
    text-shadow: 0 0 20px rgba(255,23,68,0.3);
}

.stat-card.accent .stat-number { color: var(--amber); }

.stat-desc {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-3);
    letter-spacing: 0.5px;
    margin-top: 4px;
    line-height: 1.4;
}

/* =============================================
   CONFLICT LIST
   ============================================= */
.conflict-list {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.conflict-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    position: relative;
}

.conflict-list-item:hover {
    background: rgba(255,214,0,0.04);
    border-color: var(--border-gold);
}

.conflict-list-item.selected {
    background: rgba(255,214,0,0.08);
    border-color: var(--gold);
}

.conflict-severity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.conflict-severity-dot.critical {
    background: var(--red);
    box-shadow: 0 0 8px rgba(255,23,68,0.5);
    animation: dotPulse 2s ease-in-out infinite;
}
.conflict-severity-dot.high { background: var(--amber); box-shadow: 0 0 6px rgba(255,143,0,0.3); }
.conflict-severity-dot.medium { background: var(--gold); }
.conflict-severity-dot.low { background: var(--cyan); }

@keyframes dotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.conflict-list-info { flex: 1; min-width: 0; }

.conflict-list-name {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conflict-list-meta {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-3);
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.conflict-list-intensity {
    display: flex;
    gap: 1px;
    flex-shrink: 0;
}

.intensity-bar {
    width: 3px;
    height: 12px;
    border-radius: 1px;
    background: var(--border-light);
}

.intensity-bar.filled { background: var(--gold); }
.intensity-bar.filled.high { background: var(--amber); }
.intensity-bar.filled.critical { background: var(--red); }

/* =============================================
   GLOBE CONTAINER
   ============================================= */
#globe-container {
    flex: 1;
    position: relative;
    background: radial-gradient(ellipse at center, #0A0800 0%, var(--bg-0) 70%);
    overflow: hidden;
}

#globe-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    touch-action: none;
}

#globe-canvas:active {
    cursor: grabbing;
}

/* Vignette */
#globe-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(5,5,5,0.7) 100%);
    pointer-events: none;
    z-index: 3;
}

/* Subtle noise */
#globe-container::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 4;
}

/* =============================================
   GLOBE HUD
   ============================================= */
#globe-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    padding: 16px;
}

.hud-legend {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(5,5,5,0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    backdrop-filter: blur(12px);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-2);
}

.legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.legend-dot.critical { background: var(--red); box-shadow: 0 0 6px rgba(255,23,68,0.5); }
.legend-dot.high { background: var(--amber); }
.legend-dot.medium { background: var(--gold); }
.legend-dot.low { background: var(--cyan); }

.hud-attack-legend {
    position: absolute;
    top: 140px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: rgba(5,5,5,0.7);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    backdrop-filter: blur(12px);
}

.attack-legend-title {
    font-family: var(--font-display);
    font-size: 8px;
    font-weight: 700;
    color: var(--gold-dim);
    letter-spacing: 2px;
    margin-bottom: 2px;
}

.attack-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-2);
}

.attack-legend-icon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hud-coords {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
    letter-spacing: 1px;
    background: rgba(5,5,5,0.6);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.hud-coords em {
    color: var(--gold);
    font-style: normal;
    font-weight: 600;
}

.hud-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: all;
}

.hud-controls button {
    width: 36px;
    height: 36px;
    background: rgba(10,10,10,0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(12px);
}

.hud-controls button:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(255,214,0,0.08);
}

.hud-controls button.active {
    border-color: var(--gold);
    color: var(--gold);
}

.hud-view-modes {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    pointer-events: all;
}

.view-btn {
    width: 36px;
    height: 36px;
    background: rgba(10,10,10,0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(12px);
}

.view-btn:hover { border-color: var(--border-gold); color: var(--text-1); }
.view-btn.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(255,214,0,0.08);
}

/* =============================================
   TOOLTIP
   ============================================= */
#tooltip {
    position: absolute;
    background: rgba(8,8,8,0.96);
    border: 1px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-1);
    pointer-events: none;
    z-index: 200;
    min-width: 240px;
    max-width: 320px;
    box-shadow: var(--glow-gold-strong), 0 20px 60px rgba(0,0,0,0.8);
    backdrop-filter: blur(24px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    animation: tooltipIn 0.2s cubic-bezier(0.4,0,0.2,1);
}

#tooltip.hidden {
    opacity: 0;
    transform: translateY(4px);
}

@keyframes tooltipIn {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#tooltip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--amber), var(--gold));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* =============================================
   CONFLICT DETAILS
   ============================================= */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-3);
}

.empty-globe-icon {
    margin-bottom: 16px;
    color: var(--text-3);
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.empty-en {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.empty-ar {
    font-family: var(--font-arabic);
    font-size: 14px;
    color: var(--text-3);
    opacity: 0.6;
}

.detail-card {
    margin: 12px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.detail-card.sev-critical::before { background: var(--red); box-shadow: var(--glow-red); }
.detail-card.sev-high::before { background: var(--amber); }
.detail-card.sev-medium::before { background: var(--gold); }
.detail-card.sev-low::before { background: var(--cyan); }

.detail-body { padding: 16px; }

.detail-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.detail-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 9px;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.detail-badge.critical { background: rgba(255,23,68,0.15); border: 1px solid rgba(255,23,68,0.3); color: var(--red); }
.detail-badge.high { background: rgba(255,143,0,0.15); border: 1px solid rgba(255,143,0,0.3); color: var(--amber); }

.detail-parties {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0;
}

.party-tag {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--gold);
    padding: 5px 12px;
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    background: rgba(255,214,0,0.04);
    letter-spacing: 1px;
}

.versus {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 900;
    color: var(--red);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}

.detail-field {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-3);
    letter-spacing: 0.5px;
}

.detail-field strong {
    display: block;
    color: var(--gold);
    font-size: 13px;
    margin-top: 2px;
    font-weight: 600;
}

.detail-desc {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.7;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.detail-alliances {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-4);
    border-radius: var(--radius-md);
}

.alliance-title {
    font-family: var(--font-display);
    font-size: 9px;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.alliance-row {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-2);
    line-height: 1.8;
}

.alliance-row .side-label {
    font-weight: 600;
}

.side-label.side-a { color: var(--cyan); }
.side-label.side-b { color: var(--red); }

/* Intensity visual bar */
.intensity-visual {
    display: flex;
    gap: 2px;
    align-items: center;
    margin-top: 4px;
}

.iv-seg {
    width: 16px;
    height: 6px;
    border-radius: 1px;
    background: var(--border-light);
}

.iv-seg.on { background: var(--gold); }
.iv-seg.on.warn { background: var(--amber); }
.iv-seg.on.danger { background: var(--red); }

.iv-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--red);
    margin-left: 8px;
}

/* =============================================
   ALERTS LIST
   ============================================= */
.alert-item {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.alert-item:hover {
    background: rgba(255,214,0,0.03);
}

.alert-bar {
    width: 3px;
    min-height: 100%;
    border-radius: 2px;
    flex-shrink: 0;
}
.alert-bar.critical { background: var(--red); }
.alert-bar.high { background: var(--amber); }
.alert-bar.medium { background: var(--gold); }

.alert-body { flex: 1; }

.alert-time {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--gold-dim);
    letter-spacing: 1px;
}

.alert-text {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-2);
    margin-top: 3px;
    line-height: 1.5;
}

/* =============================================
   TIMELINE
   ============================================= */
.timeline-item {
    position: relative;
    padding-left: 22px;
    padding-bottom: 14px;
    padding-right: 16px;
    border-left: 1px solid var(--border-gold);
    margin-left: 22px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg-3);
    border: 2px solid var(--gold);
}

.timeline-item.critical::before {
    background: var(--red);
    border-color: var(--red);
    box-shadow: 0 0 8px rgba(255,23,68,0.4);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gold-dim);
    letter-spacing: 1px;
}

.timeline-text {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-2);
    margin-top: 2px;
    line-height: 1.4;
}

/* =============================================
   BOTTOM BAR
   ============================================= */
#bottom-bar {
    height: var(--footer-h);
    background: var(--bg-1);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-3);
    letter-spacing: 1px;
}

.bottom-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bottom-section em {
    color: var(--gold);
    font-style: normal;
}

.bottom-brand {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
}

.bottom-sep {
    color: var(--border-gold);
}

/* =============================================
   WEAPONS FLOAT BUTTON
   ============================================= */
.weapons-float-btn {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(8,8,8,0.92);
    border: 1px solid var(--gold);
    border-radius: 30px;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--glow-gold), 0 8px 30px rgba(0,0,0,0.5);
    animation: weaponsBtnPulse 2.5s ease-in-out infinite;
}

.weapons-float-btn:hover {
    background: rgba(255,214,0,0.15);
    box-shadow: var(--glow-gold-strong), 0 8px 30px rgba(0,0,0,0.5);
    transform: translateX(-50%) translateY(-2px) scale(1.05);
}

@keyframes weaponsBtnPulse {
    0%, 100% { box-shadow: var(--glow-gold), 0 8px 30px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 0 30px rgba(255,214,0,0.5), 0 0 60px rgba(255,214,0,0.15), 0 8px 30px rgba(0,0,0,0.5); }
}

/* =============================================
   WEAPONS PANEL OVERLAY
   ============================================= */
.weapons-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 520px;
    max-width: 100vw;
    z-index: 1000;
    background: rgba(8,8,8,0.97);
    border-left: 1px solid var(--border-gold);
    backdrop-filter: blur(24px);
    overflow-y: auto;
    animation: weaponsPanelIn 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.6);
}

@keyframes weaponsPanelIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.weapons-panel.hidden {
    display: none !important;
}

.weapons-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-gold);
    background: linear-gradient(180deg, rgba(20,18,5,0.9), rgba(10,10,10,0.95));
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.weapons-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 3px;
    flex: 1;
}

.weapons-conflict-name {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-2);
    width: 100%;
    margin-top: 4px;
}

.weapons-close-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-2);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.weapons-close-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

.weapons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px 24px;
}

.weapon-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.weapon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--amber));
    opacity: 0.6;
}

.weapon-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-2px);
    box-shadow: var(--glow-gold), 0 8px 24px rgba(0,0,0,0.3);
}

.weapon-img-wrap {
    height: 90px;
    background: var(--bg-4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.weapon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.weapon-info {
    padding: 12px;
}

.weapon-name {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.weapon-type {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.weapon-country {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-3);
    margin-bottom: 6px;
}

.weapon-desc {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.5;
}

.weapons-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-3);
    letter-spacing: 1px;
}

/* =============================================
   ESCALATION SCORE PANEL
   ============================================= */
.escalation-panel {
    position: absolute;
    bottom: 60px;
    right: 16px;
    z-index: 50;
    pointer-events: all;
    background: rgba(8,8,8,0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    min-width: 180px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.esc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.esc-score-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
}

.esc-score-value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    text-shadow: 0 0 20px rgba(255,23,68,0.3);
}

.esc-score-max {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-3);
}

.esc-bar-track {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.esc-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4,0,0.2,1), background 0.5s;
}

.esc-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--red);
}

/* =============================================
   AI PREDICTION PANEL
   ============================================= */
.ai-prediction-panel {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 49;
    pointer-events: all;
    background: rgba(8,8,8,0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    min-width: 220px;
    max-width: 260px;
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.aip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.aip-subtitle {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-3);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.aip-progress-track {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.aip-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4,0,0.2,1), background 0.5s;
}

.aip-percentage {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 15px rgba(255,23,68,0.3);
}

.aip-factors {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.aip-factor {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-2);
}

.aip-factor-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--amber);
    flex-shrink: 0;
}

/* =============================================
   TEXT READABILITY IMPROVEMENTS
   ============================================= */
.panel-title-en {
    font-size: 12px;
    letter-spacing: 2px;
}

.panel-title-ar {
    font-size: 14px;
}

.header-en {
    font-size: 12px;
    color: var(--text-1);
}

.header-ar {
    font-size: 16px;
}

.conflict-list-name {
    font-size: 13px;
}

.conflict-list-meta {
    font-size: 10px;
}

.detail-name {
    font-size: 16px;
    letter-spacing: 2px;
}

.detail-badge {
    font-size: 10px;
}

.detail-field {
    font-size: 11px;
}

.detail-field strong {
    font-size: 14px;
}

.detail-desc {
    font-size: 13px;
    line-height: 1.8;
}

.stat-number {
    font-size: 24px;
}

.stat-desc {
    font-size: 10px;
}

.alert-text {
    font-size: 12px;
}

.timeline-text {
    font-size: 12px;
}

.legend-item {
    font-size: 11px;
}

.boot-sub-en {
    font-size: 14px;
}

.boot-sub-ar {
    font-size: 24px;
}

/* =============================================
   THEME TOGGLE BUTTON
   ============================================= */
.theme-toggle {
    background: var(--bg-3);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: var(--gold);
}

.theme-toggle:hover {
    background: rgba(255,214,0,0.1);
    box-shadow: var(--glow-gold);
}

/* In dark mode, show sun icon; hide moon */
.theme-icon-light { display: none; }
.theme-icon-dark { display: block; }

/* In light mode, show moon icon; hide sun */
[data-theme="light"] .theme-icon-light { display: block; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* Mobile menu button - hidden by default */
.mobile-menu-btn {
    display: none;
    background: var(--bg-3);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 6px;
    cursor: pointer;
    color: var(--gold);
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.mobile-menu-btn:hover {
    background: rgba(255,214,0,0.1);
}

/* =============================================
   LIGHT THEME
   ============================================= */
[data-theme="light"] {
    --bg-0: #F5F5F5;
    --bg-1: #EEEEEE;
    --bg-2: #E8E8E8;
    --bg-3: #FFFFFF;
    --bg-4: #F0F0F0;
    --bg-5: #E0E0E0;
    --border: #D0D0D0;
    --border-light: #C8C8C8;
    --border-gold: rgba(212,168,0,0.3);
    --border-gold-strong: rgba(212,168,0,0.55);

    --text-0: #111111;
    --text-1: #222222;
    --text-2: #555555;
    --text-3: #888888;

    --gold: #C89600;
    --gold-dim: #A67C00;
    --gold-bright: #E6AC00;
    --amber: #E65100;
    --amber-dark: #BF360C;
    --red: #D50000;
    --red-dark: #B71C1C;
    --cyan: #00838F;
    --blue: #1565C0;
    --green: #2E7D32;

    --glow-gold: 0 0 12px rgba(200,150,0,0.3);
    --glow-gold-strong: 0 0 24px rgba(200,150,0,0.35), 0 0 48px rgba(200,150,0,0.12);
    --glow-red: 0 0 12px rgba(213,0,0,0.25);
    --glow-cyan: 0 0 10px rgba(0,131,143,0.2);
}

[data-theme="light"] body {
    background: var(--bg-0);
}

[data-theme="light"] #boot-screen {
    background: linear-gradient(135deg, #1A1400 0%, #0D0A00 40%, #1A1200 100%);
}

[data-theme="light"] .boot-bg-grid {
    background-image:
        linear-gradient(rgba(255,214,0,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,214,0,0.05) 1px, transparent 1px);
}

[data-theme="light"] .boot-logo-text {
    color: #FFD600;
    text-shadow: 0 0 40px rgba(255,214,0,0.5), 0 0 80px rgba(255,214,0,0.2);
}

[data-theme="light"] .boot-title-en {
    color: #FFD600;
    text-shadow: 0 0 40px rgba(255,214,0,0.5), 0 0 80px rgba(255,214,0,0.2);
}

[data-theme="light"] .boot-sub-en {
    color: #B8A000;
}

[data-theme="light"] .boot-sub-ar {
    color: #FFD600;
    text-shadow: 0 0 30px rgba(255,214,0,0.4);
}

[data-theme="light"] .boot-sub-divider {
    background: rgba(255,214,0,0.3);
}

[data-theme="light"] .boot-status {
    color: #B8A000;
}

[data-theme="light"] .boot-stats {
    color: #888;
}

[data-theme="light"] .boot-stats em {
    color: #FFD600;
}

[data-theme="light"] .boot-progress {
    background: #2A2200;
}

[data-theme="light"] .boot-progress-bar {
    background: linear-gradient(90deg, #FFD600, #FF8F00);
}

[data-theme="light"] .boot-progress-glow {
    background: radial-gradient(ellipse, rgba(255,214,0,0.6), transparent);
}

[data-theme="light"] .boot-ring-svg circle {
    stroke: rgba(255,214,0,0.15);
}

[data-theme="light"] .boot-spinner {
    stroke: rgba(255,214,0,0.7) !important;
}

[data-theme="light"] #top-header {
    background: linear-gradient(180deg, rgba(240,240,230,0.98) 0%, var(--bg-1) 100%);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

[data-theme="light"] #globe-container {
    background: radial-gradient(ellipse at center, #E8E0D0 0%, var(--bg-0) 70%);
}

[data-theme="light"] #globe-container::before {
    background: radial-gradient(ellipse at center, transparent 40%, rgba(245,245,245,0.5) 100%);
}

[data-theme="light"] .hud-legend,
[data-theme="light"] .hud-attack-legend {
    background: rgba(255,255,255,0.85);
    border-color: var(--border);
}

[data-theme="light"] .hud-coords {
    background: rgba(255,255,255,0.85);
}

[data-theme="light"] .hud-controls button,
[data-theme="light"] .view-btn {
    background: rgba(255,255,255,0.9);
    color: var(--text-2);
}

[data-theme="light"] .hud-controls button:hover,
[data-theme="light"] .view-btn:hover {
    background: rgba(255,255,255,1);
}

[data-theme="light"] #tooltip {
    background: rgba(255,255,255,0.97);
    border-color: var(--gold);
    box-shadow: var(--glow-gold), 0 12px 40px rgba(0,0,0,0.15);
}

[data-theme="light"] .stat-card {
    background: #FFFFFF;
    border-color: var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

[data-theme="light"] .panel {
    background: var(--bg-3);
}

[data-theme="light"] .panel-header {
    background: var(--bg-1);
}

[data-theme="light"] .chip {
    background: #FFFFFF;
    border-color: var(--border);
}

[data-theme="light"] .chip.active {
    background: rgba(184,134,11,0.1);
    border-color: var(--gold);
}

[data-theme="light"] .conflict-list-item:hover {
    background: rgba(184,134,11,0.05);
}

[data-theme="light"] .conflict-list-item.selected {
    background: rgba(184,134,11,0.1);
    border-color: var(--gold);
}

[data-theme="light"] .detail-card {
    background: #FFFFFF;
    border-color: var(--border);
}

[data-theme="light"] .detail-alliances {
    background: var(--bg-1);
}

[data-theme="light"] .alert-item:hover {
    background: rgba(184,134,11,0.04);
}

[data-theme="light"] .timeline-item::before {
    background: var(--bg-3);
}

[data-theme="light"] #bottom-bar {
    background: var(--bg-1);
    border-top-color: var(--border);
}

[data-theme="light"] #alert-ticker {
    background: rgba(213,0,0,0.04);
    border-bottom-color: rgba(213,0,0,0.12);
}

[data-theme="light"] .ticker-content {
    color: var(--red);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(184,134,11,0.3);
}

[data-theme="light"] .theme-toggle {
    background: var(--bg-4);
    border-color: var(--border);
    color: var(--text-1);
}

[data-theme="light"] .lang-toggle {
    background: var(--bg-4);
    border-color: var(--border);
}

[data-theme="light"] .brand-logo {
    color: #FFFFFF;
}

[data-theme="light"] .weapons-panel {
    background: rgba(255,255,255,0.97);
    border-left-color: var(--border);
}

[data-theme="light"] .weapons-panel-header {
    background: linear-gradient(180deg, rgba(245,240,225,0.95), rgba(255,255,255,0.98));
}

[data-theme="light"] .weapon-card {
    background: #FFFFFF;
    border-color: var(--border);
}

[data-theme="light"] .weapon-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

[data-theme="light"] .weapons-float-btn {
    background: rgba(255,255,255,0.95);
    box-shadow: var(--glow-gold), 0 4px 20px rgba(0,0,0,0.15);
}

[data-theme="light"] .escalation-panel,
[data-theme="light"] .ai-prediction-panel {
    background: rgba(255,255,255,0.95);
    border-color: var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

[data-theme="light"] .mobile-nav {
    background: rgba(255,255,255,0.95);
    border-top-color: var(--border);
}

/* =============================================
   MOBILE BOTTOM NAV (hidden by default)
   ============================================= */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-1);
    border-top: 1px solid var(--border-gold);
    z-index: 600;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    backdrop-filter: blur(10px);
}

.mobile-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 6px 16px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.mobile-nav-tab svg {
    transition: all 0.3s;
}

.mobile-nav-tab.active {
    color: var(--gold);
}

.mobile-nav-tab.active svg {
    filter: drop-shadow(0 0 6px var(--gold));
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1400px) {
    .panel { width: 280px; min-width: 280px; }
}

@media (max-width: 1100px) {
    #left-panel { width: 260px; min-width: 260px; }
    #right-panel { display: none; }
}

/* TABLET & MOBILE */
@media (max-width: 900px) {
    :root {
        --header-h: 50px;
        --ticker-h: 28px;
        --footer-h: 0px;
        --mobile-nav-h: 56px;
    }

    /* Show mobile nav, hide footer and hamburger */
    .mobile-nav { display: flex; }
    #bottom-bar { display: none; }
    .mobile-menu-btn { display: none; }

    .header-center { display: none; }

    .header-right {
        gap: 10px;
    }

    .header-clock {
        font-size: 12px;
    }

    /* Main layout becomes stacked */
    #main-layout {
        flex-direction: column;
        height: calc(100vh - var(--header-h) - var(--ticker-h) - var(--mobile-nav-h));
        overflow: hidden;
        position: relative;
    }

    /* Globe takes full space */
    #globe-container {
        flex: 1;
        width: 100%;
        min-height: 0;
    }

    /* Panels are absolutely positioned overlays, hidden by default */
    #left-panel,
    #right-panel {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        min-width: 100%;
        z-index: 100;
        display: none;
        overflow-y: auto;
        border: none;
    }

    #left-panel.mobile-visible,
    #right-panel.mobile-visible {
        display: block;
    }

    /* Remove the old slide-in transform */
    #left-panel.open {
        transform: none;
    }

    /* Mobile overlay - no longer needed */
    .mobile-overlay {
        display: none !important;
    }

    /* HUD adjustments */
    .hud-legend {
        padding: 6px 8px;
        gap: 2px;
    }
    .legend-item { font-size: 8px; gap: 5px; }

    .hud-attack-legend {
        top: 110px;
        padding: 6px 8px;
    }
    .attack-legend-item { font-size: 8px; }
    .attack-legend-title { font-size: 7px; }

    .hud-controls button,
    .view-btn {
        width: 32px;
        height: 32px;
    }

    .hud-controls {
        bottom: 10px;
    }

    .hud-coords {
        bottom: 10px;
    }

    /* Panels on globe */
    .weapons-panel {
        width: 400px;
        max-width: 90%;
    }

    .weapons-grid {
        gap: 10px;
        padding: 16px;
    }

    .escalation-panel {
        bottom: 10px;
        right: 12px;
        min-width: 160px;
        padding: 12px 14px;
    }

    .ai-prediction-panel {
        bottom: 10px;
        min-width: 180px;
        padding: 12px 14px;
    }

    .weapons-float-btn {
        bottom: 120px;
        padding: 8px 16px;
        font-size: 10px;
    }

    /* Boot screen */
    .boot-title-en {
        font-size: 30px;
        letter-spacing: 8px;
    }
    .boot-sub-ar {
        font-size: 18px;
    }
    .boot-logo-ring {
        width: 110px;
        height: 110px;
    }
    .boot-logo-text {
        font-size: 28px;
    }
    .boot-progress {
        width: 260px;
    }
}

/* MOBILE PHONE */
@media (max-width: 600px) {
    :root {
        --header-h: 46px;
        --ticker-h: 26px;
        --footer-h: 0px;
        --mobile-nav-h: 56px;
    }

    .brand-text { display: none; }

    .brand-logo {
        font-size: 14px;
        padding: 3px 8px;
        letter-spacing: 2px;
    }

    .header-center { display: none; }

    .header-right {
        gap: 6px;
    }

    .header-clock {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .live-badge {
        font-size: 8px;
        gap: 4px;
    }

    .live-dot {
        width: 5px;
        height: 5px;
    }

    .lang-toggle {
        padding: 3px 6px;
    }

    .lang-en { font-size: 9px; }
    .lang-ar { font-size: 12px; }

    .theme-toggle {
        padding: 4px;
    }

    .theme-toggle svg {
        width: 14px;
        height: 14px;
    }

    /* Ticker */
    #alert-ticker {
        height: var(--ticker-h);
    }

    .ticker-badge {
        font-size: 7px;
        padding: 0 8px;
        letter-spacing: 1px;
    }

    .ticker-content {
        font-size: 9px;
    }

    /* Stats */
    .stats-grid {
        gap: 4px;
        padding: 8px 12px;
    }

    .stat-card {
        padding: 8px;
    }

    .stat-number {
        font-size: 18px;
    }

    .stat-desc {
        font-size: 8px;
    }

    /* Conflict list */
    .conflict-list-item {
        padding: 8px 10px;
        gap: 8px;
    }

    .conflict-list-name {
        font-size: 11px;
    }

    .conflict-list-meta {
        font-size: 8px;
    }

    /* HUD */
    .hud-legend {
        top: 8px;
        left: 8px;
        padding: 5px 7px;
        gap: 1px;
    }
    .legend-item {
        font-size: 7px;
        gap: 4px;
    }
    .legend-dot {
        width: 5px;
        height: 5px;
    }

    .hud-attack-legend {
        top: 88px;
        left: 8px;
        padding: 5px 7px;
    }
    .attack-legend-item {
        font-size: 7px;
        gap: 5px;
    }
    .attack-legend-icon {
        width: 5px;
        height: 5px;
    }
    .attack-legend-title {
        font-size: 6px;
        letter-spacing: 1px;
    }

    .hud-coords {
        bottom: 10px;
        left: 8px;
        font-size: 9px;
        padding: 4px 8px;
        gap: 10px;
    }

    .hud-controls {
        bottom: 10px;
        right: 8px;
        gap: 3px;
    }

    .hud-controls button {
        width: 28px;
        height: 28px;
    }

    .hud-controls button svg {
        width: 14px;
        height: 14px;
    }

    .hud-view-modes {
        top: 8px;
        right: 8px;
        gap: 3px;
    }

    .view-btn {
        width: 28px;
        height: 28px;
    }

    .view-btn svg {
        width: 12px;
        height: 12px;
    }

    /* Tooltip */
    #tooltip {
        min-width: 200px;
        max-width: 260px;
        padding: 10px 14px;
        font-size: 10px;
    }

    /* Boot screen mobile */
    .boot-title-en {
        font-size: 24px;
        letter-spacing: 6px;
    }

    .boot-sub-en {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .boot-sub-ar {
        font-size: 16px;
    }

    .boot-subtitle-dual {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .boot-missiles { display: none; }
    .boot-orbit-container { width: 300px; height: 300px; }

    .boot-logo-ring {
        width: 90px;
        height: 90px;
        margin-bottom: 20px;
    }

    .boot-logo-text {
        font-size: 22px;
        letter-spacing: 5px;
    }

    .boot-progress {
        width: 220px;
        margin: 24px auto;
    }

    .boot-status {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .boot-stats {
        gap: 14px;
        font-size: 8px;
    }

    /* Chips */
    .chip {
        font-size: 9px;
        padding: 4px 8px;
    }

    .filter-section {
        padding: 10px 12px;
    }

    /* Weapons panel full screen on mobile */
    .weapons-panel {
        width: 100%;
        max-width: 100%;
    }

    .weapons-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
    }

    .weapons-panel-title {
        font-size: 12px;
        letter-spacing: 2px;
    }

    .weapons-float-btn {
        bottom: 100px;
        padding: 8px 14px;
        font-size: 9px;
        letter-spacing: 1px;
    }

    .escalation-panel {
        bottom: 10px;
        right: 8px;
        min-width: 140px;
        padding: 10px 12px;
    }

    .esc-score-value {
        font-size: 24px;
    }

    .ai-prediction-panel {
        bottom: 10px;
        min-width: 160px;
        max-width: 200px;
        padding: 10px 12px;
    }

    .aip-percentage {
        font-size: 20px;
    }
}

/* Extra small mobile */
@media (max-width: 380px) {
    .boot-title-en {
        font-size: 20px;
        letter-spacing: 4px;
    }

    .boot-sub-ar {
        font-size: 14px;
    }

    .boot-progress {
        width: 180px;
    }

    .header-clock { display: none; }
}
