:root {
    --bg-dark: #050505;
    --bg-panel: #0a0a0c;
    --neon-cyan: #00f3ff;
    --neon-blue: #0066ff;
    --alert-red: #ff2a2a;
    --text-main: #e0e0e0;
    --text-dim: #606060;
    --font-ui: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
    --border-color: rgba(255, 255, 255, 0.1);
    --hud-border: 1px solid rgba(0, 243, 255, 0.3);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ui);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
}

/* --- BACKGROUND FX --- */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.1)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

#warp-drive {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* --- HUD FRAMES --- */
.hud-frame {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--neon-cyan);
    z-index: 20;
    opacity: 0.5;
}
.hud-frame.top-left { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.hud-frame.top-right { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.hud-frame.bottom-left { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.hud-frame.bottom-right { bottom: 20px; right: 20px; border-left: none; border-top: none; }

/* --- APP LAYOUT --- */
.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 60px; /* Space for HUD frames */
}

/* --- SIDEBAR --- */
.sidebar {
    width: 250px;
    border-right: var(--hud-border);
    display: flex;
    flex-direction: column;
    padding-right: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 60px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    color: var(--neon-cyan);
}

.brand-name {
    font-family: var(--font-code);
    font-weight: 700;
    letter-spacing: 2px;
}

.brand-name .version {
    font-size: 0.6em;
    color: var(--neon-blue);
    margin-left: 5px;
    vertical-align: super;
}

.nav-links a {
    display: block;
    font-family: var(--font-code);
    color: var(--text-dim);
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 0.9rem;
    padding-left: 10px;
    border-left: 2px solid transparent;
    transition: all 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--neon-cyan);
    border-left-color: var(--neon-cyan);
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.5);
    padding-left: 20px;
}

.system-status {
    margin-top: auto;
    font-family: var(--font-code);
    font-size: 0.7rem;
    color: var(--neon-cyan);
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
}

.status-dot.blink {
    animation: blink 2s infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- MAIN CONTENT --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding-left: 60px;
    padding-right: 20px;
    scrollbar-width: none; /* Firefox */
}
.main-content::-webkit-scrollbar { display: none; }

.sector {
    min-height: 80vh;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- HERO --- */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.label-tag {
    font-family: var(--font-code);
    color: var(--neon-blue);
    margin-bottom: 20px;
    font-size: 0.85rem;
}

h1.glitch-text {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 30px;
    position: relative;
    color: white;
}

h1 .highlight {
    color: transparent;
    -webkit-text-stroke: 1px var(--neon-cyan);
}

.mission-brief {
    max-width: 500px;
    line-height: 1.6;
    color: var(--text-dim);
    margin-bottom: 40px;
    border-left: 1px solid var(--text-dim);
    padding-left: 20px;
}

/* Button */
.cyber-btn {
    display: inline-block;
    position: relative;
    padding: 15px 30px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    text-decoration: none;
    font-family: var(--font-code);
    font-weight: 700;
    overflow: hidden;
    transition: 0.3s;
}

.cyber-btn:hover {
    background: var(--neon-cyan);
    color: black;
    box-shadow: 0 0 20px var(--neon-cyan);
}

.btn-content {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

/* --- RADAR VISUAL --- */
.hero-visual-panel {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-container {
    width: 300px;
    height: 300px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    background: radial-gradient(circle, rgba(0,243,255,0.05) 0%, rgba(0,0,0,0) 70%);
}

.radar-container::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 200px; height: 200px;
    border: 1px dashed var(--border-color);
    border-radius: 50%;
}

.radar-scan {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(0, 243, 255, 0.1) 90%, var(--neon-cyan) 100%);
    border-radius: 50%;
    animation: radar-spin 4s linear infinite;
    opacity: 0.3;
}

.target-point {
    position: absolute;
    width: 6px; height: 6px;
    background: var(--alert-red);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--alert-red);
}
.p1 { top: 30%; left: 60%; }
.p2 { top: 70%; left: 40%; }
.p3 { top: 50%; left: 80%; }

@keyframes radar-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.calc-panel {
    position: absolute;
    bottom: -20px;
    right: 0;
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--text-dim);
    padding: 15px;
    font-family: var(--font-code);
    font-size: 0.8rem;
    width: 200px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
}
.calc-val { color: var(--neon-cyan); }

