:root {
    --text-primary: #e0f7fa;
    --glass-bg: rgba(4, 12, 24, 0.4);
    --glass-border: rgba(0, 229, 255, 0.2);
    --aurora-1: #00e5ff;
    --aurora-2: #2979ff;
    --aurora-3: #651fff;
    --frost: #b3e5fc;
    --warning: #ff1744;
}

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

body {
    background-color: #010204; color: var(--text-primary);
    font-family: 'Courier New', Courier, monospace; overflow-x: hidden;
    padding-bottom: 32px;
}
/* overflow:hidden alone blocks page scroll (it propagates to the viewport)
   without pinning body's box to 100vh — pinning the height here was what
   broke ScrollTrigger's page-height measurement on load. */
body.boot-lock { overflow: hidden; }

/* ============================================================
   BOOT SEQUENCE
   ============================================================ */
#boot-sequence {
    position: fixed; inset: 0; z-index: 20000;
    background: #010204;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
#boot-sequence.boot-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-inner { width: min(480px, 86vw); }
.boot-logo { font-size: 0.9rem; letter-spacing: 5px; color: var(--aurora-1); text-align: center; margin-bottom: 36px; }
.boot-lines { font-size: 0.68rem; letter-spacing: 1px; color: #5c7891; line-height: 2.1; min-height: 168px; margin-bottom: 22px; }
.boot-line-done { color: rgba(0, 229, 255, 0.7); }
.boot-line-ok { float: right; color: var(--aurora-1); }
.boot-progress-track { height: 3px; background: rgba(255,255,255,0.08); margin-bottom: 10px; }
.boot-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--aurora-2), var(--aurora-1)); box-shadow: 0 0 10px var(--aurora-1); transition: width 0.2s linear; }
.boot-percent { text-align: right; font-size: 0.65rem; letter-spacing: 2px; color: var(--aurora-1); }

/* ============================================================
   CINEMATIC FLASH OVERLAY
   ============================================================ */
#flash-overlay {
    position: fixed; inset: 0; z-index: 15000;
    background: var(--warning); opacity: 0;
    pointer-events: none; mix-blend-mode: screen;
}

/* ============================================================
   SPEED VIGNETTE — intensifies with scroll velocity & depth
   ============================================================ */
#speed-vignette {
    position: fixed; inset: 0; z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease-out;
    background:
        radial-gradient(circle at 50% 50%, transparent 30%, rgba(255, 20, 60, 0.10) 55%, transparent 72%),
        radial-gradient(circle at 50% 50%, transparent 34%, rgba(0, 8, 20, 0.65) 100%);
}

/* ============================================================
   SCREEN CRACK OVERLAY — grows as the page is scrolled
   ============================================================ */
#crack-overlay {
    position: fixed; inset: 0; width: 100vw; height: 100vh;
    z-index: 40; pointer-events: none;
}
.crack-path {
    fill: none; stroke: rgba(0, 229, 255, 0.5); stroke-width: 1.6;
    filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.55));
}
.crack-path.warn {
    stroke: rgba(255, 23, 68, 0.55);
    filter: drop-shadow(0 0 5px rgba(255, 23, 68, 0.55));
}

/* ============================================================
   GLITCH TRANSITION — fires briefly when crossing into a new section
   ============================================================ */
#glitch-transition {
    position: fixed; inset: 0; z-index: 14000; pointer-events: none;
    opacity: 0;
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.16), transparent 40%, rgba(255, 23, 68, 0.16) 60%, transparent);
    mix-blend-mode: screen;
}
#glitch-transition.glitching { animation: glitchTransitionAnim 0.4s steps(2, end); }
@keyframes glitchTransitionAnim {
    0%   { opacity: 0.85; transform: translateX(-14px) scaleY(1.02); clip-path: inset(10% 0 60% 0); }
    20%  { opacity: 0.6;  transform: translateX(11px)  scaleY(0.98); clip-path: inset(52% 0 4% 0); }
    40%  { opacity: 0.75; transform: translateX(-7px);               clip-path: inset(20% 0 42% 0); }
    60%  { opacity: 0.4;  transform: translateX(9px);                clip-path: inset(72% 0 4% 0); }
    80%  { opacity: 0.5;  transform: translateX(-4px);               clip-path: inset(4% 0 82% 0); }
    100% { opacity: 0;    transform: translateX(0);                  clip-path: inset(0 0 0 0); }
}

/* ============================================================
   ALERT TOASTS
   ============================================================ */
#alert-toast-container {
    position: fixed; top: 100px; right: 20px; z-index: 5000;
    display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
}
.alert-toast {
    background: rgba(1, 2, 4, 0.92);
    border: 1px solid var(--warning);
    border-left: 4px solid var(--warning);
    box-shadow: 0 0 25px rgba(255, 23, 68, 0.25);
    padding: 12px 18px;
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    color: var(--warning);
    max-width: 300px;
    animation: toastIn 0.4s ease-out, toastOut 0.5s ease-in 2.8s forwards;
}
.alert-toast .toast-tag {
    display: block; font-size: 0.58rem; letter-spacing: 2px;
    color: rgba(255,255,255,0.5); margin-bottom: 4px;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(60px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(60px); }
}

/* ============================================================
   FLOATING PARALLAX SHARDS
   ============================================================ */
.parallax-shard {
    position: absolute;
    width: 46px; height: 46px;
    pointer-events: none;
    opacity: 0.22;
    z-index: 0;
}
.parallax-shard svg { width: 100%; height: 100%; }
.parallax-shard polygon {
    fill: rgba(0, 229, 255, 0.06);
    stroke: rgba(0, 229, 255, 0.5);
    stroke-width: 1;
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.4));
}
.shard-a { top: 12%; left: 6%; width: 60px; height: 60px; }
.shard-b { top: 65%; right: 8%; width: 38px; height: 38px; }
.shard-c { top: 20%; right: 12%; width: 50px; height: 50px; }
.shard-d { bottom: 10%; left: 10%; width: 44px; height: 44px; }

/* ============================================================
   CURSOR ICE TRAIL
   ============================================================ */
.ice-trail-shard {
    position: fixed; top: 0; left: 0; width: 5px; height: 5px;
    background: rgba(180, 235, 255, 0.85);
    box-shadow: 0 0 8px 2px rgba(0, 229, 255, 0.6);
    border-radius: 1px;
    pointer-events: none; z-index: 9998;
    animation: shardFade 0.7s ease-out forwards;
}
@keyframes shardFade {
    0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(1) rotate(var(--r, 0deg)); }
    100% { opacity: 0; transform: translate(-50%, calc(-50% + 16px)) scale(0.2) rotate(var(--r, 0deg)); }
}

#cursor {
    position: fixed; top: 0; left: 0; width: 4px; height: 4px;
    background: #fff; border-radius: 50%; pointer-events: none;
    transform: translate(-50%, -50%); z-index: 10001; box-shadow: 0 0 12px 3px var(--aurora-1);
}
#cursor-aura {
    position: fixed; top: 0; left: 0; width: 30px; height: 30px;
    border: 1px solid rgba(0, 229, 255, 0.5); pointer-events: none;
    transform: translate(-50%, -50%) rotate(45deg); z-index: 10000;
    transition: width 0.2s, height 0.2s, border-color 0.2s, background-color 0.2s;
}

.scanline {
    width: 100vw; height: 100vh; position: fixed; top: 0; left: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 229, 255, 0.05) 51%);
    background-size: 100% 4px; z-index: 999; pointer-events: none; opacity: 0.6;
}
.static-noise {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 998;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.03; pointer-events: none; mix-blend-mode: overlay;
}

.hud {
    position: fixed; top: 50vh; transform: translateY(-50%); font-size: 0.75rem; letter-spacing: 2px;
    color: rgba(0, 229, 255, 0.6); z-index: 1000; pointer-events: none; display: flex; flex-direction: column; gap: 15px;
    background: rgba(1, 2, 4, 0.4); padding: 15px; backdrop-filter: blur(4px); border: 1px solid var(--glass-border);
}
.hud-left { left: 20px; border-left: 2px solid var(--aurora-1); }
.hud-right { right: 20px; text-align: right; border-right: 2px solid var(--aurora-1); }
.hud-o2 { color: var(--warning); animation: flickerBar 2.5s ease-in-out infinite; }

.signal-row { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.signal-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; margin-left: 4px; }
.bar-b { width: 3px; border-radius: 1px; background: rgba(255,255,255,0.08); }
.bar-b:nth-child(1) { height: 25%; }
.bar-b:nth-child(2) { height: 45%; }
.bar-b:nth-child(3) { height: 65%; }
.bar-b:nth-child(4) { height: 83%; }
.bar-b:nth-child(5) { height: 100%; }
.bar-b.active { background: var(--aurora-1); box-shadow: 0 0 4px var(--aurora-1); }
.bar-b.warn { background: orange; box-shadow: 0 0 4px orange; animation: flickerBar 0.9s infinite; }
.bar-b.dead { background: rgba(255,255,255,0.05); }

.hud-radar { width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--aurora-1); position: relative; overflow: hidden; margin-top: 10px; background: rgba(0,229,255,0.05); }
.radar-sweep { width: 50%; height: 50%; background: conic-gradient(from 0deg, transparent 70%, rgba(0, 229, 255, 0.8) 100%); position: absolute; top: 0; left: 50%; transform-origin: bottom left; animation: radarSpin 2s linear infinite; }
@keyframes radarSpin { 100% { transform: rotate(360deg); } }
.radar-dot { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--aurora-1); box-shadow: 0 0 8px var(--aurora-1); transform: translate(-50%, -50%); animation: dotFade 3s ease-in-out infinite; }
.blip-warn { background: var(--warning) !important; box-shadow: 0 0 8px var(--warning) !important; animation: dotFade 1.2s ease-in-out infinite !important; }
@keyframes dotFade { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }

/* ============================================================
   SCROLL RAIL NAVIGATION
   ============================================================ */
.scroll-rail {
    position: fixed; top: 50%; right: 26px; transform: translateY(-50%);
    z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.scroll-rail::before {
    content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(0, 229, 255, 0.25), transparent);
    transform: translateX(-50%); z-index: -1;
}
.rail-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(0, 229, 255, 0.25); border: 1px solid rgba(0, 229, 255, 0.4);
    cursor: pointer; position: relative;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.rail-dot:hover { transform: scale(1.4); }
.rail-dot.active { background: var(--aurora-1); box-shadow: 0 0 12px var(--aurora-1); transform: scale(1.5); }
.rail-tooltip {
    position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
    font-size: 0.58rem; letter-spacing: 2px; color: var(--aurora-1);
    background: rgba(1, 2, 4, 0.9); border: 1px solid rgba(0, 229, 255, 0.25);
    padding: 4px 10px; white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity 0.25s;
}
.rail-dot:hover .rail-tooltip { opacity: 1; }

.hud-glitch, .glitch-text { animation: glitchSkew 3s infinite linear alternate-reverse; position: relative; }
@keyframes glitchSkew {
    0%, 20%, 100% { transform: skew(0deg); text-shadow: 0 0 5px var(--aurora-1); }
    10% { transform: skew(-15deg); text-shadow: -2px 0 var(--warning); }
    15% { transform: skew(15deg); text-shadow: 2px 0 var(--aurora-2); }
}
.glitch-hover:hover { animation: glitchSkew 0.2s infinite; color: white; }
.glitch-bar { animation: flickerBar 0.5s infinite; }
@keyframes flickerBar { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }

.aurora-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -4;
    background: linear-gradient(140deg, var(--aurora-1), var(--aurora-2), var(--aurora-3), #010204);
    background-size: 400% 400%; animation: auroraAnim 20s infinite ease-in-out alternate;
    opacity: 0.15; filter: blur(90px);
}
@keyframes auroraAnim { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
.frost-vignette { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; box-shadow: inset 0 0 250px rgba(1, 2, 4, 1), inset 0 0 80px rgba(0, 229, 255, 0.15); }
#three-canvas, #snow-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; }
#three-canvas { z-index: -3; }
#snow-canvas { z-index: -2; pointer-events: none; opacity: 0.8; }

.glass-nav {
    position: fixed; top: 0; width: 100%; padding: 25px 5vw; display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(to bottom, rgba(1,2,4,0.95), transparent); z-index: 100; border-bottom: 1px solid rgba(0,229,255,0.1);
}
.logo { font-size: 1.2rem; font-weight: bold; letter-spacing: 6px; }
.nav-links span { font-size: 0.8rem; letter-spacing: 3px; margin-left: 25px; opacity: 0.6; transition: 0.3s; pointer-events: auto; }
.nav-links span:hover { opacity: 1; color: var(--aurora-1); text-shadow: 0 0 15px var(--aurora-1); }

.glow-text { text-shadow: 0 0 20px rgba(0, 229, 255, 0.8); }
.frost-text { background: linear-gradient(180deg, #fff 0%, var(--frost) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.aurora-text { color: var(--aurora-1); }
.console-text { font-size: 0.9rem; border-left: 3px solid var(--aurora-1); padding: 15px; background: rgba(0, 229, 255, 0.05); backdrop-filter: blur(5px); }
.text-sm { font-size: 0.75rem; }
.warning-text { color: var(--warning) !important; text-shadow: 0 0 15px rgba(255, 23, 68, 0.6); }
.mb-40 { margin-bottom: 40px; } .mt-20 { margin-top: 20px; }
section { min-height: 100vh; padding: 150px 5vw; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }

.section-tag {
    position: absolute;
    top: 40px; left: 5vw;
    font-size: 0.6rem;
    letter-spacing: 4px;
    color: rgba(0, 229, 255, 0.35);
    border-left: 2px solid rgba(0, 229, 255, 0.35);
    padding-left: 10px;
    pointer-events: none;
}

.section-intro {
    max-width: 680px;
    margin: -20px auto 40px auto;
    color: #90a4b8;
    font-size: 0.88rem;
    line-height: 1.85;
    letter-spacing: 0.3px;
}

#hero { align-items: center; text-align: center; }
.target-reticle { width: 150px; height: 150px; margin: 0 auto 30px auto; animation: spinSlow 20s linear infinite; }
.spin-reverse { animation: spinSlowReverse 10s linear infinite; transform-origin: center; }
@keyframes spinSlow { 100% { transform: rotate(360deg); } }
@keyframes spinSlowReverse { 100% { transform: rotate(-360deg); } }
.subtitle { letter-spacing: 8px; color: var(--aurora-1); font-size: 0.85rem; font-weight: bold; }
.hero-content h1 { font-size: clamp(3rem, 8vw, 8rem); font-weight: 900; letter-spacing: clamp(4px, 2vw, 20px); margin-bottom: 30px; line-height: 1.1; }
.scroll-indicator { position: absolute; bottom: 40px; display: flex; flex-direction: column; align-items: center; font-size: 0.75rem; letter-spacing: 5px; color: rgba(255,255,255,0.6); }
.scroll-indicator .line { width: 2px; height: 60px; background: linear-gradient(to bottom, var(--aurora-1), transparent); margin-top: 15px; animation: dropDown 2s infinite cubic-bezier(0.65, 0, 0.35, 1); }
@keyframes dropDown { 0% { transform: translateY(-15px) scaleY(0); opacity: 0; } 50% { opacity: 1; transform: translateY(0) scaleY(1); } 100% { transform: translateY(15px) scaleY(0); opacity: 0; } }

.card-container { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; perspective: 1200px; }
.glass-card { background: var(--glass-bg); backdrop-filter: blur(15px); border: 1px solid var(--glass-border); border-top: 2px solid var(--aurora-1); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(0, 229, 255, 0.08); padding: 40px 30px; width: calc(33.333% - 40px); min-width: 300px; color: white; position: relative; overflow: hidden; }
.glass-card::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%); opacity: 0; transition: opacity 0.5s; pointer-events: none; }
.glass-card:hover::before { opacity: 1; }
.card-icon { width: 50px; height: 50px; margin-bottom: 25px; color: var(--aurora-1); filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.8)); }
.glass-card h3 { font-size: 1.4rem; letter-spacing: 3px; text-transform: uppercase; }
.card-divider { border: none; border-top: 1px dashed rgba(0, 229, 255, 0.5); margin: 20px 0; }
.glass-card p { line-height: 1.7; color: #a5b1c2; font-size: 0.95rem; }

.card-extra {
    max-height: 0; opacity: 0; overflow: hidden;
    font-size: 0.78rem; line-height: 1.7; color: #7a96b0;
    font-style: italic; border-top: 1px dashed rgba(0, 229, 255, 0.2);
    transition: max-height 0.5s ease, opacity 0.4s ease, margin-top 0.5s ease, padding-top 0.5s ease;
}
.glass-card:hover .card-extra { max-height: 140px; opacity: 1; margin-top: 16px; padding-top: 14px; }

.field-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
    max-width: 900px;
    margin: 60px auto 0 auto;
    padding-top: 40px;
    border-top: 1px dashed rgba(0, 229, 255, 0.15);
}
.field-stat-item { text-align: center; min-width: 130px; }
.field-stat-num { font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 900; letter-spacing: 1px; margin-bottom: 8px; }
.field-stat-label { font-size: 0.62rem; letter-spacing: 2.5px; color: rgba(255,255,255,0.4); }

