:root {
    --bg-color: #050510;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent: #4f46e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* Hide default cursor */
}

body, html {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* =========================================
   SCI-FI HUD & EFFECTS
========================================= */
.custom-cursor {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}

/* Targeting Brackets */
.custom-cursor::before {
    content: '';
    position: absolute;
    top: -5px; left: -5px;
    right: -5px; bottom: -5px;
    border: 1.5px solid #00fff9;
    /* Custom clip path to create corner brackets */
    clip-path: polygon(
        0 10px, 0 0, 10px 0, 
        calc(100% - 10px) 0, 100% 0, 100% 10px, 
        100% calc(100% - 10px), 100% 100%, calc(100% - 10px) 100%, 
        10px 100%, 0 100%, 0 calc(100% - 10px),
        1px calc(100% - 10px), 1px 10px, /* inner hole */
        10px 1px, calc(100% - 10px) 1px,
        calc(100% - 1px) 10px, calc(100% - 1px) calc(100% - 10px),
        calc(100% - 10px) calc(100% - 1px), 10px calc(100% - 1px)
    );
    /* Simpler approach: use multiple pseudo elements or border-image. 
       Let's use a simpler "Crosshair" look with borders. */
    border: none;
    box-shadow: none;
}

/* Simplified precise crosshair */
.custom-cursor {
    background: none;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.custom-cursor::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 1px solid rgba(0, 255, 249, 0.4);
    box-sizing: border-box;
}

/* Horizontal & Vertical Crosshair Lines */
.custom-cursor::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 6px; height: 6px;
    background: #00fff9;
    border-radius: 1px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px #00fff9, 0 0 20px rgba(0, 255, 249, 0.5);
}

.custom-cursor .cursor-cross {
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    transform: translate(-50%, -50%);
}

.custom-cursor .cursor-cross::before,
.custom-cursor .cursor-cross::after {
    content: '';
    position: absolute;
    background: #00fff9;
    opacity: 0.6;
}

.custom-cursor .cursor-cross::before {
    top: 0; left: 50%; width: 1px; height: 100%; transform: translateX(-50%);
}

.custom-cursor .cursor-cross::after {
    top: 50%; left: 0; width: 100%; height: 1px; transform: translateY(-50%);
}

.custom-cursor.hovering {
    width: 40px;
    height: 40px;
}

.custom-cursor.hovering::before {
    border-color: #ff00c1;
    border-width: 2px;
}

.custom-cursor.hovering::after {
    background: #ff00c1;
    box-shadow: 0 0 15px #ff00c1;
}

.custom-cursor.hovering .cursor-cross::before,
.custom-cursor.hovering .cursor-cross::after {
    background: #ff00c1;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(255, 255, 255, 0.04)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 9998; /* Just below cursor */
    opacity: 0.25;
}

.hud-top-left, .hud-bottom-right {
    position: fixed;
    font-family: monospace;
    font-size: 12px;
    color: #00fff9;
    letter-spacing: 2px;
    z-index: 9997;
    text-shadow: 0 0 10px rgba(0, 255, 249, 0.8);
    opacity: 0.7;
    pointer-events: none;
}

.hud-top-left {
    top: 30px;
    left: 40px;
}

.hud-top-left::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -15px;
    width: 20px;
    height: 20px;
    border-top: 2px solid #00fff9;
    border-left: 2px solid #00fff9;
}

.hud-bottom-right {
    bottom: 30px;
    right: 40px;
    animation: blinkText 2s infinite;
}

.hud-bottom-right::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: -15px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid #00fff9;
    border-right: 2px solid #00fff9;
}

@keyframes pulseBorder {
    from { box-shadow: 0 0 15px rgba(255, 0, 193, 0.8), inset 0 0 5px rgba(255, 0, 193, 0.5); }
    to { box-shadow: 0 0 25px rgba(255, 0, 193, 1), inset 0 0 10px rgba(255, 0, 193, 0.8); }
}

@keyframes blinkText {
    0%, 48%, 52% { opacity: 0.7; }
    50% { opacity: 0.1; }
}

/* CRT Flicker Effect */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.05));
    z-index: 10001;
    pointer-events: none;
    background-size: 100% 2px, 3px 100%;
    animation: crt-flicker 0.15s infinite;
    opacity: 0.18;
}

@keyframes crt-flicker {
    0% { opacity: 0.27; }
    50% { opacity: 0.32; }
    100% { opacity: 0.28; }
}

.webgl {
    position: fixed;
    top: 0;
    left: 0;
    outline: none;
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Neutral vignette (avoid blue cast) */
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.78) 100%);
    pointer-events: none;
    z-index: -2;
}

/* Container for the 3D scroll scrubbing. Very tall so we can scroll a long time. */
.animation-scroll-track {
    height: 400vh; /* 4 pages worth of scrolling just for the animation */
    width: 100%;
}

/* The actual white background and text that comes after */
.content-container {
    position: relative;
    width: 100%;
    background-color: #020208; /* Deep sci-fi dark */
    color: #e0e0e0;
    z-index: 10;
    padding-top: 100px;
    border-top: 2px solid #ff00c1;
    box-shadow: 0 -20px 50px rgba(255, 0, 193, 0.2);
}

/* White transition overlay changed to dark cyber transition */
.white-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    pointer-events: none;
    opacity: 0;
    z-index: 5;
    transition: opacity 0.5s ease;
}

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 5%;
    position: relative;
    z-index: 1;
}

.section.right {
    justify-content: center; /* Override right alignment to keep everything centered */
}

.content {
    max-width: 600px;
    width: 100%;
    background: rgba(10, 10, 25, 0.85); /* Darker backdrop for better contrast */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 249, 0.2);
    border-top: 2px solid #00fff9; /* Top border focus */
    padding: 3rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1), 0 0 30px rgba(0, 255, 249, 0.1);
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.8s ease;
    overflow: hidden;
}

/* Dashboard Wide Panels */
.content.cyber-panel.dashboard-panel {
    max-width: 1400px;
    width: 100%;
}

.section.dashboard-section {
    padding: 2rem 5%;
}

/* Cyberpunk corner accent */
.content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 0, 193, 0.8) 50%);
}

/* Base state for scroll reveal if we add JS to toggle 'visible' class */
.content.hidden {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    filter: blur(10px);
}

h1, h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 4px;
    text-shadow: 0 0 15px rgba(0, 255, 249, 0.4);
}

p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #a0a0b0;
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.content.full-width-panel {
    max-width: 95%; /* Expand to nearly full screen */
    margin: 0 auto;
}

.section.full-screen-panel {
    padding: 2rem 2.5%;
}

/* =========================================
   SITE LOADING SCREEN
========================================= */
.site-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at top, #0b1020 0%, #020208 55%, #000000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10005; /* Above everything including CRT flicker */
    transition: opacity 0.9s ease, transform 0.9s ease;
    transform: translateY(0);
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.site-loading-screen .loading-glitch {
    font-size: 3.2rem;
    margin-bottom: 0;
    letter-spacing: 0.4rem;
    opacity: 0;
    transform: translateY(10px);
    animation: loadingTitleIn 1s ease-out forwards;
}

.loading-bar-container {
    width: 320px;
    height: 5px;
    background: rgba(0, 255, 249, 0.06);
    border: 1px solid rgba(0, 255, 249, 0.4);
    position: relative;
    overflow: hidden;
}

.loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #00fff9;
    box-shadow: 0 0 12px #00fff9;
    transition: width 0.18s ease-out;
}

.loading-status {
    font-family: monospace;
    color: #9ca3ff;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.85;
}

.loading-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.9);
    letter-spacing: 0.3rem;
    text-transform: uppercase;
}

