:root {
    --bg-dark: #050608;
    --panel-bg: rgba(10, 15, 25, 0.7);
    --panel-border: rgba(0, 229, 255, 0.15);
    --cyan: #00e5ff;
    --cyan-dim: rgba(0, 229, 255, 0.4);
    --red: #ff2a2a;
    --red-dim: rgba(255, 42, 42, 0.4);
    --yellow: #ffcc00;
    --text-main: #e0e6ed;
    --text-dim: #8a9bb2;
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow-x: hidden;
    overflow-y: auto;
}

/* CRT Scanline Effect */
.scanline {
    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;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.3;
}

/* Boot Sequence */
.boot-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-out;
}

.boot-content {
    width: 600px;
    max-width: 90%;
    font-family: var(--font-mono);
}

.boot-logo {
    color: var(--cyan);
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--cyan);
    letter-spacing: 4px;
    text-align: center;
}

.boot-progress {
    width: 100%;
    height: 4px;
    background: rgba(0, 229, 255, 0.1);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.boot-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
}

.boot-log {
    height: 200px;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Dashboard Container */
.dashboard-container {
    width: 100vw;
    min-height: 100vh;
    padding: 1.5rem;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1.5rem;
    transition: opacity 2s ease-in;
}

/* Panels */
.panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 229, 255, 0.03);
    position: relative;
    overflow: hidden;
}

/* Corner Accents for Panels */
.panel::before, .panel::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid var(--cyan-dim);
    pointer-events: none;
}

.panel::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.panel::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* Typography Utilities */
.cyan-text { color: var(--cyan); text-shadow: 0 0 8px var(--cyan-dim); }
.red-text { color: var(--red); text-shadow: 0 0 8px var(--red-dim); }
.blink { animation: blinker 1.5s linear infinite; }

@keyframes blinker {
    50% { opacity: 0; }
}

/* Header / Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 4px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-placeholder {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 0 8px var(--cyan));
}

.brand-logo {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid var(--cyan-dim);
}

.brand-text h1 {
    font-size: 24px;
    letter-spacing: 6px;
    margin: 0;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.brand-text .subtitle {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.status-indicators {
    display: flex;
    gap: 2rem;
}

.indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-mono);
}

.indicator .label {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

.indicator .value {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
}

.time-display {
    font-family: var(--font-mono);
    font-size: 20px;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan-dim);
    letter-spacing: 2px;
}

/* Main Content Grid */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 1.5rem;
    height: 100%;
    min-height: 0;
}

.panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(0, 229, 255, 0.05);
}

.panel-header h2 {
    font-size: 14px;
    letter-spacing: 3px;
    color: var(--cyan);
    margin: 0;
}

.panel-content {
    padding: 1.5rem;
    overflow-y: auto;
    height: calc(100% - 45px);
}

.panel-content::-webkit-scrollbar {
    width: 4px;
}
.panel-content::-webkit-scrollbar-thumb {
    background: var(--cyan-dim);
}

/* Data Blocks */
.data-block {
    margin-bottom: 2rem;
}

.data-block .label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.alert-block h3 {
    color: var(--red);
    font-size: 16px;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 8px var(--red-dim);
}

.alert-block .description {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.progress-container {
    margin-top: 1rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    margin-bottom: 4px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    transition: width 0.5s ease;
}

.progress-fill.red-fill {
    background: var(--red);
    box-shadow: 0 0 8px var(--red);
}

/* Lists */
.data-list {
    list-style: none;
}

.data-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-mono);
    font-size: 12px;
}

.status-tag {
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: bold;
}

.status-tag.red { background: rgba(255, 42, 42, 0.2); color: var(--red); border: 1px solid var(--red-dim); }
.status-tag.yellow { background: rgba(255, 204, 0, 0.2); color: var(--yellow); border: 1px solid rgba(255, 204, 0, 0.4); }

/* Bio Scan Animation */
.bio-scan {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
}

.bio-graphic {
    width: 60px;
    height: 60px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rotating-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px dashed var(--red);
    border-radius: 50%;
    animation: rotate 10s linear infinite;
    opacity: 0.7;
}

.core-node {
    width: 20px;
    height: 20px;
    background: var(--red);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--red);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes rotate { 100% { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.2); opacity: 0.8; } }

.bio-stats .stat {
    margin-bottom: 0.5rem;
}
.bio-stats .val {
    display: block;
    font-family: var(--font-mono);
    font-size: 18px;
    color: #fff;
}

/* Map Panel */
.map-panel {
    display: flex;
    flex-direction: column;
}

.map-container {
    position: relative;
    flex: 1;
    background: #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Globe Container adjustments */
#globeViz {
    width: 100%;
    height: 100%;
    cursor: grab;
}
#globeViz:active {
    cursor: grabbing;
}

.map-hud {
    position: absolute;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid var(--panel-border);
    padding: 0.8rem 1.2rem;
}

.map-hud.top-left { top: 20px; left: 20px; }
.map-hud.top-right { top: 20px; right: 20px; }

/* CSS 3D Spinning Coin */
.css-coin-container {
    width: 100px;
    height: 100px;
    perspective: 1000px;
}
.css-coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: spinCoin 4s linear infinite;
}
.css-coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: url('assets/whrcoin.png');
    background-size: cover;
    background-position: center;
    border: 2px solid #ffcc00;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.6), inset 0 0 20px rgba(0,0,0,0.5);
}
.css-coin-front {
    transform: translateZ(4px);
    backface-visibility: hidden;
}
.css-coin-back {
    transform: rotateY(180deg) translateZ(4px);
    backface-visibility: hidden;
}
.css-coin-edge {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #ffcc00;
    transform: translateZ(0px);
}
@keyframes spinCoin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.map-hud.bottom-right { bottom: 20px; right: 20px; text-align: right; }