.timeline-content { max-width: 900px; margin: 0 auto; width: 100%; }
.chart-wrapper { display: flex; height: 350px; background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 30px; backdrop-filter: blur(10px); position: relative; overflow: hidden; }
.chart-wrapper::after { content: ''; position: absolute; top:0; left:0; width: 100%; height: 100%; background: repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(0,229,255,0.1) 20px); pointer-events: none; }
.chart-y-axis { display: flex; flex-direction: column; justify-content: space-between; padding-right: 20px; border-right: 1px solid var(--glass-border); color: #a5b1c2; font-size: 0.75rem; letter-spacing: 1px; }
.bar-chart { display: flex; justify-content: space-around; align-items: flex-end; flex-grow: 1; padding-left: 20px; height: 100%; }
.bar-container { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; width: 40px; gap: 15px; z-index: 2; }
.bar { width: 100%; background: linear-gradient(to top, var(--aurora-2), var(--aurora-1)); box-shadow: 0 0 15px var(--aurora-1); border-radius: 2px 2px 0 0; height: 0%; transition: height 1.5s cubic-bezier(0.16, 1, 0.3, 1); }
.warning-bar { background: linear-gradient(to top, darkred, var(--warning)); box-shadow: 0 0 15px var(--warning); }
.bar-label { font-size: 0.75rem; letter-spacing: 2px; color: #fff; transform: rotate(-45deg); margin-top: 10px; }

.telemetry-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 24px;
}
.tstat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-top: 2px solid rgba(0, 229, 255, 0.3);
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(8px);
}
.tstat-val { font-size: 1.6rem; font-weight: 900; margin-bottom: 8px; }
.tstat-label { font-size: 0.6rem; letter-spacing: 2px; color: rgba(255,255,255,0.4); }