@keyframes loadingTitleIn {
    0% { opacity: 0; transform: translateY(16px) scale(0.97); filter: blur(6px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* =========================================
   FUTURISTIC INTRO TITLE
========================================= */
.intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2; /* Above canvas but below the white scroll transition */
    pointer-events: none;
    transition: opacity 1s ease, transform 1s ease;
}

/* We will fade this out when the user scrolls */
.intro-overlay.fade-out {
    opacity: 0;
    transform: translateY(-50px);
}

.scroll-hint {
    position: absolute;
    bottom: 8vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: monospace;
    font-size: 0.7rem;
    letter-spacing: 0.25rem;
    color: rgba(148, 163, 184, 0.85);
    text-transform: uppercase;
    opacity: 0;
    animation: scrollHintFade 1.8s ease-out 1.4s forwards;
}

.scroll-label {
    text-shadow: 0 0 8px rgba(15, 23, 42, 0.8);
}

.scroll-arrow {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, transparent, #00fff9);
    position: relative;
    overflow: hidden;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    width: 7px;
    height: 7px;
    border-left: 1px solid #00fff9;
    border-bottom: 1px solid #00fff9;
    transform: translateX(-50%) rotate(-45deg);
    animation: scrollArrowDown 1.2s ease-in-out infinite;
}

@keyframes scrollHintFade {
    0% { opacity: 0; transform: translate(-50%, 10px); }
    100% { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes scrollArrowDown {
    0% { transform: translate(-50%, -2px) rotate(-45deg); opacity: 0.1; }
    50% { transform: translate(-50%, 10px) rotate(-45deg); opacity: 1; }
    100% { transform: translate(-50%, 22px) rotate(-45deg); opacity: 0; }
}

.glitch-title {
    font-size: clamp(4rem, 9vw, 7rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5rem;
    position: relative;
    text-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
    background: none;
    -webkit-text-fill-color: #fff;
    margin-bottom: 0;
    animation: entranceDrop 1.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.subtitle {
    font-size: 1.2rem;
    letter-spacing: 0.8rem;
    color: #4f46e5;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0;
    animation: fadeInSlideUp 1s ease 1.1s forwards;
}

/* Glitch pseudo elements */
.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.glitch-title::before {
    left: 3px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch-title::after {
    left: -3px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes entranceDrop {
    0% { transform: scale(1.5) translateY(-50px); opacity: 0; filter: blur(20px); }
    100% { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); }
}

@keyframes fadeInSlideUp {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; text-shadow: 0 0 10px rgba(79, 70, 229, 0.8); }
}

@keyframes glitch-anim {
    0% { clip: rect(62px, 9999px, 87px, 0); }
    5% { clip: rect(29px, 9999px, 14px, 0); }
    10% { clip: rect(8px, 9999px, 11px, 0); }
    15% { clip: rect(15px, 9999px, 49px, 0); transform: translateX(-2px); }
    16% { transform: translateX(0); }
    100% { clip: rect(98px, 9999px, 12px, 0); }
}
@keyframes glitch-anim2 {
    0% { clip: rect(12px, 9999px, 34px, 0); }
    5% { clip: rect(45px, 9999px, 88px, 0); }
    10% { clip: rect(87px, 9999px, 99px, 0); }
    15% { clip: rect(9px, 9999px, 23px, 0); transform: translateX(2px); }
    16% { transform: translateX(0); }
    100% { clip: rect(65px, 9999px, 98px, 0); }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-primary);
}

/* =========================================
   SCI-FI DATA PANELS & CARDS
========================================= */

.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(0, 255, 249, 0.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 255, 249, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.cyber-panel {
    background: rgba(10, 10, 25, 0.7);
    border: 1px solid rgba(0, 255, 249, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 249, 0.4),
                inset 0 0 10px rgba(0, 255, 249, 0.2);
    color: #e0e0e0;
    position: relative;
    padding: 0;
}

/* ========================================= */
/* ORBITAL ELEMENTS (TLE) STYLES */
/* ========================================= */

.tle-section {
    margin-bottom: 30px;
    width: 100%;
}

.tle-panel {
    display: flex;
    flex-direction: column;
}

.tle-data-container {
    padding: 15px;
    border: 1px solid rgba(0, 255, 170, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.tle-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tle-card pre {
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.4;
    letter-spacing: 1px;
}

.tle-copy-btn {
    background: rgba(0, 255, 170, 0.1);
    color: #00ffaa;
    border: 1px solid #00ffaa;
    transition: all 0.2s;
}

.tle-copy-btn:hover {
    background: rgba(0, 255, 170, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 170, 0.4);
    cursor: pointer;
}

.cyber-panel:hover {
    border-left-color: #ff00c1;
    box-shadow: 0 0 30px rgba(255, 0, 193, 0.2), inset 0 0 20px rgba(255, 0, 193, 0.05);
}

.cyber-panel::before {
    background: linear-gradient(135deg, transparent 50%, rgba(0, 255, 249, 0.5) 50%);
}
.cyber-panel:hover::before {
    background: linear-gradient(135deg, transparent 50%, rgba(255, 0, 193, 0.8) 50%);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 249, 0.2);
    padding: 1rem 2rem;
    background: rgba(0, 255, 249, 0.05);
}

.panel-id {
    font-family: monospace;
    color: #00fff9;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.panel-status {
    font-family: monospace;
    font-size: 0.8rem;
    padding: 2px 8px;
    border: 1px solid #00fff9;
    color: #00fff9;
    background: rgba(0, 255, 249, 0.1);
}

.panel-status.blink {
    animation: blinkText 1.5s infinite;
}

.panel-status.warning {
    color: #ff00c1;
    border-color: #ff00c1;
    background: rgba(255, 0, 193, 0.1);
}

.cyber-panel h1, .cyber-panel h2 {
    background: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 255, 249, 0.5);
    padding: 2rem 2rem 0.5rem 2rem;
    margin: 0;
}

.cyber-panel p {
    color: #a0a0b0;
    padding: 0 2rem 2rem 2rem;
    margin: 0;
}

/* Data components */
.panel-data-grid {
    display: flex;
    justify-content: space-between;
    padding: 0 2rem 2rem 2rem;
}

.data-box {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    width: 30%;
    position: relative;
    overflow: hidden;
}

.data-box::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 2px;
    background: #00fff9;
}

.data-box .label {
    font-family: monospace;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.data-box .value {
    font-size: 1.5rem;
    font-weight: 600;
}

.value.cyan { color: #00fff9; text-shadow: 0 0 10px rgba(0,255,249,0.5); }
.value.magenta { color: #ff00c1; text-shadow: 0 0 10px rgba(255,0,193,0.5); }

/* Buttons & Bars */
.panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-top: 1px solid rgba(0, 255, 249, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

.cyber-button {
    background: transparent;
    border: 1px solid #00fff9;
    color: #00fff9;
    padding: 0.8rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.cyber-button:hover {
    background: #00fff9;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 249, 0.6);
}

.data-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100px;
}

.data-bars .bar {
    height: 4px;
    background: #00fff9;
    box-shadow: 0 0 5px #00fff9;
}

.tech-list {
    list-style: none;
    padding: 0 2rem 2rem 2rem;
    font-family: monospace;
    color: #00fff9;
}

.tech-list li {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.tech-list .bullet {
    color: #ff00c1;
    margin-right: 10px;
}

/* Warning Panel Specifics */
.warning-panel {
    border-left-color: #ff00c1;
    box-shadow: 0 0 20px rgba(255, 0, 193, 0.1);
}

.warning-panel::before {
    background: linear-gradient(135deg, transparent 50%, rgba(255, 0, 193, 0.8) 50%);
}

.warning-panel h2 {
    color: #ff00c1;
    text-shadow: 0 0 10px rgba(255, 0, 193, 0.5);
}

.barcode {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -2px;
    color: #ff00c1;
    text-align: right;
    padding: 0 2rem 2rem 2rem;
    opacity: 0.5;
}

/* =========================================
   HYPER-DETAIL HUD ELEMENTS
========================================= */

.hud-top-right {
    position: fixed;
    top: 30px;
    right: 40px;
    text-align: right;
    font-family: monospace;
    color: #00fff9;
    z-index: 9997;
    opacity: 0.7;
}

.hud-bottom-left {
    position: fixed;
    bottom: 30px;
    left: 40px;
    font-family: monospace;
    color: #00fff9;
    z-index: 9997;
    opacity: 0.7;
}

.coords-display {
    font-size: 14px;
    letter-spacing: 1px;
}


/* Scanner Corners */
.scan-frame {
    position: fixed;
    width: 100px;
    height: 100px;
    border: 1px solid rgba(0, 255, 249, 0.1);
    z-index: 9996;
    pointer-events: none;
}

.frame-tl { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.frame-tr { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.frame-bl { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.frame-br { bottom: 20px; right: 20px; border-left: none; border-top: none; }

/* =========================================
   CYBER NAVIGATION BAR
========================================= */

.cyber-nav {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 10000;
    pointer-events: none;
}

.nav-container {
    background: rgba(10, 10, 25, 0.75);
    backdrop-filter: blur(15px);
    border-left: 3px solid #00fff9;
    border-bottom: 2px solid rgba(0, 255, 249, 0.3);
    border-top: 2px solid rgba(0, 255, 249, 0.3);
    border-right: 1px solid rgba(0, 255, 249, 0.1);
    border-radius: 0 15px 15px 0;
    padding: 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    box-shadow: 5px 0 20px rgba(0, 255, 249, 0.15);
}

.nav-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 3px; height: 100%;
    background: linear-gradient(180deg, transparent, #ff00c1, transparent);
    animation: navGlowVert 3s infinite linear;
}

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

.nav-item {
    text-decoration: none;
    color: #00fff9;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 2px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.6;
}

.nav-item span {
    color: rgba(0, 255, 249, 0.3);
    transition: 0.3s;
}

.nav-item:hover, .nav-item.active {
    color: #fff;
    opacity: 1;
    text-shadow: 0 0 10px #00fff9;
}

.nav-item:hover span, .nav-item.active span {
    color: #ff00c1;
    text-shadow: 0 0 10px rgba(255, 0, 193, 0.8);
}

/* =========================================
   EXPANDED DATA MODULES
========================================= */

.panel-sub-content {
    padding: 0 2rem 2rem 2rem;
}

.data-module {
    background: rgba(0, 255, 249, 0.03);
    border: 1px solid rgba(0, 255, 249, 0.1);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-title {
    font-family: monospace;
    font-size: 11px;
    color: #666;
}

.module-value {
    font-family: monospace;
    font-size: 12px;
    color: #00fff9;
}

.sub-analytics {
    padding: 0 2rem 2rem 2rem;
}

.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 40px;
    padding-top: 10px;
}

.chart-bar {
    width: 15px;
    background: #00fff9;
    opacity: 0.6;
    animation: barPulse 2s infinite ease-in-out;
}

@keyframes barPulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

.chart-bar:nth-child(2) { animation-delay: 0.2s; }
.chart-bar:nth-child(3) { animation-delay: 0.4s; }
.chart-bar:nth-child(4) { animation-delay: 0.6s; }
.chart-bar:nth-child(5) { animation-delay: 0.8s; }

/* =========================================
   CYBER FOOTER
========================================= */

.cyber-footer {
    border-top: 1px solid rgba(0, 255, 249, 0.1);
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: monospace;
    font-size: 11px;
}

.mission-status .label { color: #666; }
.mission-status .value { color: #00fff9; margin-left: 10px; }
.footer-credits { color: #444; }

.panel-footer-meta {
    padding: 0 2rem 2rem 2rem;
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 10px;
    color: #444;
}

.zen-btn {
    color: #ffd700 !important;
}

/* =========================================
   ZEN MODE STYLES
========================================= */

/* Hide UI elements smoothly */
body.zen-mode .hud-top-left,
body.zen-mode .hud-top-right,
body.zen-mode .hud-bottom-left,
body.zen-mode .hud-bottom-right,
body.zen-mode .live-console,
body.zen-mode .scan-frame,
body.zen-mode .cyber-nav,
body.zen-mode .content-container,
body.zen-mode .intro-overlay,
body.zen-mode .animation-scroll-track,
body.zen-mode .scanlines,
body.zen-mode .custom-cursor {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Base smooth UI transition for all these elements */
.hud-top-left, .hud-top-right, .hud-bottom-left, .hud-bottom-right,
.live-console, .scan-frame, .cyber-nav, .content-container,
.scanlines, .custom-cursor, .intro-overlay, .animation-scroll-track {
    transition: opacity 1s ease-in-out, transform 0.8s ease, width 0.2s, height 0.2s;
}

body.zen-mode {
    cursor: default; /* Show default cursor instead of custom so user isn't stuck cursorless */
}

/* ZEN Quote Styling */
.zen-quote-container {
    position: fixed;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(200, 200, 200, 0.9); /* Soft muted white */
    font-family: 'Times New Roman', Times, serif; /* Elegant serif */
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 3s ease-in-out; /* Slow elegant fade */
    width: 80%;
    max-width: 500px;
}

/* The quote becomes visible only if zen mode is active */
body.zen-mode .zen-quote-container.show-quote {
    opacity: 1;
}

.zen-quote-container p {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 1px;
    font-style: italic;
    color: inherit;
    margin-bottom: 0.5rem;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

.zen-author {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 20px;
}

.dream-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08); /* Barely visible border */
    color: rgba(255, 255, 255, 0.25); /* Very muted text */
    padding: 5px 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.6rem;
    letter-spacing: 2px;
    border-radius: 2px; /* Very sharp, professional corners */
    cursor: pointer;
    transition: all 0.8s ease; /* Even slower, more meditative transition */
    pointer-events: auto;
    text-transform: uppercase;
}

.dream-btn:hover {
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.dream-btn.active {
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
}

/* Exit Hint Styling */
.zen-exit-hint {
    position: fixed;
    top: 5vmin;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 3px;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.5s ease-in-out;
}

body.zen-mode .zen-exit-hint.show-hint {
    opacity: 1;
}

/* =========================================
   NASA APOD SECTION
========================================= */
.apod-panel {
    max-width: 900px;
    width: 90vw;
}

.apod-container {
    padding: 0 2rem 2rem 2rem;
    position: relative;
    min-height: 400px;
}

.apod-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 350px;
    border: 1px dashed rgba(0, 255, 249, 0.3);
    background: rgba(0, 255, 249, 0.05);
}

.apod-loading p {
    color: #00fff9;
    font-family: monospace;
    font-size: 0.9rem;
    letter-spacing: 2px;
    animation: blinkText 1.5s infinite;
    padding: 0;
    text-align: center;
}

.scanner-line {
    width: 100px;
    height: 2px;
    background: #00fff9;
    margin-bottom: 20px;
    box-shadow: 0 0 10px #00fff9;
    animation: scanPulse 1s ease-in-out infinite alternate;
}

@keyframes scanPulse {
    from { transform: scaleX(0.5); opacity: 0.5; }
    to { transform: scaleX(1.5); opacity: 1; }
}

/* =========================================
   PROGRESS BAR STYLES
========================================= */

.cyber-progress-container {
    width: 250px;
    height: 6px;
    background: rgba(0, 255, 249, 0.1);
    border: 1px solid rgba(0, 255, 249, 0.3);
    margin-top: 15px;
    position: relative;
    overflow: hidden;
}

.cyber-progress-bar {
    height: 100%;
    width: 0%; /* JS will control this */
    background: #00fff9;
    box-shadow: 0 0 10px #00fff9, 0 0 20px #00fff9;
    transition: width 0.2s ease-out;
    position: absolute;
    top: 0;
    left: 0;
}

/* Sci-fi angled stripes over the progress bar */
.cyber-progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.3) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.3) 75%,
        transparent 75%,
        transparent
    );
    background-size: 15px 15px;
    animation: progressStripes 1s linear infinite;
    z-index: 1;
}

@keyframes progressStripes {
    0% { background-position: 0 0; }
    100% { background-position: 15px 0; }
}

.apod-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 350px;
    border: 1px dashed rgba(255, 0, 193, 0.5);
    background: rgba(255, 0, 193, 0.05);
    text-align: center;
}

.apod-error .error-text {
    color: #ff00c1;
    font-family: monospace;
    margin-bottom: 20px;
    padding: 0;
}

.apod-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.apod-main-title {
    font-size: 2.5rem;
    color: #fff;
    text-transform: capitalize;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.apod-main-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #00fff9;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 2rem 0;
    opacity: 0.8;
}

.apod-picture-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #00fff9;
    margin-bottom: 8px; /* Precision spacing */
    text-align: center;
    text-transform: none;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(0, 255, 249, 0.3);
}

.apod-date {
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: #666e7a; /* Muted subtitle color */
    margin-bottom: 24px; /* Precision spacing: Date -> Content */
    letter-spacing: 2px;
}

.apod-media {
    width: 100%;
    max-width: 100%;
    border: 1px solid rgba(0, 255, 249, 0.2);
    background: #000;
    position: relative;
    cursor: crosshair;
    overflow: hidden;
}

/* HUD Overlay on Hover */
.apod-hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 255, 249, 0.05);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 5;
}

.apod-media:hover .apod-hud-overlay {
    opacity: 1;
}

.hud-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid #00fff9;
}

.hud-corner.tl { top: 20px; left: 20px; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 20px; right: 20px; border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: 20px; left: 20px; border-right: 0; border-top: 0; }
.hud-corner.br { bottom: 20px; right: 20px; border-left: 0; border-top: 0; }

.hud-scanline {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 255, 249, 0.5);
    box-shadow: 0 0 15px #00fff9;
    animation: hud-scan 4s linear infinite;
}

@keyframes hud-scan {
    0% { top: -2%; }
    100% { top: 102%; }
}

.hud-data-tag {
    position: absolute;
    bottom: 35px;
    left: 40px;
    font-family: monospace;
    font-size: 10px;
    color: #00fff9;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #00fff9;
}

.apod-media img {
    width: 100%;
    height: auto; /* Allow full length */
    display: block;
}

.apod-media iframe {
    width: 100%;
    height: 70vh;
}

.apod-info {
    width: 100%;
    max-width: 100%;
    padding: 4rem 2rem;
    background: rgba(5, 5, 15, 0.4);
}

.apod-article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.apod-explanation-content {
    margin-bottom: 32px; /* Content -> Divider */
}

.apod-explanation {
    font-size: 16px; /* Precision font size */
    line-height: 1.75; /* Precision line height */
    color: #b0b0c0; /* Soft light grey */
    text-align: left;
    margin-bottom: 16px; /* Paragraph spacing */
    font-weight: 300;
    letter-spacing: 0.2px;
}

.apod-credit-separator {
    width: 60px;
    height: 1px;
    background: rgba(0, 255, 249, 0.2);
    margin: 0 auto 12px auto; /* Precision spacing: Divider -> Credit */
}

.apod-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0;
}

.apod-credit {
    font-size: 0.75rem; /* Precision small font */
    color: #666e7a; /* Muted grey color */
    font-family: monospace;
    letter-spacing: 1px;
    text-align: center;
}

.apod-explanation::-webkit-scrollbar { width: 4px; }
.apod-explanation::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.apod-explanation::-webkit-scrollbar-thumb { background: rgba(0, 255, 249, 0.5); }

.zen-badge {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.7);
}

.zen-hint-panel p {
    padding-bottom: 0;
}

.zen-hint-actions {
    padding: 0 2rem 2rem 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.zen-hint-note {
    font-family: monospace;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: rgba(148, 163, 184, 0.85);
}

/* =========================================
   NASA NEO SECTION (Asteroid Monitor)
========================================= */
.neo-panel {
    max-width: 1100px;
    width: 95vw;
}

.neo-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0 2rem 1.5rem 2rem;
    align-items: flex-end;
    border-bottom: 1px solid rgba(0, 255, 249, 0.2);
    margin-bottom: 1.5rem;
}

.neo-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.neo-input-group label {
    font-family: monospace;
    font-size: 0.8rem;
    color: #666;
    letter-spacing: 1px;
}

.cyber-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 249, 0.3);
    color: #00fff9;
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 0.6rem;
    outline: none;
    transition: 0.3s;
    /* WebKit calendar icon defaults to black, invert it to match dark mode */
    color-scheme: dark;
}

/* Specific vendor prefixes to ensure calendar icon is visible */
.cyber-input::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(100) drop-shadow(0 0 8px rgba(0, 255, 249, 1)) drop-shadow(0 0 15px rgba(0, 255, 249, 0.8));
    cursor: pointer;
    opacity: 1; /* Forcing opacity to ensure the browser doesn't dull it out */
}

.cyber-input:focus {
    border-color: #ff00c1;
    box-shadow: 0 0 10px rgba(255, 0, 193, 0.2);
}

.neo-loading, .neo-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    margin: 0 2rem 2rem 2rem;
    text-align: center;
}

