:root {
    --matrix-green: #00ff41;
    --virus-neon: #00f0ff;
    --virus-pink: #ff007f;
    --dark-bg: #05050a;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Courier New', Courier, monospace; }

body { background-color: var(--dark-bg); color: #fff; overflow-x: hidden; }

/* --- BACKGROUND MATRIX CONSTANTE --- */
.matrix-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; opacity: 0.25; pointer-events: none; z-index: -1; }
#matrix-canvas { width: 100%; height: 100%; }

/* --- ENTRY GATE --- */
.gate-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 0, 0, 0.9);
    display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 999;
    transition: opacity 0.8s ease, transform 0.8s ease; backdrop-filter: blur(5px);
}

.glitch-wrapper {
    position: relative; width: 90%; max-width: 800px; height: 266px; overflow: hidden; margin-bottom: 40px;
    border: 2px solid rgba(250, 250, 250, 0.1); box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.glitch-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; }
.glitch-img:nth-child(2) { animation: glitch-anim-1 2s infinite linear alternate-reverse; background-blend-mode: multiply; background-color: var(--virus-neon); opacity: 0.5; }
.glitch-img:nth-child(3) { animation: glitch-anim-2 2s infinite linear alternate-reverse; background-blend-mode: multiply; background-color: var(--virus-pink); opacity: 0.5; }

.matrix-btn {
    position: relative; background: #000; color: var(--matrix-green); border: 2px solid var(--matrix-green);
    padding: 15px 40px; font-size: 1.2rem; font-weight: bold; cursor: pointer; letter-spacing: 3px;
    text-transform: uppercase; transition: all 0.3s ease; box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}
.matrix-btn:hover { background: var(--matrix-green); color: #000; box-shadow: 0 0 25px var(--matrix-green); transform: scale(1.05); }

/* --- MAIN CONTENT --- */
.hidden { opacity: 0; pointer-events: none; transform: scale(1.1); }
#main-content { transition: opacity 1s ease, transform 1s ease; min-height: 100vh; }

.cyber-nav {
    display: flex; justify-content: space-between; align-items: center; padding: 20px 40px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2); background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
}

.logo { font-size: 2rem; font-weight: bold; text-shadow: 0 0 10px var(--virus-neon); }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: #8a8a93; font-weight: bold; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--virus-neon); text-shadow: 0 0 8px var(--virus-neon); }
.nav-links .dead-link { cursor: not-allowed; opacity: 0.5; }
.supply-counter { color: var(--virus-pink); font-size: 0.9rem; font-weight: bold; }

/* --- TABS & PANELS --- */
.content-container { padding: 50px 20px; display: flex; justify-content: center; }
.tab-content { display: none; width: 100%; max-width: 800px; animation: fadeIn 0.5s ease; }
.active-tab { display: block; }

.glass-panel {
    background: rgba(5, 5, 10, 0.6); border: 1px solid rgba(0, 240, 255, 0.3); padding: 40px; text-align: center; 
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px);
}

.glass-panel h2, .text-center { font-size: 2rem; margin-bottom: 20px; color: var(--virus-neon); text-align: center; }
.lore-box p { color: #ccc; line-height: 1.8; margin-bottom: 15px; text-align: justify; }

/* --- TV STATIC ROADMAP EFFECT --- */
.tv-container {
    position: relative; width: 100%; height: 300px; margin-top: 30px;
    background-color: #111; border: 4px solid #222; border-radius: 15px;
    overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center;
    box-shadow: inset 0 0 40px #000, 0 0 20px rgba(255, 0, 127, 0.2);
}

.tv-static {
    position: absolute; top: -100%; left: -100%; width: 300%; height: 300%;
    /* Generador de ruido visual base64 puro CSS */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.6;
    animation: tv-noise-move 0.2s infinite linear;
    pointer-events: none;
    z-index: 1;
}

.tv-scanlines {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px; z-index: 2; pointer-events: none;
}

.tv-content { position: relative; z-index: 3; }
.text-danger { font-size: 2.5rem; color: #ff003c; text-shadow: 0 0 15px #ff003c; margin: 10px 0; letter-spacing: 5px; }

@keyframes tv-noise-move {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-5%, 5%); }
    40% { transform: translate(5%, -5%); }
    60% { transform: translate(10%, 10%); }
    80% { transform: translate(-10%, -10%); }
    100% { transform: translate(0, 0); }
}

/* --- SNEAK PEEKS GALLERY --- */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 30px; }
.gallery-grid img { width: 100%; border: 2px solid #222; border-radius: 5px; transition: 0.3s; image-rendering: pixelated; }
.gallery-grid img:hover { border-color: var(--virus-neon); transform: scale(1.05); box-shadow: 0 0 20px rgba(0, 240, 255, 0.3); }

/* --- ANIMACIONES GLITCH --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@keyframes glitch-anim-1 {
    0% { clip: rect(30px, 9999px, 10px, 0); transform: skew(0.5deg); }
    20% { clip: rect(65px, 9999px, 40px, 0); transform: skew(0.8deg); }
    100% { clip: rect(0px, 9999px, 0px, 0); transform: skew(0deg); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(70px, 9999px, 105px, 0); transform: skew(-0.8deg); }
    25% { clip: rect(85px, 9999px, 110px, 0); transform: skew(-0.5deg); }
    100% { clip: rect(0px, 9999px, 0px, 0); transform: skew(0deg); }
}

/* EFECTO GLITCH EN TEXTOS */
.glitch-text { position: relative; display: inline-block; }
.glitch-text::before, .glitch-text::after {
    content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: transparent; pointer-events: none;
}
.glitch-text::before {
    left: 2px; text-shadow: -2px 0 var(--virus-pink); clip: rect(24px, 550px, 90px, 0);
    animation: glitch-text-anim-1 3s infinite linear alternate-reverse;
}
.glitch-text::after {
    left: -2px; text-shadow: -2px 0 var(--virus-neon); clip: rect(85px, 550px, 140px, 0);
    animation: glitch-text-anim-2 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-text-anim-1 {
    0% { clip: rect(20px, 9999px, 80px, 0); } 20% { clip: rect(60px, 9999px, 10px, 0); }
    40% { clip: rect(10px, 9999px, 50px, 0); } 60% { clip: rect(80px, 9999px, 20px, 0); }
    80% { clip: rect(30px, 9999px, 70px, 0); } 100% { clip: rect(50px, 9999px, 30px, 0); }
}
@keyframes glitch-text-anim-2 {
    0% { clip: rect(10px, 9999px, 30px, 0); } 20% { clip: rect(50px, 9999px, 80px, 0); }
    40% { clip: rect(80px, 9999px, 10px, 0); } 60% { clip: rect(20px, 9999px, 60px, 0); }
    80% { clip: rect(70px, 9999px, 40px, 0); } 100% { clip: rect(30px, 9999px, 90px, 0); }
}