/* =========================================================================
   JAXA EARTH OBSERVATORY — PIXEL INTELLIGENCE & EARTH EVENT ENGINE (v2.0)
   =========================================================================
   Ultra-Premium Aerospace Scientific Design System
   Zero emoji artifacts • Vector micro-icons • Tabular typography
   ========================================================================= */

/* --- Base Map Cursor in Inspector Mode --- */
.map-viewport.pixel-inspector-active,
.map-viewport.pixel-inspector-active #map {
    cursor: crosshair !important;
}

/* --- Map Tools Rail Button --- */
.btn-pixel-inspector-tool {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-pixel-inspector-tool .svg-icon {
    width: 17px;
    height: 17px;
    color: #94a3b8;
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-pixel-inspector-tool:hover .svg-icon {
    color: #ffffff;
    transform: scale(1.08);
}

.btn-pixel-inspector-tool.active {
    background: rgba(0, 242, 254, 0.18) !important;
    border-color: rgba(0, 242, 254, 0.6) !important;
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.45), inset 0 0 8px rgba(0, 242, 254, 0.2) !important;
}

.btn-pixel-inspector-tool.active .svg-icon {
    color: #00f2fe !important;
}

.tool-pi-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #00f2fe;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn-pixel-inspector-tool.active .tool-pi-dot {
    opacity: 1;
    box-shadow: 0 0 8px #00f2fe;
    animation: piDotPulse 1.6s infinite ease-in-out;
}

@keyframes piDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.4; }
}

/* =========================================================================
   TOP MAP TICKER: EARTH EVENT ENGINE
/* =========================================================================
   AUTONOMOUS EARTH EVENT RADAR TRIGGER & CHIP
   ========================================================================= */
.earth-event-radar-pill {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 95;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(8, 14, 30, 0.88);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1px solid rgba(0, 242, 254, 0.3);
    box-shadow: 0 12px 32px -6px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 24px rgba(0, 242, 254, 0.15);
    border-radius: 40px;
    padding: 7px 18px;
    font-family: var(--font-main, 'Outfit', sans-serif);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.earth-event-radar-pill:hover {
    border-color: rgba(0, 242, 254, 0.6);
    box-shadow: 0 16px 40px -4px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 242, 254, 0.35), 0 0 32px rgba(0, 242, 254, 0.25);
    transform: translateX(-50%) translateY(-2px);
}

.earth-event-radar-pill:active {
    transform: translateX(-50%) translateY(0);
}

.eed-radar-beacon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 10px #00f2fe;
    animation: eedBeaconPulse 1.8s infinite;
}

@keyframes eedBeaconPulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(0, 242, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

.eed-radar-svg {
    width: 15px;
    height: 15px;
    color: #00f2fe;
    filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.5));
}

.eed-radar-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    color: #ffffff;
}

.eed-radar-badge {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.64rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.4);
    color: #00f2fe;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
}

.eed-radar-badge.active-anomalies {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.eed-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    letter-spacing: 0.03em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.eed-status-pill:hover {
    transform: translateY(-1px);
}

.eed-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
}

.eed-status-pill.status-critical {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #f87171;
}

.eed-status-pill.status-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.eed-status-pill.status-normal {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #34d399;
}

.eed-latest-headline {
    font-size: 0.72rem;
    font-weight: 500;
    color: #cbd5e1;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 340px;
    transition: color 0.2s ease;
}

.eed-latest-headline:hover {
    color: #ffffff;
}

.eed-filter-controls {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2px;
    gap: 2px;
}

.eed-filter-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 3px 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.eed-filter-btn:hover {
    color: #ffffff;
}

.eed-filter-btn.active {
    background: rgba(0, 242, 254, 0.18);
    color: #00f2fe;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.2);
}

.eed-planetary-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: #e2e8f0;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.eed-planetary-btn .svg-icon-nano {
    width: 13px;
    height: 13px;
    color: #00f2fe;
}

.eed-planetary-btn:hover {
    background: rgba(0, 242, 254, 0.22);
    border-color: #00f2fe;
    color: #ffffff;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.35);
}

/* =========================================================================
   PIXEL INTELLIGENCE WINDOW
   ========================================================================= */
/* =========================================================================
   PIXEL INTELLIGENCE COCKPIT WINDOW (WIDESCREEN)
   ========================================================================= */
.pixel-intelligence-card {
    position: absolute;
    top: 70px;
    left: 20px;
    z-index: 98;
    width: 630px;
    max-width: calc(100vw - 40px);
    background: rgba(7, 13, 27, 0.94);
    backdrop-filter: blur(28px) saturate(200%);
    -webkit-backdrop-filter: blur(28px) saturate(200%);
    border: 1px solid rgba(0, 242, 254, 0.28);
    box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 35px rgba(0, 242, 254, 0.15);
    border-radius: 18px;
    overflow: hidden;
    font-family: var(--font-main, 'Outfit', sans-serif);
    color: #ffffff;
    animation: piSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

[dir="rtl"] .pixel-intelligence-card {
    left: auto;
    right: 20px;
}

@keyframes piSlideIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pi-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pi-header-svg {
    width: 16px;
    height: 16px;
    color: #00f2fe;
    filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.5));
}

.pi-title-text {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    color: #00f2fe;
}

.pi-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pi-icon-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #94a3b8;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pi-icon-btn:hover {
    background: rgba(0, 242, 254, 0.15);
    color: #00f2fe;
    border-color: rgba(0, 242, 254, 0.4);
}

.pi-body {
    padding: 12px 16px;
    max-height: calc(85vh - 90px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 242, 254, 0.25) transparent;
}

/* Widescreen 2-Column Cockpit Grid */
.pi-cockpit-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 12px;
    align-items: start;
}

.pi-col-primary,
.pi-col-secondary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Section: Location & Hero Value */
.pi-section-meta {
    margin-bottom: 2px;
}

.pi-coord-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.pi-coord-badge {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.70rem;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 2px 7px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
}

.pi-obs-date-badge {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.65rem;
    color: #38bdf8;
    font-variant-numeric: tabular-nums;
}

.pi-sensor-label {
    font-size: 0.66rem;
    color: #38bdf8;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.pi-variable-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.25;
}

.pi-observed-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0, 242, 254, 0.08) 0%, rgba(0, 242, 254, 0.02) 100%);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 6px;
    box-shadow: inset 0 0 16px rgba(0, 242, 254, 0.05);
}

.pi-hero-val {
    font-size: 1.7rem;
    font-weight: 800;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    color: #00f2fe;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
}

.pi-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 5px 8px;
}

.pi-spec-item {
    font-size: 0.62rem;
    display: flex;
    flex-direction: column;
}

.pi-spec-k {
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1px;
}

.pi-spec-v {
    color: #e2e8f0;
    font-weight: 700;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

/* Sections Common Box */
.pi-section-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 10px;
}

.pi-box-title {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #00f2fe;
    margin-bottom: 6px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

/* Change Grid */
.pi-change-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    text-align: center;
}

.pi-sub-label {
    display: block;
    font-size: 0.58rem;
    color: #64748b;
    margin-bottom: 1px;
    font-weight: 500;
}

.pi-sub-val {
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    color: #cbd5e1;
    font-variant-numeric: tabular-nums;
}

.pi-sub-val.highlight {
    color: #38bdf8;
}

/* Historical Context & Gauge */
.pi-context-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.pi-ctx-item {
    display: flex;
    gap: 5px;
    align-items: center;
    font-size: 0.68rem;
}

.pi-ctx-val {
    font-weight: 700;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-variant-numeric: tabular-nums;
}

.pi-timeline-wrap {
    margin: 6px 0;
}

.pi-timeline-bar {
    position: relative;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: visible;
}

.pi-timeline-dot {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00f2fe;
    border: 2px solid #ffffff;
    box-shadow: 0 0 8px #00f2fe;
    z-index: 2;
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pi-timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.56rem;
    color: #64748b;
    margin-top: 4px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    letter-spacing: 0.02em;
}