.neo-loading { border: 1px dashed rgba(0, 255, 249, 0.3); background: rgba(0, 255, 249, 0.05); }
.neo-error { border: 1px dashed rgba(255, 0, 193, 0.5); background: rgba(255, 0, 193, 0.05); }

.neo-loading p { color: #00fff9; font-family: monospace; font-size: 0.9rem; letter-spacing: 2px; animation: blinkText 1.5s infinite; }
.neo-error .error-text { color: #ff00c1; font-family: monospace; }

.neo-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.neo-stats {
    display: flex;
    gap: 2rem;
    padding: 0 2rem;
    margin-bottom: 2rem;
}

.neo-stat-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 249, 0.2);
    border-left: 3px solid #00fff9;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.neo-stat-box.warning-box {
    border-color: rgba(255, 0, 193, 0.2);
    border-left: 3px solid #ff00c1;
}

.neo-stat-box .label {
    font-family: monospace;
    font-size: 0.8rem;
    color: #a0a0b0;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.neo-stat-box .value {
    font-size: 2.5rem;
    font-weight: 800;
}

/* Charts */
.neo-charts {
    display: flex;
    gap: 2rem;
    padding: 0 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-family: monospace;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 10px;
}

#neo-activity-chart, #neo-ratio-chart {
    height: 80px; /* Increased height to accommodate labels */
    align-items: flex-end;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
    position: relative;
    padding-top: 20px;
}

/* Override existing mini-chart bar width for neo charts */
#neo-activity-chart .chart-bar, #neo-ratio-chart .chart-bar {
    width: 20px;
    min-height: 2px;
    transition: height 0.5s ease;
    animation: none; /* remove pulse */
    opacity: 0.8;
}

/* Chart Tooltips & Labels */
.chart-tooltip {
    font-family: monospace;
    font-size: 0.65rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: absolute;
    top: 0;
    opacity: 0;
    transition: 0.2s;
    pointer-events: none;
    z-index: 10;
}

.chart-bar:hover {
    opacity: 1;
    box-shadow: 0 0 10px currentColor;
}

.chart-bar:hover ~ .chart-tooltip,
.chart-tooltip:focus-within {
    opacity: 1; /* Normally we would target previous sibling, but CSS dictates tooltip must exist after hover element unless we structure creatively. Instead, we use a trick by hovering the wrapper */
}

/* Since our JS created a wrapper div that flexes column (tooltip, bar, label), hover the wrapper */
#neo-activity-chart > div:hover .chart-tooltip, #neo-ratio-chart > div:hover .chart-tooltip {
    opacity: 1;
    transform: translateY(-5px);
}

.chart-label {
    font-family: monospace;
    font-size: 0.6rem;
    color: #888;
    margin-top: 4px;
    text-align: center;
    transform: rotate(-30deg);
}

