  /* ================= ESTILOS CORE ================= */
  :root {
    --bg-deep: #020617;   /* Slate 950 */
    --primary: #3b82f6;   /* Blue 500 */
    --accent: #6366f1;    /* Indigo 500 */
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-deep);
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* === PRELOADER PREMIUM === */
#preloader {
    position: fixed; inset: 0;
    background: #020617;
    z-index: 9999;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
}
.loader-text {
    font-size: 2.5rem; font-weight: 800; letter-spacing: -1px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    margin-bottom: 20px; font-family: 'JetBrains Mono', monospace;
}
.loader-bar-container {
    width: 250px; height: 3px; background: #1e293b;
    border-radius: 4px; overflow: hidden; position: relative;
}
.loader-bar-fill {
    position: absolute; top: 0; left: 0; height: 100%; width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow: 0 0 15px var(--primary);
    animation: loadFill 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes loadFill { 0% { width: 0; } 100% { width: 100%; } }

/* === NAVBAR CON EFECTO CRISTAL AL BAJAR === */
#main-nav {
    transition: all 0.4s ease;
    background: transparent;
    border-bottom: 1px solid transparent;
}
#main-nav.scrolled {
    background: rgba(2, 6, 23, 0.9); /* Fondo oscuro casi opaco */
    backdrop-filter: blur(16px);      /* Desenfoque potente */
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    padding-top: 10px; padding-bottom: 10px; /* Reducir altura */
}

/* === TARJETAS DE CRISTAL (GLASSMORPHISM) === */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.1);
}

/* === BOTONES GLOW === */
.btn-neon {
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    z-index: 1; overflow: hidden;
    transition: all 0.3s ease;
}
.btn-neon:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
    transform: scale(1.02);
}

/* === FONDO DE MALLA (GRID) === */
.cyber-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
}

/* === TERMINAL CODE === */
.terminal-window {
    background: #0f172a; border-radius: 8px; border: 1px solid #334155;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8); overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
}
.dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #020617; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }