:root {
    --bg-color: #050510;
    --term-green: #0f0;
    --neon-cyan: #00f3ff;
    --neon-magenta: #ff00ff;
    --glass-bg: rgba(5, 5, 16, 0.7);
    --border-color: rgba(0, 243, 255, 0.3);
    --font-mono: 'Share Tech Mono', monospace;
    --font-display: 'Orbitron', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Terminal Loader */
.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.terminal-content {
    width: 100%;
    max-width: 800px;
    font-size: 1.2rem;
    line-height: 1.5;
    text-shadow: 0 0 5px var(--term-green);
    color: var(--term-green);
    white-space: pre-wrap;
}

.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.2) 50%,
        rgba(0, 0, 0, 0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1001;
}

#enter-system-btn {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--term-green);
    color: var(--term-green);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px var(--term-green);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

#enter-system-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

/* Main Interface */
#main-interface {
    position: relative;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

#network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
    pointer-events: none; /* Allow clicking through to canvas if needed */
}

h1.glitch {
    font-family: var(--font-display);
    font-size: 6rem;
    font-weight: 700;
    color: #fff;
    /* text-transform: uppercase; REMOVED */
    position: relative;
    text-shadow: 
        3px 3px 0px var(--neon-magenta), 
        -3px -3px 0px var(--neon-cyan),
        0 0 20px rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 0 1rem;
    backdrop-filter: blur(2px);
    /* Animation removed from main element to keep it readable */
}

h1.glitch::before,
h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050510; /* Match bg color to hide main text momentarily if needed, or transparent */
    background: transparent;
    opacity: 0.8;
}

h1.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--neon-magenta);
    clip-path: inset(0 0 0 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

h1.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-cyan);
    clip-path: inset(0 0 0 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

.subtitle {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 4px;
    margin-top: 1rem;
    color: #fff;
    text-shadow: 0 0 15px var(--neon-cyan);
}

.subtitle-small {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-mono);
}

.status-indicator {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--term-green);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--term-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--term-green);
    animation: pulse 2s infinite;
}

/* HUD Navigation */
.hud-nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    z-index: 10;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.nav-item:hover {
    opacity: 1;
    transform: translateY(-5px);
}

.nav-icon {
    font-size: 0.8rem;
    color: var(--neon-magenta);
    margin-bottom: 0.5rem;
}

.nav-text {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
    border-bottom: 2px solid transparent;
}

.nav-item:hover .nav-text {
    border-bottom: 2px solid var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* Content Panel */
.content-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 80%;
    max-width: 1000px;
    height: 80%;
    background: rgba(5, 5, 16, 0.95);
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    z-index: 20;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.content-panel.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 243, 255, 0.1);
}

.panel-title {
    font-family: var(--font-display);
    color: var(--neon-cyan);
}

#close-panel {
    background: none;
    border: none;
    color: var(--neon-magenta);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s;
}

#close-panel:hover {
    transform: rotate(90deg);
}

.panel-body {
    padding: 2rem;
    overflow-y: auto;
    color: #fff;
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@keyframes glitch-anim {
    0% { clip-path: inset(40% 0 61% 0); transform: translate(-2px, 0); }
    20% { clip-path: inset(92% 0 1% 0); transform: translate(2px, 0); }
    40% { clip-path: inset(43% 0 1% 0); transform: translate(-2px, 0); }
    60% { clip-path: inset(25% 0 58% 0); transform: translate(2px, 0); }
    80% { clip-path: inset(54% 0 7% 0); transform: translate(-2px, 0); }
    100% { clip-path: inset(58% 0 43% 0); transform: translate(2px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(20% 0 80% 0); transform: translate(2px, 0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(-2px, 0); }
    40% { clip-path: inset(10% 0 50% 0); transform: translate(2px, 0); }
    60% { clip-path: inset(80% 0 5% 0); transform: translate(-2px, 0); }
    80% { clip-path: inset(30% 0 40% 0); transform: translate(2px, 0); }
    100% { clip-path: inset(50% 0 30% 0); transform: translate(-2px, 0); }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050510;
}
::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 4px;
}

/* Loading Bar */
.loading-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--neon-cyan);
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.loading-progress {
    width: 30%;
    height: 100%;
    background: var(--neon-cyan);
    animation: loading-anim 2s infinite ease-in-out;
    box-shadow: 0 0 10px var(--neon-cyan);
}

@keyframes loading-anim {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}