/* Section Divider / Boundaries */
.sector-boundary {
    width: 100%;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    pointer-events: none;
}

.boundary-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, #00fff9, transparent);
    box-shadow: 0 0 10px #00fff9;
}

.boundary-label {
    font-family: monospace;
    font-size: 10px;
    color: #444;
    letter-spacing: 4px;
    margin-top: 10px;
}

/* Grid Override for centering */
.neo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
    width: 100%;
    justify-content: center;
}

.sat-grid {
    display: grid;
    gap: 1.5rem;
    padding: 2rem 0;
    width: 100%;
}

/* Satellite Explorer grid: 3 / 2 / 1 columns */
@media (min-width: 1024px) {
    .sat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
    .sat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639.98px) {
    .sat-grid { grid-template-columns: 1fr; }
}

.sat-card {
    cursor: default;
}

.sat-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 1rem 0;
    font-family: monospace;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.sat-detail {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-family: monospace;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.sat-detail .lbl { color: #888; }
.sat-detail .val { color: #e0e0e0; }

.asteroid-card, .fireball-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    padding: 1.5rem;
    transition: 0.3s;
    overflow: hidden;
}

.asteroid-card::before, .fireball-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: #00fff9;
}

.asteroid-card.hazardous {
    border-color: rgba(255, 0, 193, 0.3);
}

.asteroid-card.hazardous::before, .fireball-card.high-energy::before, .sat-card::before {
    background: #ff00c1;
    box-shadow: 0 0 10px rgba(255, 0, 193, 0.5);
}

.asteroid-card:hover, .fireball-card:hover, .sat-card:hover {
    transform: translateY(-5px);
    background: rgba(10, 10, 25, 0.9);
    border-color: rgba(0, 255, 249, 0.5);
    box-shadow: 0 5px 15px rgba(0, 255, 249, 0.1);
}

.asteroid-card.hazardous:hover, .fireball-card.high-energy:hover, .sat-card:hover, .osdr-card:hover {
    border-color: #ff00c1;
    box-shadow: 0 5px 15px rgba(255, 0, 193, 0.2);
}

.sat-card, .osdr-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    padding: 1.5rem;
    transition: 0.3s;
    overflow: hidden;
    cursor: default;
}