.entities-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 40px; padding-bottom: 18px; border-bottom: 1px solid rgba(0, 229, 255, 0.2); }
.entities-heading h2 { margin: 5px 0 0; }
.entity-kicker, .archive-clearance, .catalogue-header { color: rgba(179, 229, 252, 0.55); font-size: 0.59rem; letter-spacing: 2.5px; }
.archive-clearance { color: var(--warning); border: 1px solid rgba(255, 23, 68, 0.35); padding: 8px 11px; white-space: nowrap; }
.archive-clearance span { display: inline-block; width: 5px; height: 5px; margin: 0 7px 1px 0; background: var(--warning); box-shadow: 0 0 8px var(--warning); animation: flickerBar 1.25s infinite; }
#entities .section-intro { margin-bottom: 34px; }
.entity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.entity-card { background: linear-gradient(145deg, rgba(7, 25, 38, 0.88), rgba(0, 3, 9, 0.88)); border: 1px solid rgba(0, 229, 255, 0.23); padding: 14px; position: relative; overflow: hidden; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32), inset 0 0 32px rgba(0, 229, 255, 0.035); transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease; }
.entity-card::after { content: ''; position: absolute; width: 100px; height: 1px; right: -30px; top: 0; background: var(--aurora-1); box-shadow: 0 0 12px var(--aurora-1); transform: rotate(45deg); opacity: 0.8; }
.entity-card:hover { transform: translateY(-7px); border-color: rgba(0, 229, 255, 0.72); box-shadow: 0 26px 52px rgba(0, 0, 0, 0.5), 0 0 26px rgba(0, 229, 255, 0.12); }
.entity-card-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; color: rgba(179, 229, 252, 0.55); font-size: 0.58rem; letter-spacing: 2px; }
.entity-live { color: var(--aurora-1); font-size: 0.54rem; }
.entity-card-alert .entity-live { color: var(--warning); }
.entity-img { width: 100%; height: 210px; background: radial-gradient(circle at 73% 20%, rgba(0, 229, 255, 0.13), transparent 28%), #00070d; border: 1px solid rgba(0, 229, 255, 0.5); margin-bottom: 17px; position: relative; overflow: hidden; }
.entity-img::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(0, 229, 255, 0.16) 1px, transparent 1px), linear-gradient(rgba(0, 229, 255, 0.12) 1px, transparent 1px); background-size: 25px 25px; mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent); }
.entity-image-label { position: absolute; z-index: 3; top: 10px; left: 10px; color: rgba(225, 247, 250, 0.58); font-size: 0.5rem; letter-spacing: 1.6px; }
.entity-svg-draw { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; filter: drop-shadow(0 0 5px rgba(0,229,255,0.35)); }
.glitch-img::before { content:''; position: absolute; z-index: 1; top:0; left:0; width:100%; height:100%; background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,229,255,0.12) 10px, rgba(0,229,255,0.12) 20px); animation: moveStripe 2s linear infinite; }
.alt-glitch { border-color: rgba(255, 23, 68, 0.5); background: radial-gradient(circle at 26% 24%, rgba(255, 23, 68, 0.14), transparent 32%), #0b0207; }
.alt-glitch::before { background: repeating-linear-gradient(-45deg, transparent, transparent 10px, rgba(255,23,68,0.14) 10px, rgba(255,23,68,0.14) 20px); }
@keyframes moveStripe { 100% { background-position: 50px 50px; } }
.entity-card h4 { font-size: 1rem; letter-spacing: 1.8px; margin: 0 0 12px; text-transform: uppercase; }
.entity-card .console-text { min-height: 74px; padding: 11px 12px; line-height: 1.65; border-left-width: 2px; background: rgba(0, 229, 255, 0.035); }
.entity-readings { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; padding: 10px 2px 0; border-top: 1px solid rgba(0, 229, 255, 0.14); color: rgba(179, 229, 252, 0.48); font-size: 0.52rem; letter-spacing: 1px; }
.entity-readings b { display: block; margin-top: 4px; color: var(--aurora-1); font-size: 0.6rem; letter-spacing: 1.2px; }
.entity-readings-alert { border-color: rgba(255, 23, 68, 0.16); }
.entity-readings-alert b { color: var(--warning); }

.catalogue-wrap { margin-top: 24px; border: 1px solid rgba(0, 229, 255, 0.16); background: rgba(0, 229, 255, 0.025); }
.catalogue-header { display: flex; justify-content: space-between; gap: 15px; padding: 12px 15px; border-bottom: 1px solid rgba(0, 229, 255, 0.14); }
.catalogue-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(0, 229, 255, 0.09); }
.catalogue-item {
    font-size: 0.58rem;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.45);
    background: rgba(3, 12, 21, 0.92);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background 0.25s ease;
}
.catalogue-item:hover { background: rgba(0, 229, 255, 0.1); }