/* --- SECTOR HEADERS --- */
.sector-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}
.sector-header h2 {
    font-family: var(--font-code);
    font-size: 1.5rem;
    color: var(--neon-cyan);
}
.header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--neon-cyan) 0%, transparent 100%);
}

/* --- BENTO GRID --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    height: 400px;
}

.bento-box {
    background: rgba(10, 10, 12, 0.6);
    border: 1px solid var(--border-color);
    position: relative;
    padding: 25px;
    backdrop-filter: blur(5px);
    transition: 0.3s;
}

.bento-box:hover {
    border-color: var(--neon-cyan);
    transform: translateY(-5px);
}

.tech-latency { grid-column: span 2; }

.box-decor {
    position: absolute;
    width: 20px; height: 20px;
    border: 2px solid var(--neon-blue);
    opacity: 0.5;
}
.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }

.t-icon {
    width: 40px; height: 40px;
    color: var(--neon-blue);
    margin-bottom: 20px;
}

.bento-box h3 {
    font-family: var(--font-code);
    margin-bottom: 10px;
    color: white;
}

.bento-box p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Visuals inside bento */
.tech-visual-bar {
    margin-top: 20px;
    height: 4px;
    background: #333;
    width: 100%;
    position: relative;
}
.bar-fill {
    height: 100%;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.circular-chart {
    width: 60px;
    display: block;
    margin: 20px auto 0;
}
.circle-bg { fill: none; stroke: #333; stroke-width: 3.8; }
.circle { fill: none; stroke: var(--neon-cyan); stroke-width: 2.8; stroke-linecap: round; }

/* --- OPS TERMINAL --- */
.ops-terminal {
    background: #000;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
}
.terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    align-items: center;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.title { margin-left: 10px; font-family: var(--font-code); color: #666; font-size: 0.8rem; }

.log-entry { color: #33ff00; font-family: var(--font-code); margin-bottom: 5px; opacity: 0.8; }
.log-entry.highlight { color: var(--neon-cyan); font-weight: bold; margin-top: 10px; }

.ops-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.op-stat {
    border: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
}
.op-stat .label { display: block; font-family: var(--font-code); font-size: 0.8rem; color: #666; margin-bottom: 5px; }
.op-stat .val { font-size: 1.5rem; color: white; font-weight: bold; }

/* --- FOOTER --- */
.sector-footer {
    padding-top: 40px;
    padding-bottom: 20px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: #444;
}
.footer-line { height: 1px; background: #222; margin-bottom: 20px; }
.footer-flex { display: flex; justify-content: space-between; }
.f-links a { margin-left: 20px; color: #666; text-decoration: none; }
.f-links a:hover { color: var(--neon-cyan); }
.mobile-toggle { display: none; }

@media (max-width: 768px) { .app-container { flex-direction: column; padding: 15px; width: 100vw; height: auto; } .hud-frame { width: 15px; height: 15px; opacity: 0.3; } .hud-frame.top-left { top: 5px; left: 5px; } .hud-frame.top-right { top: 5px; right: 5px; } .hud-frame.bottom-left { bottom: 5px; left: 5px; } .hud-frame.bottom-right { bottom: 5px; right: 5px; } .sidebar { position: fixed; top: 0; left: -100%; width: 80%; height: 100vh; z-index: 100; background: rgba(5, 5, 5, 0.95); backdrop-filter: blur(10px); border-right: 1px solid var(--neon-cyan); transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1); padding: 20px; box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8); } .sidebar.active { left: 0; } .mobile-toggle { display: block; position: fixed; top: 20px; left: 20px; z-index: 101; background: black; border: 1px solid var(--neon-cyan); color: var(--neon-cyan); padding: 8px; border-radius: 4px; cursor: pointer; } .main-content { padding: 40px 0 0 0; width: 100%; } .hero-grid { display: flex; flex-direction: column-reverse; gap: 30px; } h1.glitch-text { font-size: 2.2rem; } .bento-grid { grid-template-columns: 1fr; height: auto; } .ops-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .tech-latency { grid-column: span 1; } .hero-visual-panel { height: 300px; transform: scale(0.9); } .radar-container { width: 250px; height: 250px; } .radar-container::after { width: 180px; height: 180px; } }