.sat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: #ff00c1;
}

.osdr-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: #a855f7; /* Purple for biological/science research */
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    background: none;
    border: none;
    color: #ff00c1;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 2rem;
}

.tle-container {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 249, 0.2);
    padding: 1rem;
    margin: 1.5rem 0;
    position: relative;
}

.tle-line-header {
    font-family: monospace;
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.tle-text {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #00fff9;
    margin: 0.2rem 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.sat-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.sat-field {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sat-field .lbl { font-size: 0.7rem; color: #666; display: block; margin-bottom: 5px; }
.sat-field .val { font-size: 1rem; color: #fff; font-family: monospace; }


.asteroid-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 1rem 0;
    font-family: monospace;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.asteroid-detail {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.asteroid-detail .lbl { color: #888; }
.asteroid-detail .val { color: #e0e0e0; }
.val.highlight { color: #00fff9; }

/* Badges */
.badge, .cad-badge {
    display: inline-block;
    padding: 2px 8px;
    font-family: monospace;
    font-size: 0.7rem;
    margin-top: 10px;
    border: 1px solid;
    letter-spacing: 1px;
}

.cad-badge {
    margin-top: 0;
    font-size: 0.6rem;
}

/* Hazard Colors */
.hazard { color: #ff00c1; border-color: #ff00c1; background: rgba(255, 0, 193, 0.1); }
.caution { color: #facc15; border-color: #facc15; background: rgba(250, 204, 21, 0.1); }
.safe { color: #00ffaa; border-color: #00ffaa; background: rgba(0, 255, 170, 0.1); }

/* CAD Grid & Cards */
.cad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.cad-card {
    background: rgba(10, 10, 25, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    position: relative;
    transition: 0.3s;
    overflow: hidden;
}

.cad-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 249, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 0.8rem;
}

.cad-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.cad-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cad-stat {
    display: flex;
    flex-direction: column;
}

.cad-stat .lbl { font-size: 0.65rem; color: #666; letter-spacing: 1px; }
.cad-stat .val { font-family: monospace; font-size: 0.95rem; color: #fff; }

/* CAD Distance Visual */
.cad-visual {
    height: 45px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 15px;
    margin-bottom: 1.5rem;
}

.earth-point {
    width: 14px;
    height: 14px;
    background: #4f46e5;
    border-radius: 50%;
    box-shadow: 0 0 15px #4f46e5, 0 0 30px #4f46e5;
    z-index: 2;
    position: relative;
}

.earth-point::after {
    content: 'EARTH';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    color: #4f46e5;
    font-family: monospace;
    letter-spacing: 1px;
}

.distance-line {
    flex-grow: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 10px;
    position: relative;
    border-radius: 2px;
}

.moon-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #888;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 5px rgba(255,255,255,0.2);
}

.moon-marker::after {
    content: 'MOON';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.5rem;
    color: #888;
    font-family: monospace;
}

.asteroid-point {
    position: absolute;
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 15px currentColor;
    animation: pulse 2s infinite;
}

.cad-footer-meta {
    font-family: monospace;
    font-size: 0.65rem;
    color: #444;
    letter-spacing: 1px;
    text-align: right;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.5rem;
}

/* Enhanced CAD Legend */
.cad-legend-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 249, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-title {
    font-size: 0.65rem;
    color: #00fff9;
    letter-spacing: 2px;
    font-family: monospace;
    border-bottom: 1px solid rgba(0, 255, 249, 0.2);
    padding-bottom: 4px;
    margin-bottom: 4px;
}

.cad-legend {
    display: flex;
    gap: 1.5rem;
    font-family: monospace;
    font-size: 0.75rem;
    color: #ccc;
}

.legend-helper {
    font-size: 0.65rem;
    color: #666;
    font-family: monospace;
    text-align: right;
    margin-top: 4px;
}

.legend-item { display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff00c1; box-shadow: 0 0 8px #ff00c1; }
.dot.yellow { background: #facc15; box-shadow: 0 0 8px #facc15; }
.dot.green { background: #00ffaa; box-shadow: 0 0 8px #00ffaa; }

/* ========================================= */
/* CNEOS SENTRY IMPACT RISK STYLES (HAZARD)  */
/* ========================================= */

.sentry-section {
    margin-bottom: 30px;
    width: 100%;
}

.hazard-panel {
    border: 1px solid rgba(255, 60, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 60, 0, 0.2), inset 0 0 10px rgba(255, 60, 0, 0.1);
}

.hazard-panel::before {
    background: linear-gradient(135deg, transparent 50%, rgba(255, 60, 0, 0.8) 50%);
}

.hazard-header {
    border-bottom: 1px solid rgba(255, 60, 0, 0.3);
    background: rgba(255, 60, 0, 0.05);
}

.hazard-text {
    color: #ff3c00;
}

.hazard-line {
    background: #ff3c00;
    box-shadow: 0 0 10px #ff3c00;
}

.hazard-btn {
    border-color: #ff3c00;
    color: #ff3c00;
}
.hazard-btn:hover {
    background: rgba(255, 60, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 60, 0, 0.6);
}

.hazard-input {
    border-bottom: 1px solid #ff3c00;
    color: #fff;
}
.hazard-input:focus {
    border-color: #ffb703;
    background: rgba(255, 183, 3, 0.1);
}

.hazard-loading .scanner-line {
    background: linear-gradient(to right, transparent, rgba(255, 60, 0, 0.8), transparent);
}
.hazard-loading .cyber-progress-bar {
    background: #ff3c00;
    box-shadow: 0 0 10px #ff3c00;
}

.hazard-error {
    border-color: #ff3c00;
}

.sentry-list-container {
    width: 100%;
    overflow-x: auto;
}

.sentry-table, .sentry-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    font-family: inherit;
}

.sentry-table th, .sentry-detail-table th {
    background: rgba(255, 60, 0, 0.15);
    color: #ffb703;
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 60, 0, 0.4);
    font-weight: 600;
    letter-spacing: 1px;
    font-family: 'Rajdhani', sans-serif;
}

.sentry-table td, .sentry-detail-table td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.sentry-table tbody tr:hover, .sentry-detail-table tbody tr:hover {
    background: rgba(255, 60, 0, 0.1);
}

/* ========================================= */
/* NASA DONKI SPACE WEATHER STYLES           */
/* ========================================= */

.donki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.donki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 900px) {
    .content-container {
        padding-left: 120px; /* Offset the main wrapper by the width of the new sidebar */
    }
}

@media (max-width: 900px) {
    .cyber-nav {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        transform: translateY(0);
        padding: 0;
    }
    
    .nav-container {
        flex-direction: row;
        border-radius: 15px 15px 0 0;
        border-left: 1px solid rgba(0, 255, 249, 0.1);
        border-right: 1px solid rgba(0, 255, 249, 0.1);
        border-bottom: none;
        border-top: 3px solid #00fff9;
        padding: 15px 10px;
        gap: 15px;
        justify-content: space-around;
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-container::before {
        width: 100%; height: 3px;
        background: linear-gradient(90deg, transparent, #ff00c1, transparent);
        animation: navGlowHoriz 3s infinite linear;
    }
    
    .nav-item {
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .content-container {
        padding-bottom: 80px; /* Space for bottom dock */
    }
}

@keyframes navGlowHoriz {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