.data-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; font-size: 0.9rem; letter-spacing: 2px; }
.data-label { width: 160px; color: #a5b1c2; font-weight: bold; }
.data-bar-bg { flex-grow: 1; height: 6px; background: rgba(255,255,255,0.05); margin: 0 25px; border: 1px solid rgba(0,229,255,0.1); }
.data-bar { height: 100%; background: var(--aurora-1); box-shadow: 0 0 15px var(--aurora-1); }
.data-value { width: 130px; text-align: right; color: var(--aurora-1); font-weight: bold; }

#core { align-items: center; text-align: center; }
.core-container { display: flex; flex-direction: column; align-items: center; }
.spinning-reactor { width: 300px; height: 300px; position: relative; display: flex; justify-content: center; align-items: center; margin-bottom: 40px; }
.reactor-ring { position: absolute; border-radius: 50%; border: 2px solid transparent; }
.ring-1 { width: 100%; height: 100%; border-top: 4px solid var(--warning); border-right: 4px solid var(--warning); animation: spinSlow 3s linear infinite; box-shadow: 0 0 30px rgba(255, 23, 68, 0.4); }
.ring-2 { width: 75%; height: 75%; border-bottom: 4px solid var(--aurora-1); border-left: 4px solid var(--aurora-1); animation: spinSlowReverse 4s linear infinite; box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.4); }
.ring-3 { width: 50%; height: 50%; border: 2px dashed #fff; animation: spinSlow 8s linear infinite; }
.reactor-core { font-size: 1.5rem; font-weight: bold; letter-spacing: 5px; color: #fff; }

.core-stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 45px;
    margin-top: 40px;
    padding-top: 34px;
    border-top: 1px dashed rgba(0, 229, 255, 0.15);
    width: 100%;
    max-width: 640px;
}
.core-stat { text-align: center; min-width: 110px; }
.core-stat-val { font-size: clamp(1.2rem, 2.2vw, 1.8rem); font-weight: 900; margin-bottom: 8px; }
.core-stat-label { font-size: 0.6rem; letter-spacing: 2.5px; color: rgba(255,255,255,0.4); }

.emergency-ticker {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 32px;
    background: rgba(1, 2, 4, 0.96);
    border-top: 1px solid rgba(255, 23, 68, 0.45);
    display: flex;
    align-items: center;
    z-index: 1001;
    overflow: hidden;
}
.ticker-label {
    flex-shrink: 0;
    background: var(--warning);
    color: #000;
    font-size: 0.6rem;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 0 12px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.ticker-track {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}
.ticker-content {
    font-size: 0.62rem;
    letter-spacing: 2.5px;
    color: rgba(255, 23, 68, 0.85);
    white-space: nowrap;
    animation: tickerScroll 55s linear infinite;
    display: inline-block;
}
@keyframes tickerScroll {
    from { transform: translateX(100vw); }
    to   { transform: translateX(-100%); }
}

#transmission { justify-content: center; }

.trans-layout {
    display: grid;
    grid-template-columns: 1fr 230px;
    gap: 28px;
    align-items: start;
}

.terminal-window {
    background: rgba(0, 3, 9, 0.96);
    border: 1px solid rgba(0, 229, 255, 0.28);
    overflow: hidden;
}
.terminal-header {
    background: rgba(0, 229, 255, 0.06);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.14);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-red    { background: rgba(255, 65, 65, 0.75); }
.dot-yellow { background: rgba(255, 200, 65, 0.75); }
.dot-green  { background: rgba(65, 210, 90, 0.75); }
.terminal-title {
    flex: 1;
    font-size: 0.66rem;
    letter-spacing: 2px;
    color: rgba(0, 229, 255, 0.45);
    margin-left: 6px;
}
.terminal-live {
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: var(--warning);
    animation: flickerBar 1.6s ease-in-out infinite;
}
.terminal-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.terminal-line {
    font-size: 0.78rem;
    line-height: 1.7;
    letter-spacing: 0.3px;
    color: #7a96b0;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.025);
}
.terminal-line:last-child { border-bottom: none; }
.t-time {
    color: rgba(0, 229, 255, 0.38);
    margin-right: 10px;
    font-size: 0.72rem;
}
.cursor-block { color: var(--aurora-1); }
.blink-line .cursor-block { animation: cursorBlink 1s step-end infinite; }
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.sonar-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.sonar-label {
    font-size: 0.58rem;
    letter-spacing: 3px;
    color: rgba(0, 229, 255, 0.4);
    text-align: center;
}
.sonar-container {
    width: 170px; height: 170px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 229, 255, 0.45);
    position: relative;
    background: radial-gradient(circle, rgba(0,229,255,0.04) 0%, rgba(0,0,0,0.92) 100%);
    overflow: hidden;
}
.sonar-ring {
    position: absolute;
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0, 229, 255, 0.18);
}
.sonar-ring            { width: 55%;  height: 55%;  }
.sonar-ring.ring-delay-1 { width: 78%;  height: 78%;  border-color: rgba(0,229,255,0.11); }
.sonar-ring.ring-delay-2 { width: 100%; height: 100%; border-color: rgba(0,229,255,0.06); }
.sonar-line {
    position: absolute;
    width: 50%; height: 1px;
    top: 50%; left: 50%;
    background: linear-gradient(to right, rgba(0,229,255,0.85), transparent);
    transform-origin: left center;
    animation: sonarSpin 3s linear infinite;
}
@keyframes sonarSpin { 100% { transform: rotate(360deg); } }
.sonar-center {
    position: absolute;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--aurora-1);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 14px var(--aurora-1);
}
.sonar-blip {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--aurora-1);
    box-shadow: 0 0 10px var(--aurora-1);
    transform: translate(-50%, -50%);
    animation: blipFlash 3s ease-out infinite;
}
.sonar-blip.blip-warn {
    background: var(--warning);
    box-shadow: 0 0 12px var(--warning);
    width: 8px; height: 8px;
}
.blip-1 { top: 34%; left: 63%; animation-delay: -1.0s; }
.blip-2 { top: 70%; left: 44%; animation-delay: -1.9s; }
.blip-3 { top: 51%; left: 27%; animation-delay: -0.4s; }
@keyframes blipFlash {
    0%,100% { opacity: 0.18; transform: translate(-50%,-50%) scale(0.7); }
    28%     { opacity: 1;    transform: translate(-50%,-50%) scale(1.25); }
    60%     { opacity: 0.5;  transform: translate(-50%,-50%) scale(1); }
}
.sonar-data {
    width: 170px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sonar-reading {
    display: flex;
    justify-content: space-between;
    font-size: 0.62rem;
    letter-spacing: 2px;
    color: rgba(0,229,255,0.5);
    border-bottom: 1px solid rgba(0,229,255,0.08);
    padding-bottom: 6px;
}

#crew-status { justify-content: center; }

.crew-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
.crew-card {
    background: rgba(2, 6, 14, 0.75);
    border: 1px solid var(--glass-border);
    border-top: 2px solid rgba(0, 229, 255, 0.25);
    padding: 22px;
    position: relative;
    transition: border-color 0.3s;
}
.crew-card-ai {
    border-color: rgba(0,229,255,0.38);
    border-top-color: var(--aurora-1);
    background: rgba(0, 8, 20, 0.82);
}
.crew-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0,229,255,0.08);
}
.crew-avatar svg { width: 48px; height: 48px; flex-shrink: 0; }
.offline-avatar { opacity: 0.28; filter: grayscale(1); }
.crew-info { flex: 1; min-width: 0; }
.crew-name { font-size: 0.78rem; letter-spacing: 2px; color: white; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crew-role { font-size: 0.62rem; letter-spacing: 1px; color: rgba(0,229,255,0.45); margin-top: 4px; }
.crew-status-badge {
    font-size: 0.58rem;
    letter-spacing: 2px;
    padding: 4px 7px;
    border: 1px solid;
    white-space: nowrap;
    flex-shrink: 0;
}
.status-warn { border-color: orange; color: orange; }
.status-dead { border-color: var(--warning); color: var(--warning); }
.status-crit { border-color: var(--warning); color: var(--warning); animation: flickerBar 0.7s infinite; }
.status-ai   { border-color: var(--aurora-1); color: var(--aurora-1); }

.crew-vitals { display: flex; flex-direction: column; gap: 11px; }
.vital-row { display: flex; align-items: center; gap: 10px; font-size: 0.68rem; letter-spacing: 1px; }
.vital-label { width: 68px; color: rgba(255,255,255,0.4); flex-shrink: 0; }
.vital-track { flex: 1; height: 4px; background: rgba(255,255,255,0.07); overflow: hidden; border-radius: 1px; }
.vital-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--aurora-2), var(--aurora-1));
    box-shadow: 0 0 8px var(--aurora-1);
    border-radius: 1px;
    transition: width 1.5s ease;
}
.vital-warn   { background: linear-gradient(90deg, darkred, var(--warning)); box-shadow: 0 0 8px var(--warning); }
.vital-aurora { background: linear-gradient(90deg, var(--aurora-2), var(--aurora-1)); }
.vital-purple { background: linear-gradient(90deg, var(--aurora-2), var(--aurora-3)); box-shadow: 0 0 8px var(--aurora-3); }
.vital-mixed  { background: linear-gradient(90deg, var(--aurora-1), var(--warning)); }
.vital-val { width: 72px; text-align: right; font-weight: bold; font-size: 0.68rem; flex-shrink: 0; }

#anomaly { justify-content: center; }

.threat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.threat-card {
    background: rgba(2, 6, 14, 0.72);
    border: 1px solid var(--glass-border);
    border-top: 2px solid rgba(0,229,255,0.25);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}
.threat-card.threat-critical {
    border-top-color: var(--warning);
    animation: critPulse 2.2s ease-in-out infinite;
}
@keyframes critPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(255,23,68,0); }
    50%       { box-shadow: 0 0 22px rgba(255,23,68,0.14); }
}
.threat-icon { width: 30px; height: 30px; color: var(--aurora-1); flex-shrink: 0; }
.threat-icon-warn { color: var(--warning); }
.threat-info { flex: 1; }
.threat-name { font-size: 0.76rem; letter-spacing: 2px; color: white; margin-bottom: 9px; }
.threat-meter { height: 3px; background: rgba(255,255,255,0.07); border-radius: 1px; overflow: hidden; }
.threat-fill { height: 100%; background: linear-gradient(90deg, var(--aurora-2), var(--aurora-1)); box-shadow: 0 0 6px var(--aurora-1); border-radius: 1px; }
.threat-warn-fill { background: linear-gradient(90deg, darkred, var(--warning)); box-shadow: 0 0 6px var(--warning); }
.threat-badge {
    font-size: 0.58rem;
    letter-spacing: 2px;
    padding: 3px 8px;
    border: 1px solid;
    text-align: center;
}
.level-elevated   { border-color: rgba(0,229,255,0.5); color: var(--aurora-1); }
.level-warn       { border-color: orange; color: orange; }
.level-critical   { border-color: var(--warning); color: var(--warning); animation: flickerBar 0.65s infinite; }

#intercept { justify-content: center; }

.classified-doc {
    background: rgba(1, 3, 9, 0.88);
    border: 1px solid rgba(0, 229, 255, 0.18);
    padding: 42px 40px;
    position: relative;
    font-size: 0.88rem;
    line-height: 1.9;
    color: #94afc5;
}
.doc-corner { position: absolute; width: 18px; height: 18px; border-style: solid; border-color: rgba(0,229,255,0.5); }
.doc-corner.tl { top: 10px;    left: 10px;    border-width: 2px 0 0 2px; }
.doc-corner.tr { top: 10px;    right: 10px;   border-width: 2px 2px 0 0; }
.doc-corner.bl { bottom: 10px; left: 10px;    border-width: 0 0 2px 2px; }
.doc-corner.br { bottom: 10px; right: 10px;   border-width: 0 2px 2px 0; }