.pi-percentile-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 242, 254, 0.06);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 6px;
    padding: 4px;
    margin-top: 5px;
}

.pi-percentile-val {
    font-size: 0.76rem;
    font-weight: 800;
    color: #00f2fe;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-variant-numeric: tabular-nums;
}

.pi-percentile-sub {
    font-size: 0.58rem;
    color: #94a3b8;
    margin-top: 1px;
}

/* Micro Trend Sparkline */
.pi-sparkline-wrap {
    width: 100%;
    height: 42px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    padding: 2px;
}

.pi-sparkline-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Event Status & Explainability */
.pi-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.62rem;
    font-weight: 800;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    letter-spacing: 0.04em;
    border: 1px solid transparent;
}

.pi-reasons-title {
    font-size: 0.60rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pi-reasons-list {
    margin: 0;
    padding-left: 14px;
    font-size: 0.62rem;
    color: #cbd5e1;
    line-height: 1.45;
}

[dir="rtl"] .pi-reasons-list {
    padding-left: 0;
    padding-right: 14px;
}

.pi-reasons-list li {
    margin-bottom: 2px;
}

/* Actions in Primary Column */
.pi-actions-row {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.7fr 0.9fr;
    gap: 5px;
    margin-top: 4px;
}

@media (max-width: 680px) {
    .pixel-intelligence-card {
        width: calc(100vw - 24px);
        left: 12px;
        right: 12px;
        top: 60px;
    }
    .pi-cockpit-grid {
        grid-template-columns: 1fr;
    }
    .pi-actions-row {
        grid-template-columns: 1fr 1fr;
    }
}

.pi-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-main, 'Outfit', sans-serif);
    text-align: center;
}

.pi-btn-primary {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.pi-btn-primary:hover {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
    border-color: #38bdf8;
}

.pi-btn-accent {
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: #ffffff;
    border: 1px solid rgba(251, 146, 60, 0.4);
}

.pi-btn-accent:hover {
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
    border-color: #fb923c;
}

.pi-btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

.pi-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 242, 254, 0.5);
    color: #ffffff;
}

.pi-btn.copied {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: #10b981 !important;
    color: #10b981 !important;
}

/* =========================================================================
   EARTH EVENT EXPLORER DRAWER
   ========================================================================= */
.earth-event-drawer {
    position: absolute;
    bottom: 30px;
    right: 20px;
    z-index: 97;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: rgba(8, 14, 30, 0.94);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 30px rgba(239, 68, 68, 0.15);
    border-radius: 16px;
    overflow: hidden;
    font-family: var(--font-main, 'Outfit', sans-serif);
    color: #ffffff;
    animation: eedSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

[dir="rtl"] .earth-event-drawer {
    right: auto;
    left: 20px;
}

@keyframes eedSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.eed-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.06);
    border-bottom: 1px solid rgba(239, 68, 68, 0.18);
}

.eed-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.eed-drawer-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.64rem;
    font-weight: 800;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    letter-spacing: 0.04em;
    border: 1px solid transparent;
}

