:root {
    --bg-color: #030508;
    --neon-blue: #00f3ff;
    --neon-red: #ff003c;
    --glass-bg: rgba(3, 5, 8, 0.65);
    --glass-border: rgba(0, 243, 255, 0.15);
    --text-main: #e0e0e0;
}

body {
    margin: 0;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
}

/* 3D Canvas Background */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Raycast Quantum Node Display */
#quantum-node-display {
    position: fixed;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    width: 450px;
    background: rgba(5, 5, 10, 0.95);
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2), inset 0 0 15px rgba(0, 243, 255, 0.1);
    z-index: 100;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    backdrop-filter: blur(10px);
}
#quantum-node-display.hidden {
    opacity: 0;
    transform: translateY(-50%) translateX(50px);
}
.display-header {
    background: var(--neon-blue);
    color: #000;
    padding: 10px 15px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.neon-red {
    color: var(--neon-red);
}
.hidden { display: none !important; }

.display-body {
    padding: 20px;
    font-size: 1.1rem;
    line-height: 1.5;
}
.display-body hr {
    border-color: var(--glass-border);
    margin: 15px 0;
}
.neon-text-small {
    color: var(--neon-blue);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.display-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--glass-border);
    font-size: 0.8rem;
    color: #888;
    text-align: right;
    font-family: 'Orbitron', sans-serif;
}

/* Infographic Section */
.infographic-section {
    margin-top: 20px;
    font-family: 'Orbitron', sans-serif;
}
.info-title {
    font-size: 0.8rem;
    color: var(--neon-blue);
    margin: 0 0 10px 0;
    text-shadow: 0 0 5px var(--neon-blue);
}
.bar-container {
    margin-bottom: 10px;
}
.bar-label {
    display: block;
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 3px;
}
.bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    position: relative;
    border: 1px solid #333;
}
.bar-fill {
    height: 100%;
    background: #555;
    width: 0%;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.2, 1);
}
.bar-fill.neon {
    background: var(--neon-red);
    box-shadow: 0 0 10px var(--neon-red);
}
.bar-val {
    position: absolute;
    right: 5px;
    top: -16px;
    font-size: 0.7rem;
    color: #ccc;
}
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.stat-box {
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 10px;
    text-align: center;
}
.stat-num {
    display: block;
    font-size: 1.5rem;
    color: var(--text-main);
    font-weight: 700;
}
.stat-desc {
    font-size: 0.6rem;
    color: var(--neon-blue);
    letter-spacing: 1px;
}

/* UI Layer - Overlays 3D */
#ui-layer {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
#ui-layer > header, #ui-layer > nav, .tunnel-content {
    pointer-events: auto;
}

header {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    font-family: 'Orbitron', sans-serif;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}
.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
}
.neon-text {
    color: var(--neon-blue);
    text-shadow: 0 0 8px var(--neon-blue);
}
.blink {
    animation: blinker 1s linear infinite;
}
@keyframes blinker {
    50% { opacity: 0; }
}

.glitch-text {
    position: relative;
    color: inherit;
}
.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 var(--neon-blue);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 var(--neon-red);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}
@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 82px, 0); }
    20% { clip: rect(65px, 9999px, 16px, 0); }
    40% { clip: rect(13px, 9999px, 78px, 0); }
    60% { clip: rect(98px, 9999px, 13px, 0); }
    80% { clip: rect(34px, 9999px, 42px, 0); }
    100% { clip: rect(72px, 9999px, 95px, 0); }
}

.tunnel-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}
@media (max-width: 768px) {
    .tunnel-nav {
        grid-template-columns: repeat(2, 1fr);
    }
}
.nav-btn {
    background: rgba(5,5,5,0.9);
    border: none;
    color: #666;
    padding: 1rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.nav-btn:hover {
    color: var(--neon-blue);
    background: rgba(0, 243, 255, 0.05);
}
.nav-btn.active {
    color: var(--neon-red);
    border-bottom: 2px solid var(--neon-red);
    text-shadow: 0 0 5px var(--neon-red);
    background: rgba(255, 0, 60, 0.05);
}

#content-container {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

.tunnel-content {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    overflow-y: auto;
    padding: 2rem 5%;
}
.tunnel-content.active {
    opacity: 1;
    pointer-events: auto;
}

.scroll-container {
    max-width: 600px;
    margin: 0;
    padding-bottom: 50vh; 
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    margin-bottom: 50vh; 
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0,0,0,0.5), inset 0 0 20px rgba(0, 243, 255, 0.05);
}

.main-panel h1, .main-panel h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    margin: 0 0 1rem 0;
    line-height: 1.1;
}
.main-panel h2 {
    font-size: 2.5rem;
}

.highlight {
    color: var(--neon-red);
    text-shadow: 0 0 10px var(--neon-red);
}
.subtitle {
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: #888;
    margin-bottom: 2rem;
}

.mega-spacer {
    height: 120vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    color: #333;
    letter-spacing: 5px;
    font-size: 0.9rem;
}

.sub-interface {
    background: rgba(10, 10, 10, 0.8);
    border-left: 3px solid var(--neon-red);
    padding: 2rem;
    backdrop-filter: blur(5px);
}
.sub-interface h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-red);
    margin-top: 0;
    font-size: 1.5rem;
}
.sub-interface p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #ccc;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; border-left: 1px solid #111; }
::-webkit-scrollbar-thumb { background: #333; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-red); }
