:root {
    --primary: #0f0;
    --secondary: #0ff;
    --bg-dark: #050505;
    --bg-card: #0a0a0a;
    --text-main: #eee;
    --text-muted: #888;
    --border: #333;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Backgrounds */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -2;
    opacity: 0.3;
}
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.5) 50%);
    background-size: 100% 4px;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3 { font-family: 'Share Tech Mono', monospace; text-transform: uppercase; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.logo { font-size: 1.5rem; font-weight: bold; color: var(--primary); letter-spacing: 2px; }
.nav-links { display: flex; gap: 2rem; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { border: 1px solid var(--primary); padding: 0.5rem 1rem; color: var(--primary); }
.nav-cta:hover { background: var(--primary); color: #000; }

/* Hero */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}
.status-badge { 
    display: inline-block; 
    padding: 0.2rem 0.5rem; 
    border: 1px solid var(--border); 
    background: #000; 
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}
.blink { animation: blink 1s infinite; color: var(--primary); }
@keyframes blink { 50% { opacity: 0; } }

.hero-title { font-size: 4rem; line-height: 1.1; margin-bottom: 1rem; }
.highlight { color: var(--primary); text-shadow: 0 0 10px rgba(0,255,0,0.5); }
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }

.hero-actions { display: flex; gap: 1rem; justify-content: center; margin-bottom: 3rem; }
.btn {
    padding: 1rem 2rem;
    font-family: 'Share Tech Mono', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-transform: uppercase;
}
.primary-btn { background: var(--primary); color: #000; }
.secondary-btn { background: transparent; border: 1px solid var(--border); color: var(--text-main); }
.secondary-btn:hover { border-color: var(--primary); color: var(--primary); }

.stats-bar {
    display: flex;
    gap: 3rem;
    justify-content: center;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}
.stat { display: flex; flex-direction: column; }
.stat-val { font-size: 1.5rem; font-weight: bold; font-family: 'Share Tech Mono'; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* Section Generic */
.section { padding: 4rem 2rem; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; color: var(--secondary); margin-bottom: 0.5rem; }
.line { width: 50px; height: 3px; background: var(--primary); margin: 0 auto; }

/* Grid Container */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    transition: transform 0.3s;
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.icon { font-size: 2rem; margin-bottom: 1rem; }

/* Process */
.steps-container { display: flex; justify-content: center; align-items: flex-start; max-width: 1000px; margin: 0 auto; gap: 2rem; flex-wrap: wrap; }
.step { flex: 1; min-width: 250px; text-align: center; }
.step-number { font-size: 3rem; color: #222; font-weight: bold; }
.step h3 { color: var(--primary); margin-bottom: 0.5rem; }

/* Pricing */
.pricing-grid { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.pricing-card { background: var(--bg-card); border: 1px solid var(--border); padding: 2rem; width: 300px; position: relative; }
.pricing-card.featured { border-color: var(--primary); box-shadow: 0 0 20px rgba(0,255,0,0.1); }
.badge { position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%); background: var(--primary); color: #000; padding: 0.2rem 1rem; font-size: 0.8rem; font-weight: bold; }
.price { font-size: 2.5rem; font-family: 'Share Tech Mono'; margin: 1rem 0; }
.price span { font-size: 1rem; color: var(--text-muted); }
.features-list li { margin-bottom: 0.5rem; border-bottom: 1px solid #111; padding-bottom: 0.5rem; }

/* CTA */
.cta-section { background: var(--bg-card); padding: 4rem 2rem; text-align: center; border-top: 1px solid var(--border); }
.signup-form { margin-top: 2rem; display: flex; justify-content: center; gap: 1rem; }
.signup-form input { padding: 1rem; background: #000; border: 1px solid var(--border); color: #fff; width: 300px; font-family: 'Share Tech Mono'; }

/* ID Generator */
.id-generator { text-align: center; }
.generator-container { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.form-panel { background: #111; padding: 2rem; border: 1px solid var(--border); }
.form-group { margin-bottom: 1rem; text-align: left; }
.form-group label { display: block; color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.5rem; }
.form-group input, .form-group select { width: 100%; padding: 0.5rem; background: #000; border: 1px solid #333; color: #fff; }

.id-card {
    width: 320px;
    height: 200px;
    background: linear-gradient(135deg, #1a1a1a, #000);
    border-radius: 10px;
    padding: 1rem;
    position: relative;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
}
.card-header-visual { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-logo { color: #fff; font-weight: bold; }
.card-chip { width: 30px; height: 20px; background: gold; border-radius: 3px; }
.card-body { display: flex; gap: 1rem; }
.photo-placeholder { width: 60px; height: 80px; background: #222; }
.info-group label { font-size: 0.5rem; color: #666; display: block; }
.info-val { font-family: 'Share Tech Mono'; font-size: 0.9rem; color: #fff; margin-bottom: 0.5rem; }
.card-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; }
.barcode { font-family: 'Libre Barcode 39', cursive; color: #fff; font-size: 1.5rem; opacity: 0.5; }

.hidden { display: none; }

/* Footer */
footer { background: #000; padding: 3rem 2rem; border-top: 1px solid #333; }
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; gap: 2rem; }
.footer-col h4 { margin-bottom: 1rem; color: var(--text-muted); }
.footer-col a { display: block; margin-bottom: 0.5rem; color: #666; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }
.copyright { text-align: center; margin-top: 3rem; color: #444; font-size: 0.8rem; }

/* HUD & Widgets */
.hud-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 280px;
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid var(--primary);
    padding: 10px;
    font-family: 'Share Tech Mono';
    font-size: 0.8rem;
    z-index: 50;
    backdrop-filter: blur(2px);
}
.hud-header { display: flex; justify-content: space-between; border-bottom: 1px solid var(--primary); margin-bottom: 5px; padding-bottom: 5px; }
.hud-title { color: var(--primary); }
.blink-green { color: var(--primary); animation: blink 2s infinite; }
.hud-row { display: flex; justify-content: space-between; margin-bottom: 2px; color: #aaa; }
.hud-value { color: #fff; }
.load-bar-container { width: 100%; height: 4px; background: #111; margin: 5px 0; }
.load-bar-fill { height: 100%; background: var(--primary); width: 50%; transition: width 0.5s; }

.neural-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000;
    border-top: 1px solid var(--primary);
    color: var(--primary);
    font-family: 'Share Tech Mono';
    padding: 5px 10px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}
.ticker-label { font-weight: bold; background: var(--primary); color: #000; padding: 0 5px; }

/* Glitch Hover Effect */
.primary-btn { position: relative; overflow: visible; }
.primary-btn:hover { color: #fff; animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite; }
.primary-btn::before, .primary-btn::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-dark); opacity: 0; z-index: -1; }
.primary-btn:hover::before, .primary-btn:hover::after { content: ''; opacity: 0.8; z-index: -1; background: inherit; }
.primary-btn:hover::before { animation: glitch-anim-1 2s infinite linear alternate-reverse; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: translate(-2px, 0); background: rgba(255, 0, 0, 0.2); mix-blend-mode: hard-light; }
.primary-btn:hover::after { animation: glitch-anim-2 2s infinite linear alternate-reverse; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transform: translate(2px, 0); background: rgba(0, 0, 255, 0.2); mix-blend-mode: hard-light; }
@keyframes glitch-skew { 0% { transform: skew(0deg); } 20% { transform: skew(-2deg); } 40% { transform: skew(2deg); } 60% { transform: skew(-1deg); } 80% { transform: skew(1deg); } 100% { transform: skew(0deg); } }
@keyframes glitch-anim-1 { 0% { clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%); } 100% { clip-path: polygon(0 70%, 100% 70%, 100% 80%, 0 80%); } }
@keyframes glitch-anim-2 { 0% { clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%); } 100% { clip-path: polygon(0 10%, 100% 10%, 100% 40%, 0 40%); } }

/* API Section */
.api-docs { background: #0a0a0a; border-top: 1px solid #333; padding: 4rem 2rem; }
.api-container { max-width: 800px; margin: 0 auto; font-family: 'Share Tech Mono', monospace; }
.api-intro p { color: #888; margin-bottom: 2rem; font-size: 1.1rem; }
.code-block { background: #111; border: 1px solid #333; border-radius: 4px; margin-bottom: 2rem; }
.code-header { background: #222; padding: 0.5rem 1rem; display: flex; justify-content: space-between; border-bottom: 1px solid #333; }
.code-header .lang { color: #fff; font-size: 0.8rem; }
.code-block pre { padding: 1rem; margin: 0; overflow-x: auto; color: #0f0; }
.api-response { background: #0d1117; border-left: 3px solid #0f0; padding: 1rem; }
.api-response pre { color: #a5d6ff; white-space: pre-wrap; }

/* Opt Widget */
.opt-widget { position: fixed; bottom: 40px; right: 20px; width: 250px; background: rgba(10, 10, 10, 0.9); border: 1px solid #333; padding: 10px; font-family: 'Share Tech Mono'; z-index: 1000; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; gap: 5px; }
.opt-header { display: flex; justify-content: space-between; font-size: 0.7rem; color: #666; }
.opt-status { color: #0f0; }
.opt-progress-bg { width: 100%; height: 6px; background: #222; border: 1px solid #444; overflow: hidden; }
.opt-bar { width: 0%; height: 100%; background: #0f0; transition: width 0.1s linear; }
.opt-details { display: flex; justify-content: space-between; font-size: 0.65rem; color: #888; }
@media (max-width: 768px) { .opt-widget { display: none; } }

/* Loss Widget */
.loss-widget {
    position: fixed;
    bottom: 120px; /* Above throughput widget */
    left: 20px;
    width: 220px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #333;
    padding: 10px;
    font-family: 'Share Tech Mono';
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.loss-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 5px;
    border-bottom: 1px solid #222;
    padding-bottom: 3px;
}
.loss-value { color: #f0f; } /* Magenta for contrast */
.loss-graph {
    background: #050505;
    border: 1px solid #222;
}

@media (max-width: 768px) {
    .loss-widget { display: none; }
}

/* Throughput Widget */
.throughput-widget { position: fixed; bottom: 40px; left: 20px; width: 200px; background: rgba(10, 10, 10, 0.9); border: 1px solid #333; padding: 10px; font-family: 'Share Tech Mono'; z-index: 1000; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); }
.tp-header { display: flex; justify-content: space-between; font-size: 0.7rem; color: #888; margin-bottom: 5px; border-bottom: 1px solid #222; padding-bottom: 3px; }
.tp-val { color: #0ff; }
.tp-graph { display: flex; align-items: flex-end; gap: 2px; height: 40px; overflow: hidden; padding-top: 5px; }
.tp-bar { flex: 1; background: #005500; transition: height 0.2s ease; }
.tp-bar.high { background: #0f0; box-shadow: 0 0 5px #0f0; }
@media (max-width: 768px) { .throughput-widget { display: none; } }

/* Leaderboard */
.leaderboard-container { max-width: 1000px; margin: 0 auto; background: rgba(10, 10, 10, 0.8); border: 1px solid #333; border-left: 3px solid #0f0; font-family: 'Share Tech Mono', monospace; box-shadow: 0 0 15px rgba(0, 255, 0, 0.1); }
.table-header { display: flex; background: #111; border-bottom: 2px solid #222; padding: 1rem; color: #666; font-size: 0.9rem; letter-spacing: 1px; }
.table-body { max-height: 400px; overflow-y: auto; }
.lb-row { display: flex; padding: 1rem; border-bottom: 1px solid #1a1a1a; transition: background 0.2s; cursor: default; }
.lb-row:hover { background: rgba(0, 255, 0, 0.05); }
.lb-row.highlight { animation: flash-row 0.5s ease; }
@keyframes flash-row { 0% { background: rgba(0, 255, 0, 0.2); } 100% { background: transparent; } }
.col { flex: 1; display: flex; align-items: center; }
.col.rank { flex: 0.5; color: #888; }
.col.agent { flex: 2; color: #fff; font-weight: bold; }
.col.status { flex: 1.5; }
.col.gains { flex: 1.5; justify-content: flex-end; color: #0f0; }
.status-indicator { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.status-training { background: #ff0; box-shadow: 0 0 5px #ff0; }
.status-deployed { background: #0f0; box-shadow: 0 0 5px #0f0; }
.status-optimizing { background: #0ff; box-shadow: 0 0 5px #0ff; }
.table-body::-webkit-scrollbar { width: 5px; }
.table-body::-webkit-scrollbar-track { background: #000; }
.table-body::-webkit-scrollbar-thumb { background: #333; }

/* Neural Link Widget */
.neural-link-widget {
    position: fixed;
    top: 90px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 90;
    font-family: 'Share Tech Mono', monospace;
    opacity: 0.8;
}

.link-icon {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: relative;
    background: rgba(0, 255, 0, 0.1);
}

.link-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: neural-pulse 1.5s infinite;
}

.link-icon::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px dashed var(--primary);
    border-radius: 50%;
    animation: spin-slow 4s linear infinite;
}

.link-status {
    font-size: 0.8rem;
    color: var(--primary);
    text-shadow: 0 0 5px var(--primary);
}

@keyframes neural-pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
}

@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .neural-link-widget { top: auto; bottom: 80px; left: 20px; }
}

/* System Log Panel */
.sys-log-panel {
    position: fixed;
    top: 100px;
    left: 20px;
    width: 250px;
    height: 300px;
    background: rgba(0, 5, 0, 0.9);
    border: 1px solid #333;
    border-left: 2px solid var(--primary);
    font-family: 'Share Tech Mono', monospace;
    z-index: 40;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(2px);
    opacity: 0.8;
}
.sys-log-header {
    background: #111;
    color: #666;
    padding: 5px 10px;
    font-size: 0.7rem;
    border-bottom: 1px solid #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.sys-log-content {
    flex: 1;
    overflow: hidden;
    padding: 10px;
    font-size: 0.7rem;
    color: #aaa;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.log-line {
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.log-line .ts { color: #444; margin-right: 5px; }
.log-line .type { color: var(--primary); margin-right: 5px; }
.log-line.warn .type { color: #ff0; }
.log-line.err .type { color: #f00; }

@media (max-width: 1024px) {
    .sys-log-panel { display: none; }
}

/* Server Rack Widget */
.server-rack-widget {
    position: fixed;
    top: 260px; /* Below HUD */
    right: 20px;
    width: 120px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid #444;
    border-right: 3px solid #222;
    border-left: 3px solid #222;
    padding: 5px;
    z-index: 45;
    font-family: 'Share Tech Mono';
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rack-header {
    font-size: 0.6rem;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #333;
    padding-bottom: 2px;
    margin-bottom: 2px;
}

.rack-units {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rack-unit {
    height: 8px;
    background: #111;
    border: 1px solid #222;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 2px;
    gap: 2px;
}

.led {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #222;
}

.led.active { background: #0f0; box-shadow: 0 0 3px #0f0; }
.led.busy { background: #ff0; box-shadow: 0 0 3px #ff0; }
.led.err { background: #f00; box-shadow: 0 0 3px #f00; }

.rack-footer {
    font-size: 0.6rem;
    color: #444;
    text-align: center;
    margin-top: 2px;
    border-top: 1px solid #222;
}

@media (max-width: 1200px) {
    .server-rack-widget { display: none; }
}

/* Quantum Widget */
.quantum-widget {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 140px;
    background: rgba(10, 0, 20, 0.9);
    border: 1px solid #50f;
    padding: 10px;
    font-family: 'Share Tech Mono';
    z-index: 45;
    box-shadow: 0 0 15px rgba(80, 0, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.quantum-header {
    font-size: 0.7rem;
    color: #a0f;
    border-bottom: 1px solid #305;
    width: 100%;
    text-align: center;
    padding-bottom: 5px;
}
.quantum-display {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.q-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #0ff;
    border-radius: 50%;
    box-shadow: 0 0 10px #0ff;
}
.q-link {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 2px;
    background: rgba(0, 255, 255, 0.3);
}
.quantum-status {
    font-size: 0.6rem;
    color: #aaa;
}
#q-coherence { color: #0ff; }
.q-btn {
    background: transparent;
    border: 1px solid #50f;
    color: #50f;
    font-family: 'Share Tech Mono';
    font-size: 0.7rem;
    padding: 5px 10px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}
.q-btn:hover {
    background: #50f;
    color: #fff;
    box-shadow: 0 0 10px #50f;
}
.q-btn:active { transform: scale(0.95); }

@media (max-width: 1200px) {
    .quantum-widget { display: none; }
}

/* Compression Widget */
.compression-widget {
    position: fixed;
    bottom: 200px; /* Above loss widget */
    left: 20px;
    width: 120px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #333;
    padding: 10px;
    font-family: 'Share Tech Mono';
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.comp-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: #888;
    margin-bottom: 5px;
    border-bottom: 1px solid #222;
    padding-bottom: 3px;
}
.comp-value { color: #fe0; } /* Yellow */
.comp-ring-container {
    position: relative;
    width: 80px;
    height: 80px;
}
.comp-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.ring-bg {
    fill: none;
    stroke: #222;
    stroke-width: 8;
}
.ring-progress {
    fill: none;
    stroke: #fe0;
    stroke-width: 8;
    stroke-dasharray: 251.2; /* 2 * PI * 40 */
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 0.2s linear;
}
.comp-stat {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    color: #fff;
    font-weight: bold;
}

@media (max-width: 768px) {
    .compression-widget { display: none; }
}

/* Cooling Widget */
.cooling-widget {
    position: fixed;
    top: 380px; 
    right: 20px;
    width: 120px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid #444;
    padding: 5px;
    z-index: 45;
    font-family: 'Share Tech Mono';
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.cool-header {
    font-size: 0.6rem;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #333;
    width: 100%;
    padding-bottom: 2px;
}

.fan-container {
    width: 60px;
    height: 60px;
    border: 2px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.fan-blade {
    width: 100%;
    height: 100%;
    position: relative;
    animation: spin 1s linear infinite;
}

.fan-blade::before, .fan-blade::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #333;
}

/* Vertical blade */
.fan-blade::before {
    width: 10px;
    height: 50px;
    border-radius: 5px;
}

/* Horizontal blade */
.fan-blade::after {
    width: 50px;
    height: 10px;
    border-radius: 5px;
}

.cool-stat {
    font-size: 0.7rem;
    color: #0ff;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 1200px) {
    .cooling-widget { display: none; }
}

/* Protocol Override Control */
.protocol-control {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 140px;
    background: rgba(20, 0, 0, 0.9);
    border: 1px solid #f00;
    padding: 10px;
    font-family: 'Share Tech Mono';
    z-index: 1000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.pc-header {
    font-size: 0.6rem;
    color: #f66;
    border-bottom: 1px solid #500;
    width: 100%;
    text-align: center;
    padding-bottom: 5px;
}
.pc-btn {
    background: transparent;
    border: 1px solid #f00;
    color: #f00;
    font-family: 'Share Tech Mono';
    font-size: 0.8rem;
    padding: 8px 10px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.pc-btn:hover {
    background: #f00;
    color: #000;
    box-shadow: 0 0 15px #f00;
}
.pc-btn.active {
    background: #f00;
    color: #000;
    box-shadow: 0 0 20px #f00;
    animation: pulse-red 1s infinite;
}
@keyframes pulse-red {
    0% { box-shadow: 0 0 10px #f00; }
    50% { box-shadow: 0 0 25px #f00; }
    100% { box-shadow: 0 0 10px #f00; }
}

/* Lockdown Mode Overrides */
body.lockdown-mode {
    --primary: #f00;
    --secondary: #ff0;
    background-color: #100;
}
body.lockdown-mode .navbar {
    border-bottom-color: #f00;
}
body.lockdown-mode .logo {
    color: #f00;
    text-shadow: 0 0 10px #f00;
}
body.lockdown-mode .hud-panel, 
body.lockdown-mode .opt-widget,
body.lockdown-mode .throughput-widget,
body.lockdown-mode .loss-widget,
body.lockdown-mode .server-rack-widget,
body.lockdown-mode .quantum-widget,
body.lockdown-mode .cooling-widget {
    border-color: #f00;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}
body.lockdown-mode .hud-title,
body.lockdown-mode .opt-status,
body.lockdown-mode .tp-val,
body.lockdown-mode .loss-value,
body.lockdown-mode .comp-value {
    color: #f00;
}
body.lockdown-mode .opt-bar {
    background: #f00;
}
body.lockdown-mode .tp-bar.high {
    background: #f00;
    box-shadow: 0 0 5px #f00;
}
body.lockdown-mode .status-deployed {
    background: #f00;
    box-shadow: 0 0 5px #f00;
}
body.lockdown-mode .compression-widget { border-color: #f00; }
body.lockdown-mode .ring-progress { stroke: #f00; }
body.lockdown-mode .ticker-label {
    background: #f00;
    color: #fff;
}
body.lockdown-mode #ticker-text {
    color: #f00;
}
body.lockdown-mode .cool-stat { color: #f00; }
body.lockdown-mode .fan-blade::before, 
body.lockdown-mode .fan-blade::after { background: #f00; box-shadow: 0 0 10px #f00; }

body.lockdown-mode::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 50%, rgba(255, 0, 0, 0.2) 100%);
    pointer-events: none;
    z-index: 999;
    animation: alarm-pulse 1s infinite;
}
@keyframes alarm-pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.7; }
    100% { opacity: 0.3; }
}

@media (max-width: 1200px) {
    .protocol-control { display: none; }
}

/* Ping Map Widget */
.ping-map-widget {
    position: fixed;
    bottom: 310px; /* Above compression widget */
    left: 20px;
    width: 160px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #333;
    padding: 10px;
    font-family: 'Share Tech Mono';
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ping-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: #888;
    margin-bottom: 2px;
    border-bottom: 1px solid #222;
    padding-bottom: 3px;
}
.ping-value { color: #0f0; }
.ping-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    width: 100%;
    height: 60px;
}
.ping-node {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    border-radius: 1px;
    transition: background 0.1s, box-shadow 0.1s;
}
.ping-node.active {
    background: #0f0;
    box-shadow: 0 0 5px #0f0;
}
.ping-node.high-latency {
    background: #f00;
    box-shadow: 0 0 5px #f00;
}

@media (max-width: 768px) {
    .ping-map-widget { display: none; }
}

/* Memory Heap Widget */
.heap-widget {
    position: fixed;
    bottom: 130px; /* Above opt widget */
    right: 20px;
    width: 160px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #333;
    padding: 10px;
    font-family: 'Share Tech Mono';
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.heap-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: #888;
    margin-bottom: 2px;
    border-bottom: 1px solid #222;
    padding-bottom: 3px;
}
.heap-value { color: #f0f; } 
.heap-bars {
    display: flex;
    align-items: flex-end;
    height: 40px;
    gap: 2px;
}
.heap-bar {
    flex: 1;
    background: #303;
    transition: height 0.1s;
    height: 10%;
}
.heap-bar.active {
    background: #f0f;
    box-shadow: 0 0 5px #f0f;
}

@media (max-width: 768px) {
    .heap-widget { display: none; }
}

/* Lockdown overrides */
body.lockdown-mode .ping-map-widget { border-color: #f00; }
body.lockdown-mode .ping-value { color: #f00; }
body.lockdown-mode .ping-node.active { background: #f00; box-shadow: 0 0 5px #f00; }

body.lockdown-mode .heap-widget { border-color: #f00; }
body.lockdown-mode .heap-value { color: #f00; }
body.lockdown-mode .heap-bar.active { background: #f00; box-shadow: 0 0 5px #f00; }

/* Hex Dump Widget */
.hex-widget {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 100px;
    background: rgba(0, 5, 0, 0.9);
    border: 1px solid #333;
    padding: 5px;
    font-family: 'Share Tech Mono', monospace;
    z-index: 900;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}
.hex-header {
    font-size: 0.7rem;
    color: #444;
    border-bottom: 1px solid #222;
    padding-bottom: 2px;
    margin-bottom: 2px;
    text-align: center;
}
.hex-content {
    flex: 1;
    overflow: hidden;
    font-size: 0.65rem;
    color: #0f0;
    line-height: 1.2;
    opacity: 0.7;
}
.hex-row {
    display: flex;
    justify-content: space-between;
}
.hex-addr { color: #666; margin-right: 5px; }
.hex-bytes { color: #0a0; }
.hex-chars { color: #050; }

@media (max-width: 768px) {
    .hex-widget { display: none; }
}

body.lockdown-mode .hex-widget { border-color: #f00; }
body.lockdown-mode .hex-content { color: #f00; }
body.lockdown-mode .hex-bytes { color: #a00; }
body.lockdown-mode .hex-chars { color: #500; }

/* Bio-Auth Scanner Widget */
.bio-widget {
    position: fixed;
    top: 520px; 
    right: 20px;
    width: 120px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid #444;
    padding: 5px;
    z-index: 45;
    font-family: 'Share Tech Mono';
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.bio-header {
    font-size: 0.6rem;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #333;
    width: 100%;
    padding-bottom: 2px;
}

.bio-scan-area {
    position: relative;
    width: 60px;
    height: 80px;
    border: 1px solid #333;
    background: #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bio-fingerprint {
    width: 40px;
    height: 60px;
    border: 2px dashed #0a0;
    border-radius: 20px;
    opacity: 0.5;
}

.bio-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0f0;
    box-shadow: 0 0 5px #0f0;
    animation: bio-scan 2s linear infinite;
}

.bio-status {
    font-size: 0.55rem;
    color: #888;
}

#bio-result { color: #0ff; }

@keyframes bio-scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

@media (max-width: 1200px) {
    .bio-widget { display: none; }
}

/* Network Topology Widget */
.topology-widget {
    position: fixed;
    top: 660px;
    right: 20px;
    width: 120px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid #444;
    padding: 5px;
    z-index: 45;
    font-family: 'Share Tech Mono';
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.topo-header {
    font-size: 0.6rem;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #333;
    width: 100%;
    padding-bottom: 2px;
}
#topo-canvas {
    background: #000;
    border: 1px solid #222;
}
.topo-status {
    font-size: 0.55rem;
    color: #888;
}
#topo-nodes { color: #0ff; }

@media (max-width: 1200px) {
    .topology-widget { display: none; }
}

/* Lockdown overrides */
body.lockdown-mode .topology-widget { border-color: #f00; }
body.lockdown-mode #topo-nodes { color: #f00; }

body.lockdown-mode .bio-widget { border-color: #f00; }
body.lockdown-mode .bio-scan-line { background: #f00; box-shadow: 0 0 5px #f00; }
body.lockdown-mode .bio-fingerprint { border-color: #500; }
body.lockdown-mode #bio-result { color: #f00; }

/* Satellite Uplink Widget */
.satellite-widget {
    position: fixed;
    top: 420px;
    left: 20px;
    width: 140px;
    background: rgba(5, 10, 20, 0.9);
    border: 1px solid #444;
    padding: 5px;
    z-index: 45;
    font-family: 'Share Tech Mono';
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.sat-header {
    font-size: 0.6rem;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #333;
    width: 100%;
    padding-bottom: 2px;
}
.sat-screen {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #333;
    background: #000;
    border-radius: 50%;
    overflow: hidden;
}
#sat-canvas {
    border-radius: 50%;
}
.sat-overlay {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    border-radius: 50%;
    background: repeating-radial-gradient(
      transparent 0, 
      transparent 19px, 
      rgba(0, 255, 0, 0.1) 20px
    );
    pointer-events: none;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}
.sat-footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: #888;
}
#sat-signal { color: #0f0; }

@media (max-width: 1200px) {
    .satellite-widget { display: none; }
}

/* Lockdown overrides */
body.lockdown-mode .satellite-widget { border-color: #f00; }
body.lockdown-mode .sat-overlay {
    background: repeating-radial-gradient(
      transparent 0, 
      transparent 19px, 
      rgba(255, 0, 0, 0.1) 20px
    );
}
body.lockdown-mode #sat-signal { color: #f00; }

/* Neural Pulse Widget */
.neural-pulse-widget {
    position: fixed;
    bottom: 550px; /* Above ping map widget */
    left: 20px;
    width: 160px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid #333;
    padding: 10px;
    font-family: 'Share Tech Mono';
    z-index: 1000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.pulse-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: #888;
    margin-bottom: 2px;
    border-bottom: 1px solid #222;
    padding-bottom: 3px;
}
.pulse-value { color: #f0f; }
#pulse-canvas {
    background: #000;
    border: 1px solid #111;
    width: 100%;
}

@media (max-width: 1200px) {
    .neural-pulse-widget { display: none; }
}

/* Lockdown overrides */
body.lockdown-mode .neural-pulse-widget { border-color: #f00; }
body.lockdown-mode .pulse-value { color: #f00; }

/* Fusion Core Widget */
.fusion-widget {
    position: fixed;
    top: 800px;
    right: 20px;
    width: 120px;
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid #444;
    padding: 5px;
    z-index: 45;
    font-family: 'Share Tech Mono';
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}
.fusion-header {
    font-size: 0.6rem;
    color: #666;
    text-align: center;
    border-bottom: 1px solid #333;
    width: 100%;
    padding-bottom: 2px;
}
.fusion-ring {
    width: 60px;
    height: 60px;
    border: 2px dashed #444;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: spin-slow 10s linear infinite;
}
.fusion-core {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #fff 0%, #0ff 50%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px #0ff;
    animation: pulse-core 2s ease-in-out infinite;
}
.fusion-stat {
    font-size: 0.6rem;
    color: #0ff;
}
#fusion-output { color: #fff; }

@keyframes pulse-core {
    0% { transform: scale(0.8); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.8; }
}

@media (max-width: 1200px) {
    .fusion-widget { display: none; }
}

/* Lockdown overrides */
body.lockdown-mode .fusion-widget { border-color: #f00; }
body.lockdown-mode .fusion-stat { color: #f00; }
body.lockdown-mode .fusion-core {
    background: radial-gradient(circle, #fff 0%, #f00 50%, transparent 100%);
    box-shadow: 0 0 20px #f00;
}

/* Blockchain Ledger Widget */
.ledger-widget {
    position: fixed;
    top: 150px;
    right: 320px;
    width: 200px;
    background: rgba(0, 5, 0, 0.9);
    border: 1px solid #333;
    padding: 5px;
    z-index: 40;
    font-family: 'Share Tech Mono';
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ledger-header {
    font-size: 0.6rem;
    color: #666;
    border-bottom: 1px solid #222;
    padding-bottom: 2px;
    text-align: center;
}
.ledger-content {
    height: 100px;
    overflow: hidden;
    font-size: 0.6rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.ledger-block {
    display: flex;
    justify-content: space-between;
    color: #aaa;
    margin-bottom: 2px;
}
.ledger-block.new {
    animation: flash-green 0.5s;
    color: #fff;
}
.ledger-id { color: #0f0; }
.ledger-footer {
    font-size: 0.55rem;
    color: #444;
    border-top: 1px solid #222;
    padding-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@keyframes flash-green { 0% { background: #0f0; color: #000; } 100% { background: transparent; } }

@media (max-width: 1400px) { .ledger-widget { display: none; } }

body.lockdown-mode .ledger-widget { border-color: #f00; }
body.lockdown-mode .ledger-id { color: #f00; }
body.lockdown-mode .ledger-block.new { animation: flash-red 0.5s; }
@keyframes flash-red { 0% { background: #f00; color: #000; } 100% { background: transparent; } }