.eed-drawer-id {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.7rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

.eed-drawer-body {
    padding: 14px 16px;
    max-height: calc(85vh - 120px);
    overflow-y: auto;
}

.eed-drawer-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.eed-drawer-loc {
    font-size: 0.74rem;
    color: #38bdf8;
    margin-bottom: 2px;
    font-weight: 600;
}

.eed-drawer-ind {
    font-size: 0.66rem;
    color: #94a3b8;
    margin-bottom: 12px;
}

.eed-stats-matrix {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.eed-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
}

.eed-stat-k {
    display: block;
    font-size: 0.58rem;
    color: #64748b;
    margin-bottom: 2px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.eed-stat-v {
    font-size: 0.84rem;
    font-weight: 700;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.eed-stat-v.highlight {
    color: #f87171;
}

.eed-explain-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.eed-explain-title {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #00f2fe;
    margin-bottom: 8px;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
}

.eed-explain-list {
    margin: 0;
    padding-left: 16px;
    font-size: 0.66rem;
    color: #cbd5e1;
    line-height: 1.55;
}

[dir="rtl"] .eed-explain-list {
    padding-left: 0;
    padding-right: 16px;
}

.eed-explain-list li {
    margin-bottom: 4px;
}

.eed-drawer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.eed-action-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.eed-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.eed-action-btn.primary {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.eed-action-btn.primary:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* =========================================================================
   GLOBAL PLANETARY INTELLIGENCE MODAL (TIER 4: EARTH)
   ========================================================================= */
.planetary-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.planetary-modal-card {
    background: rgba(8, 14, 30, 0.96);
    border: 1px solid rgba(0, 242, 254, 0.3);
    box-shadow: 0 32px 80px -16px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 35px rgba(0, 242, 254, 0.18);
    border-radius: 20px;
    width: 780px;
    max-width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #ffffff;
    font-family: var(--font-main, 'Outfit', sans-serif);
}

.pim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.pim-header-svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 8px rgba(0, 242, 254, 0.5));
}

.pim-header-title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin: 0;
}

.pim-header-sub {
    font-size: 0.68rem;
    color: #00f2fe;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    letter-spacing: 0.05em;
}

.pim-body {
    padding: 20px;
    overflow-y: auto;
}

.pim-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.pim-event-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.pim-event-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 242, 254, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -4px rgba(0, 0, 0, 0.5);
}

.pim-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pim-card-id {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 0.68rem;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

.pim-card-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 800;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    letter-spacing: 0.04em;
    border: 1px solid transparent;
}

.pim-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.pim-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.68rem;
    color: #cbd5e1;
}

.pim-meta-sep {
    color: #475569;
}

.pim-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: flex-end;
}

.pim-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-radius: 8px;
    padding: 7px 18px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.pim-close-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: #00f2fe;
}

/* Global Toast Notification */
.jein-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(8, 14, 30, 0.94);
    border: 1px solid rgba(0, 242, 254, 0.5);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 242, 254, 0.25);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-main, 'Outfit', sans-serif);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.jein-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Responsive Rules */
@media (max-width: 768px) {
    .earth-event-ticker-hud {
        top: 8px;
        padding: 4px 10px;
        gap: 6px;
    }

    .eed-brand-title {
        display: none;
    }

    .eed-latest-headline {
        max-width: 140px;
    }

    .pixel-intelligence-card,
    .earth-event-drawer {
        width: calc(100vw - 20px);
        left: 10px !important;
        right: 10px !important;
    }
}

/* Premium Pixel Intelligence Card Styles */
:root {
    --ppi-card-bg: rgba(16, 23, 38, 0.85);
    --ppi-card-border: rgba(56, 189, 248, 0.3);
    --ppi-accent-cyan: #00e5ff;
    --ppi-accent-red: #ff3b5c;
    --ppi-text-main: #f1f5f9;
    --ppi-text-muted: #94a3b8;
    --ppi-font-main: 'Inter', sans-serif;
    --ppi-font-mono: 'JetBrains Mono', monospace;
}

.ppi-card {
    width: 100%;
    max-width: 750px;
    background: var(--ppi-card-bg);
    border: 1px solid var(--ppi-card-border);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 0 20px rgba(0, 229, 255, 0.05);
    font-family: var(--ppi-font-main);
    color: var(--ppi-text-main);
    position: absolute; /* Match original logic where JS might place it */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    animation: ppi-floatIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    overflow: hidden;
}

.ppi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
    transform: skewX(-20deg);
    animation: ppi-shine 4s infinite;
}

/* Interactive Glow Effect on Mouse Move */
.ppi-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0, 229, 255, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 10;
}

.ppi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
    position: relative;
    z-index: 11;
}

.ppi-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--ppi-accent-cyan);
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.ppi-title svg {
    width: 20px;
    height: 20px;
    animation: ppi-pulse-glow 2s infinite;
}

.ppi-content {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 15px;
    position: relative;
    z-index: 11;
}

.ppi-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s ease;
}