.doc-stamp {
    position: absolute;
    top: 22px; right: 32px;
    font-size: 0.72rem;
    letter-spacing: 4px;
    color: var(--warning);
    border: 2px solid var(--warning);
    padding: 5px 12px;
    transform: rotate(-2.5deg);
    opacity: 0.72;
}
.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 32px;
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: rgba(0, 229, 255, 0.42);
    margin-bottom: 4px;
}
.redacted {
    display: inline-block;
    background: rgba(0, 229, 255, 0.08);
    border-radius: 2px;
    height: 0.9em;
    vertical-align: middle;
    position: relative;
    overflow: hidden;
}
.redacted::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(8, 16, 35, 0.92);
    border-radius: 2px;
}
.redacted.short  { width: 55px; }
.redacted.medium { width: 105px; }
.redacted.long   { width: 175px; }
.doc-line { margin-bottom: 18px; }
.doc-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 0.68rem;
    letter-spacing: 3px;
    border-top: 1px dashed rgba(0,229,255,0.15);
    padding-top: 18px;
}

#blackout { justify-content: center; align-items: flex-start; }

.blackout-container {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}
.blackout-header {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 44px;
}
.blackout-icon { width: 68px; height: 68px; flex-shrink: 0; filter: drop-shadow(0 0 18px rgba(255,23,68,0.55)); }
.blackout-title {
    font-size: clamp(2.2rem, 5.5vw, 4.8rem);
    font-weight: 900;
    letter-spacing: 8px;
    text-shadow: 0 0 35px rgba(255, 23, 68, 0.65);
}
.blackout-log {
    border-left: 3px solid rgba(255,23,68,0.5);
    padding-left: 22px;
    margin-bottom: 38px;
}
.blog-line {
    font-size: 0.82rem;
    letter-spacing: 0.8px;
    line-height: 1.65;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #8a9db5;
}
.blog-line:last-child { border-bottom: none; }
.blog-final { color: rgba(255,255,255,0.92) !important; font-weight: bold; }
.blog-idx { color: rgba(0,229,255,0.4); margin-right: 14px; font-size: 0.72rem; }
.blackout-meters { display: flex; flex-direction: column; gap: 14px; }
.bm-item { display: flex; align-items: center; gap: 16px; font-size: 0.78rem; letter-spacing: 2px; }
.bm-label { width: 88px; color: rgba(255,255,255,0.42); flex-shrink: 0; }
.bm-bar-bg { flex: 1; height: 5px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.06); overflow: hidden; border-radius: 1px; }
.bm-fill { height: 100%; border-radius: 1px; }
.bm-val { width: 46px; text-align: right; font-weight: bold; flex-shrink: 0; }

@media (max-width: 900px) {
    .glass-card { width: 100%; }
    .entity-grid { grid-template-columns: 1fr; }
    .catalogue-list { grid-template-columns: repeat(2, 1fr); }
    .threat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    * { cursor: auto; }
    #cursor, #cursor-aura { display: none; }
    .hud { top: auto; bottom: 40px; transform: none; flex-direction: row; justify-content: space-between; width: 90vw; left: 5vw; border: 1px solid var(--aurora-1); font-size: 0.65rem; }
    .hud-left, .hud-right { border: none; padding: 0; text-align: left; background: none; }
    .hud-right { text-align: right; }
    .mobile-hide { display: none; }
    .glass-nav { padding: 15px 5vw; }
    .nav-links { display: none; }
    section { padding: 80px 5vw; }
    .data-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .data-bar-bg { width: 100%; margin: 5px 0; }
    .data-value { text-align: left; width: auto; }
    .chart-wrapper { padding: 15px; height: 250px; }
    .bar-container { width: 25px; }
    .spinning-reactor { width: 200px; height: 200px; }
    .trans-layout { grid-template-columns: 1fr; }
    .sonar-panel { display: none; }
    .crew-grid { grid-template-columns: 1fr; }
    .threat-grid { grid-template-columns: 1fr; }
    .blackout-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .blackout-title { letter-spacing: 4px; }
    .doc-meta { flex-direction: column; gap: 8px; }
    .doc-stamp { position: static; display: inline-block; margin-bottom: 16px; transform: none; }
    .classified-doc { padding: 28px 22px; }
    .field-stats { gap: 30px; margin-top: 40px; }
    .telemetry-stats { grid-template-columns: 1fr; }
    .catalogue-list { gap: 8px; }
    .catalogue-list { gap: 1px; }
    .catalogue-item { font-size: 0.56rem; padding: 10px; }
    .entities-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 30px; }
    .entities-heading h2 { font-size: clamp(1.45rem, 7vw, 2rem); }
    .entity-img { height: 185px; }
    .catalogue-header { font-size: 0.5rem; letter-spacing: 1.4px; }
    .core-stats-grid { gap: 28px; }
    .section-intro { font-size: 0.8rem; }
    .scroll-rail { display: none; }
    .boot-inner { width: 90vw; }
    .boot-lines { min-height: 200px; font-size: 0.62rem; }
    .parallax-shard { display: none; }
    #alert-toast-container { top: auto; bottom: 90px; right: 10px; left: 10px; }
    .alert-toast { max-width: none; }
    #crack-overlay { opacity: 0.6; }
}
