:root {
    --bg-color: #030303;
    --text-color: #e0e0e0;
    --neon-cyan: #0afff0;
    --neon-dim: rgba(10, 255, 240, 0.3);
    --grid-line: rgba(255, 255, 255, 0.03);
    --font-tech: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-tech);
    height: 100vh;
    overflow: hidden; /* Evita scroll innecesario en diseño minimalista */
    display: flex;
    flex-direction: column;
}

/* --- Fondo Tecnológico Minimalista --- */
.grid-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    perspective: 500px;
    transform: scale(1.1); /* Ligero zoom */
}

/* Efecto Scanline (Monitor CRT) */
.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;
    pointer-events: none;
    z-index: 100;
}

/* --- Header HUD --- */
.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 10;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Izquierda */
.brand-group {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-color);
}

.moon-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--neon-cyan);
    filter: drop-shadow(0 0 5px var(--neon-cyan));
}

.brand-text {
    font-size: 1.2rem;
    text-transform: uppercase;
}

/* Derecha */
.system-time {
    text-align: right;
    display: flex;
    flex-direction: column;
}

#time-display {
    font-size: 1.2rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-dim);
}

.date-small {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 2px;
}

/* --- Contenido Central --- */
.central-terminal {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.terminal-prefix {
    font-size: 0.8rem;
    color: var(--neon-cyan);
    margin-bottom: 20px;
    opacity: 0.7;
    text-align: left;
    margin-left: 5px;
}

/* Títulos con Efecto Glitch CSS Puro */
.glitch-title {
    font-size: clamp(2.5rem, 8vw, 6rem); /* Responsivo extremo */
    font-weight: 700;
    line-height: 1;
    position: relative;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.glitch-title.sub {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255,255,255,0.8); /* Solo contorno */
}

/* La magia del Glitch */
.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.glitch-title::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-title::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

.decoration-line {
    width: 100px;
    height: 2px;
    background: var(--neon-cyan);
    margin: 30px auto;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.status-blink {
    font-size: 0.9rem;
    animation: blink 1.5s infinite;
}

/* Animaciones */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes glitch-anim {
    0% { clip: rect(12px, 9999px, 82px, 0); transform: skew(0.55deg); }
    5% { clip: rect(64px, 9999px, 12px, 0); transform: skew(0.68deg); }
    10% { clip: rect(2px, 9999px, 44px, 0); transform: skew(0.06deg); }
    15% { clip: rect(98px, 9999px, 20px, 0); transform: skew(0.96deg); }
    20% { clip: rect(6px, 9999px, 5px, 0); transform: skew(0.12deg); }
    100% { clip: rect(1px, 9999px, 1px, 0); transform: skew(0deg); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 10px, 0); transform: skew(0.76deg); }
    5% { clip: rect(2px, 9999px, 86px, 0); transform: skew(0.19deg); }
    10% { clip: rect(28px, 9999px, 14px, 0); transform: skew(0.39deg); }
    15% { clip: rect(49px, 9999px, 7px, 0); transform: skew(0.53deg); }
    20% { clip: rect(10px, 9999px, 92px, 0); transform: skew(0.08deg); }
    100% { clip: rect(1px, 9999px, 1px, 0); transform: skew(0deg); }
}

/* Mobile Ajustes */
@media (max-width: 600px) {
    .hud-header {
        padding: 20px;
    }
    .brand-text {
        font-size: 1rem;
    }
    #time-display {
        font-size: 1rem;
    }
}