.ppi-panel:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.ppi-main-col {
    grid-column: 1 / 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ppi-coord-box {
    font-family: var(--ppi-font-mono);
    font-size: 0.8rem;
    color: var(--ppi-text-muted);
    margin-bottom: 10px;
    border: 1px solid var(--ppi-accent-cyan);
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.1);
}

.ppi-coord-box span {
    color: var(--ppi-accent-cyan);
    font-size: 1rem;
    font-weight: 600;
}

.ppi-data-src {
    font-size: 0.7rem;
    color: #38bdf8;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
        
.ppi-data-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.ppi-temp-row {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-top: 5px;
}

.ppi-temp-val {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ppi-accent-red);
    font-family: var(--ppi-font-mono);
    text-shadow: 0 0 20px rgba(255, 59, 92, 0.4);
    line-height: 1;
}

.ppi-temp-unit {
    font-size: 1.5rem;
    color: var(--ppi-accent-red);
    opacity: 0.8;
}

.ppi-badge {
    background: rgba(255, 59, 92, 0.1);
    border: 1px solid rgba(255, 59, 92, 0.3);
    color: var(--ppi-accent-red);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(255, 59, 92, 0.2);
    animation: ppi-pulse-red 2s infinite;
    text-align: center;
}

.ppi-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.ppi-info-item {
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.02);
}

.ppi-info-lbl {
    font-size: 0.65rem;
    color: var(--ppi-text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ppi-info-val {
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--ppi-font-mono);
}

.ppi-right-col {
    grid-column: 2 / 3;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ppi-sec-title {
    font-size: 0.75rem;
    color: var(--ppi-accent-cyan);
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.ppi-baseline-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 15px;
}
        
.ppi-stat {
    font-family: var(--ppi-font-mono);
    font-weight: 500;
}

.ppi-text-red {
    color: var(--ppi-accent-red);
}

.ppi-prog-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 8px;
    position: relative;
}

.ppi-prog-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 97.8%;
    background: linear-gradient(90deg, var(--ppi-accent-cyan), var(--ppi-accent-red));
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 59, 92, 0.5);
}

.ppi-prog-dot {
    position: absolute;
    top: -4px;
    right: 0;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px var(--ppi-accent-red);
}

.ppi-prog-lbls {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--ppi-text-muted);
    text-transform: uppercase;
}

.ppi-high-box {
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    margin-top: 15px;
}

.ppi-high-box h4 {
    color: var(--ppi-accent-cyan);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.ppi-high-box p {
    font-size: 0.7rem;
    color: var(--ppi-text-muted);
}

.ppi-trend-chart {
    height: 50px;
    width: 100%;
    position: relative;
    background: linear-gradient(transparent 50%, rgba(255, 255, 255, 0.02) 50%) 0 0 / 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.ppi-trend-chart canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.ppi-drivers {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.ppi-drivers li {
    font-size: 0.75rem;
    color: var(--ppi-text-main);
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
    line-height: 1.4;
}

.ppi-drivers li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--ppi-accent-cyan);
    font-size: 1.2rem;
    top: -4px;
}

.ppi-actions {
    grid-column: 1 / 3;
    display: flex;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    justify-content: flex-end;
    position: relative;
    z-index: 11;
}

.ppi-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ppi-text-main);
    padding: 10px 30px;
    border-radius: 8px;
    font-family: var(--ppi-font-main);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ppi-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.ppi-icon-btn {
    background: transparent;
    border: none;
    color: var(--ppi-text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.ppi-icon-btn:hover {
    color: var(--ppi-text-main);
    background: rgba(255,255,255,0.1);
}

@keyframes ppi-floatIn {
    0% { opacity: 0; transform: translate(-50%, -40%); }
    100% { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes ppi-pulse-glow {
    0% { filter: drop-shadow(0 0 2px var(--ppi-accent-cyan)); }
    50% { filter: drop-shadow(0 0 8px var(--ppi-accent-cyan)); }
    100% { filter: drop-shadow(0 0 2px var(--ppi-accent-cyan)); }
}

@keyframes ppi-pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 59, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); }
}

@keyframes ppi-shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}
