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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    height: 100vh;
    background: #0a0a0f;
    cursor: none;
}

/* ===== PUNTERO CYBERPUNK ===== */
.cyber-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cyber-cursor .outer-ring {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1.5px solid rgba(0, 255, 255, 0.6);
    border-radius: 50%;
    animation: cursorPulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15), inset 0 0 20px rgba(0, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.cyber-cursor .inner-ring {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    animation: cursorPulse 2s ease-in-out 0.5s infinite;
    transition: all 0.3s ease;
}

.cyber-cursor .dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ffff;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 0 0 40px rgba(0, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.cyber-cursor .crosshair {
    position: absolute;
    background: rgba(0, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.cyber-cursor .crosshair.top {
    width: 1px;
    height: 12px;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
}

.cyber-cursor .crosshair.bottom {
    width: 1px;
    height: 12px;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
}

.cyber-cursor .crosshair.left {
    width: 12px;
    height: 1px;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
}

.cyber-cursor .crosshair.right {
    width: 12px;
    height: 1px;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
}

.cyber-cursor .trail {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3), transparent);
    pointer-events: none;
    animation: trailFade 0.6s ease-out forwards;
}

@keyframes trailFade {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes cursorPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.cyber-cursor.hover .outer-ring {
    width: 60px;
    height: 60px;
    border-color: rgba(0, 255, 136, 0.8);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.3), inset 0 0 40px rgba(0, 255, 255, 0.1);
}

.cyber-cursor.hover .inner-ring {
    width: 30px;
    height: 30px;
    border-color: rgba(0, 255, 136, 0.4);
}

.cyber-cursor.hover .dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.8), 0 0 60px rgba(0, 255, 136, 0.4);
}

.cyber-cursor.hover .crosshair {
    background: rgba(0, 255, 136, 0.5);
}

/* ===== INTRO ===== */
#introOverlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #0a0a0f;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#introOverlay.hidden {
    opacity: 0;
    transform: scale(1.2) rotateX(15deg);
    pointer-events: none;
}

/* ===== CANVAS ===== */
#mainCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ===== CONTENIDO ===== */
.intro-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    max-width: 1200px;
    width: 100%;
}

/* ===== SISTEMA DE CRISTAL ===== */
.crystal-system {
    position: relative;
    display: inline-block;
    margin-bottom: 0.2rem;
}

.crystal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    pointer-events: none;
}

.crystal .face {
    position: absolute;
    border: 1px solid rgba(0, 255, 255, 0.15);
    background: rgba(0, 255, 255, 0.03);
    animation: crystalRotate 20s linear infinite;
    transform-style: preserve-3d;
}

.crystal .face:nth-child(1) {
    inset: 0;
    transform: rotateX(0deg) rotateY(0deg);
    animation-duration: 15s;
}
.crystal .face:nth-child(2) {
    inset: 15px;
    transform: rotateX(60deg) rotateY(30deg);
    animation-duration: 20s;
    animation-direction: reverse;
}
.crystal .face:nth-child(3) {
    inset: 30px;
    transform: rotateX(-30deg) rotateY(60deg);
    animation-duration: 18s;
}

@keyframes crystalRotate {
    0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg); }
}

/* ===== LOGO CORFEDES ===== */
.logo-container {
    position: relative;
    display: inline-block;
}

.logo-intro {
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    position: relative;
    font-family: 'Inter', sans-serif;
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.2);
    perspective: 800px;
}

.logo-intro i {
    font-size: 2.8rem;
    color: #00ffff;
    animation: iconGlow 2s ease-in-out infinite, icon3DRotate 8s linear infinite;
    filter: drop-shadow(0 0 30px rgba(0, 255, 255, 0.4));
    transform-style: preserve-3d;
}

@keyframes iconGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.3));
        transform: scale(1) rotate(0deg);
    }
    50% { 
        filter: drop-shadow(0 0 80px rgba(0, 255, 255, 0.9)) drop-shadow(0 0 120px rgba(139, 92, 246, 0.4));
        transform: scale(1.1) rotate(8deg);
    }
}

@keyframes icon3DRotate {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(180deg) rotateX(10deg); }
    50% { transform: rotateY(360deg) rotateX(0deg); }
    75% { transform: rotateY(180deg) rotateX(-10deg); }
    100% { transform: rotateY(0deg) rotateX(0deg); }
}

.logo-intro .char {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 3.2rem;
    position: relative;
    opacity: 0;
    transform: translateY(40px) scale(0.5) rotateX(90deg);
    animation: charEpicReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    background: linear-gradient(180deg, #00ffff 0%, #00ff88 30%, #00ffff 60%, #0088ff 100%);
    background-size: 100% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: charEpicReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, 
               charGlowShift 4s ease-in-out infinite,
               charFloat 3s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.1);
    transform-style: preserve-3d;
}

.logo-intro .char:nth-child(3) { animation-delay: 0.05s, 0.05s, 0.05s; }
.logo-intro .char:nth-child(4) { animation-delay: 0.10s, 0.10s, 0.10s; }
.logo-intro .char:nth-child(5) { animation-delay: 0.15s, 0.15s, 0.15s; }
.logo-intro .char:nth-child(6) { animation-delay: 0.20s, 0.20s, 0.20s; }
.logo-intro .char:nth-child(7) { animation-delay: 0.25s, 0.25s, 0.25s; }
.logo-intro .char:nth-child(8) { animation-delay: 0.30s, 0.30s, 0.30s; }
.logo-intro .char:nth-child(9) { animation-delay: 0.35s, 0.35s, 0.35s; }
.logo-intro .char:nth-child(10) { animation-delay: 0.40s, 0.40s, 0.40s; }

@keyframes charEpicReveal {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.3) rotateX(90deg) rotateY(20deg);
        filter: blur(20px);
    }
    60% {
        transform: translateY(-5px) scale(1.05) rotateX(5deg) rotateY(-5deg);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0) rotateY(0);
        filter: blur(0);
    }
}

@keyframes charGlowShift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
}

@keyframes charFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-4px) rotate(1deg); }
    75% { transform: translateY(4px) rotate(-1deg); }
}

.logo-intro .char::before {
    content: '';
    position: absolute;
    inset: -8px -4px;
    background: radial-gradient(ellipse at 50% 50%, 
        rgba(0, 255, 255, 0.1) 0%, 
        transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: -1;
    filter: blur(10px);
}

.logo-intro .char:hover::before {
    opacity: 1;
}

.logo-particles {
    position: absolute;
    inset: -30px -20px;
    pointer-events: none;
    overflow: visible;
}

.logo-particles span {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #00ffff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    animation: logoParticleFloat 4s ease-in-out infinite;
    opacity: 0;
}

.logo-particles span:nth-child(1) { top: -15px; left: 10%; animation-delay: 0s; }
.logo-particles span:nth-child(2) { top: -20px; right: 15%; animation-delay: 0.8s; }
.logo-particles span:nth-child(3) { bottom: -15px; left: 20%; animation-delay: 1.6s; }
.logo-particles span:nth-child(4) { bottom: -20px; right: 10%; animation-delay: 2.4s; }
.logo-particles span:nth-child(5) { top: 50%; left: -20px; animation-delay: 0.4s; }
.logo-particles span:nth-child(6) { top: 50%; right: -20px; animation-delay: 1.2s; }
.logo-particles span:nth-child(7) { top: -10px; left: 40%; animation-delay: 0.6s; }
.logo-particles span:nth-child(8) { bottom: -10px; right: 40%; animation-delay: 1.8s; }

@keyframes logoParticleFloat {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    20% {
        opacity: 1;
        transform: translate(-10px, -15px) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(10px, 15px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(20px, 30px) scale(0);
    }
}

.logo-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 255, 0.1);
    animation: logoRingExpand 4s ease-out infinite;
    pointer-events: none;
}

.logo-ring:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 0s;
}

.logo-ring:nth-child(2) {
    width: 280px;
    height: 280px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 1.5s;
}

.logo-ring:nth-child(3) {
    width: 360px;
    height: 360px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 3s;
}

@keyframes logoRingExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
        border-color: rgba(0, 255, 255, 0.3);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
        border-color: rgba(0, 255, 255, 0);
    }
}

/* ===== SLOGAN ===== */
.slogan-intro {
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 5px;
    margin-top: 0.1rem;
    opacity: 0;
    animation: glitchFade 1s ease forwards;
    animation-delay: 0.8s;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

@keyframes glitchFade {
    0% { opacity: 0; transform: translateX(-20px); filter: blur(5px); }
    20% { opacity: 0.5; transform: translateX(10px); }
    40% { opacity: 0.8; transform: translateX(-5px); }
    60% { opacity: 1; transform: translateX(2px); }
    100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}

/* ===== BARRA DE CARGA ===== */
.loader-wrapper {
    margin-top: 1rem;
    width: 280px;
    max-width: 80vw;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.2s;
}

.loader-percent {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 0.3rem;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.15);
}

.loader-percent .percent-symbol {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.4);
}

.loader-percent .status-text {
    font-size: 0.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 3px;
    text-transform: uppercase;
    display: block;
    margin-top: 0.1rem;
    animation: pulseLabel 2s ease-in-out infinite;
}

@keyframes pulseLabel {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

.loader-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ffff, #00ff88, #00ffff);
    background-size: 300% 100%;
    border-radius: 0;
    animation: cyberLoad 2s linear infinite;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

@keyframes cyberLoad {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

/* ===== EFECTO DE ONDA ===== */
.cyber-wave {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    border: 1px solid rgba(0, 255, 255, 0.3);
    animation: cyberWave 1s ease-out forwards;
}

@keyframes cyberWave {
    0% { transform: scale(0); opacity: 0.8; border-color: rgba(0, 255, 255, 0.5); }
    100% { transform: scale(20); opacity: 0; border-color: rgba(0, 255, 255, 0); }
}

/* ===== CÓDIGO ===== */
.code-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    opacity: 0.04;
}

.code-lines span {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 0.6rem;
    color: #00ffff;
    white-space: nowrap;
    animation: codeRain 15s linear infinite;
}

@keyframes codeRain {
    0% { transform: translateY(-100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===== OCULTAR CONTENIDO PRINCIPAL INICIALMENTE ===== */
.page-content {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease, visibility 1.2s ease;
}

.page-content.page-visible {
    opacity: 1;
    visibility: visible;
}

/* Asegurar que el intro siempre esté visible al inicio */
#introOverlay {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
}

#introOverlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 820px) {
    .logo-intro { font-size: 2.4rem; }
    .logo-intro .char { font-size: 2.4rem; }
    .logo-intro i { font-size: 2.2rem; }
    .crystal { width: 100px; height: 100px; }
    .logo-ring:nth-child(1) { width: 160px; height: 160px; }
    .logo-ring:nth-child(2) { width: 220px; height: 220px; }
    .logo-ring:nth-child(3) { width: 280px; height: 280px; }
    .loader-wrapper { width: 220px; }
    .loader-percent { font-size: 1rem; }
}

@media (max-width: 600px) {
    .logo-intro { font-size: 1.8rem; }
    .logo-intro .char { font-size: 1.8rem; }
    .logo-intro i { font-size: 1.6rem; }
    .crystal { width: 75px; height: 75px; }
    .crystal .face:nth-child(2) { inset: 10px; }
    .crystal .face:nth-child(3) { inset: 20px; }
    .slogan-intro { font-size: 0.55rem; letter-spacing: 3px; }
    .loader-wrapper { width: 180px; }
    .loader-percent { font-size: 0.9rem; }
    .loader-percent .status-text { font-size: 0.4rem; }
    .logo-ring:nth-child(1) { width: 120px; height: 120px; }
    .logo-ring:nth-child(2) { width: 170px; height: 170px; }
    .logo-ring:nth-child(3) { width: 220px; height: 220px; }
}

@media (max-width: 420px) {
    .logo-intro { font-size: 1.4rem; }
    .logo-intro .char { font-size: 1.4rem; }
    .logo-intro i { font-size: 1.2rem; }
    .crystal { width: 55px; height: 55px; }
    .crystal .face:nth-child(2) { inset: 8px; }
    .crystal .face:nth-child(3) { inset: 16px; }
    .slogan-intro { font-size: 0.45rem; letter-spacing: 2px; }
    .loader-wrapper { width: 140px; }
    .loader-percent { font-size: 0.75rem; }
    .loader-percent .status-text { font-size: 0.35rem; }
    .logo-ring:nth-child(1) { width: 90px; height: 90px; }
    .logo-ring:nth-child(2) { width: 130px; height: 130px; }
    .logo-ring:nth-child(3) { width: 170px; height: 170px; }
}