.hud-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.hud-value {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--cyan);
}
.hud-value.large {
    font-size: 24px;
    font-weight: bold;
}

/* Right Panel: Data Streams */
.terminal-window {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 150px;
    padding: 0.8rem;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #0f0;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.terminal-line { margin-bottom: 4px; opacity: 0.8; }
.terminal-line.new { animation: typeIn 0.1s ease-out forwards; }

/* Crypto Panel */
.crypto-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ca-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 229, 255, 0.2);
    padding: 10px;
}

.ca-label {
    display: block;
    font-size: 9px;
    color: var(--text-dim);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.ca-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid var(--cyan-dim);
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ca-box:hover {
    background: rgba(0, 229, 255, 0.15);
    box-shadow: 0 0 10px var(--cyan-dim);
}

.ca-text {
    font-family: var(--font-mono);
    color: var(--cyan);
    font-size: 13px;
    word-break: break-all;
}

.crypto-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.metric {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.m-label {
    display: block;
    font-size: 9px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.m-val {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: bold;
}

.buy-btn {
    background: rgba(0, 229, 255, 0.1);
    color: var(--cyan);
    border: 1px solid var(--cyan);
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.buy-btn:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 25px var(--cyan);
}

/* Diagnostic Grid */
.diagnostic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.diag-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.diag-val {
    font-family: var(--font-mono);
    font-size: 18px;
    margin-bottom: 4px;
}
.diag-label {
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* Bottom Ticker */
.bottom-bar {
    display: flex;
    align-items: center;
    padding: 0;
    height: 40px;
}

.ticker-label {
    background: var(--cyan);
    color: #000;
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 12px;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
    white-space: nowrap;
}

.ticker-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-text {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--red);
    text-shadow: 0 0 5px var(--red-dim);
    white-space: nowrap;
    animation: ticker 20s linear infinite;
    position: absolute;
}

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

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 400px auto;
        overflow-y: visible;
    }
    .split-layout {
        grid-template-columns: 1fr;
    }
    .evidence-grid {
        grid-template-columns: 1fr;
    }
}

/* Tooltip Styles */
.globe-tooltip {
    position: fixed;
    pointer-events: none;
    background: rgba(10, 15, 25, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--cyan);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
    padding: 15px;
    color: #fff;
    font-family: var(--font-mono);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
    transform: translate(15px, 15px); /* Offset from cursor */
    min-width: 200px;
}
.globe-tooltip.visible {
    opacity: 1;
}
.globe-tooltip h3 {
    margin-bottom: 10px;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
}
.globe-tooltip .t-stat {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 5px;
}

/* Narrative Sections */
.narrative-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.narrative-section {
    padding: 6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.narrative-section.alt-bg {
    background: linear-gradient(to right, transparent, rgba(255, 42, 42, 0.03), transparent);
}

.section-content h2 {
    font-size: 24px;
    letter-spacing: 4px;
    margin-bottom: 3rem;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}
.narrative-section.alt-bg h2 {
    text-shadow: 0 0 10px rgba(255, 42, 42, 0.2);
}

.split-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}

.text-block p {
    color: var(--text-dim);
    line-height: 1.8;
    font-size: 16px;
    margin-bottom: 1rem;
}

.data-block-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.data-block-grid .grid-item { padding: 2rem; text-align: center; }

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Dossier Styling */
.dossier-header {
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}
.dossier-ref {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}
.dossier-header h2 {
    margin-bottom: 0;
}

.evidence-card {
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
.card-barcode {
    font-family: monospace;
    font-size: 8px;
    color: rgba(255,255,255,0.1);
    position: absolute;
    top: 10px;
    right: 15px;
    letter-spacing: 2px;
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    border-top: 1px dashed rgba(255,255,255,0.1);
    padding-top: 15px;
}

/* Math Visuals */
.math-box {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.math-visual {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.math-row {
    display: flex;
    align-items: center;
    gap: 15px;
}
.math-label {
    width: 130px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-align: right;
}
.math-bar-container {
    flex: 1;
    background: rgba(255,255,255,0.05);
    height: 8px;
    border-radius: 4px;
    position: relative;
}
.math-bar {
    height: 100%;
    border-radius: 4px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
}
.math-bar.small { width: 1%; }
.math-bar.massive { width: 100%; box-shadow: 0 0 15px var(--red); }
.red-bg { background: var(--red); }
.math-val {
    width: 60px;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: bold;
}

.roi-container {
    text-align: center;
    background: rgba(0, 229, 255, 0.05);
    padding: 2rem;
    border: 1px solid rgba(0, 229, 255, 0.2);
}
.glowing-numbers {
    font-size: 48px;
    font-family: var(--font-mono);
    font-weight: bold;
    text-shadow: 0 0 20px var(--cyan), 0 0 40px var(--cyan-dim);
    animation: pulseGlow 2s infinite alternate;
}
@keyframes pulseGlow {
    from { text-shadow: 0 0 10px var(--cyan); }
    to { text-shadow: 0 0 20px var(--cyan), 0 0 30px #fff; }
}
.evidence-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 42, 42, 0.1);
}
