/* VitalPlay - Custom Styles */

/* Ocultar cursor por defecto en desktop */
@media (pointer: fine) {
    body { cursor: none; }
    a, button, .interactive-hover { cursor: none; }
}

body {
    background-color: #000000;
    color: white;
    overflow-x: hidden;
}

/* --- CURSOR PERSONALIZADO MEJORADO --- */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    transition: width 0.3s cubic-bezier(0.15, 1, 0.5, 1), 
                height 0.3s cubic-bezier(0.15, 1, 0.5, 1), 
                background-color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Punto central más visible con resplandor */
.cursor-dot {
    width: 6px; height: 6px;
    background-color: #00FFFF;
    box-shadow: 0 0 10px #00FFFF, 0 0 20px #00FFFF;
}

/* Anillo exterior visible y semi-transparente */
.cursor-outline {
    width: 28px; height: 28px;
    border: 3px solid rgba(255, 0, 0, 0.8);
    background-color: rgba(255, 0, 0, 0.25);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* Estado Hover General */
.cursor-hover .cursor-outline {
    width: 45px; height: 45px;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}
.cursor-hover .cursor-dot {
    transform: translate(-50%, -50%) scale(0.7);
}

/* Estado Hover sobre ROJO -> Cursor CYAN */
body.cursor-on-red .cursor-outline {
    border-color: rgba(0, 255, 255, 0.95);
    background-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}
body.cursor-on-red .cursor-dot {
    background-color: #00FFFF;
    box-shadow: 0 0 15px #00FFFF;
}

/* Estado Hover sobre CYAN -> Cursor ROJO */
body.cursor-on-cyan .cursor-outline {
    border-color: rgba(255, 0, 0, 0.95);
    background-color: rgba(255, 0, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}
body.cursor-on-cyan .cursor-dot {
    background-color: #FF0000;
    box-shadow: 0 0 15px #FF0000;
}
/* ------------------------------------- */

/* Grid Animado de Fondo (Simulación VR) */
.vr-grid {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(to right, rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    z-index: 0;
    pointer-events: none;
}
@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 50px; }
}

/* Resplandor del Mouse */
.mouse-glow {
    position: fixed;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,0,0,0.08) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
    transition: top 0.1s, left 0.1s;
}

/* Efecto Glassmorphism Avanzado */
.glass-panel {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* Clases para Animación al Scroll (Reveal) */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.2s; }
.reveal-delay-2 { transition-delay: 0.4s; }

/* Botones Gamificados */
.btn-game {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}
.btn-game::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.5s ease;
}
.btn-game:hover::before {
    left: 100%;
}

/* Efecto 3D Tilt Wrapper */
.tilt-wrapper {
    perspective: 1000px;
}
.tilt-element {
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}
.tilt-content {
    transform: translateZ(30px);
}

/* HUD Container - Above background, below content */
.hud-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Grid lines */
.hud-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        linear-gradient(90deg, rgba(0, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 50px 50px, 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0) translateX(0); }
    100% { transform: translateY(50px) translateX(25px); }
}

/* Horizontal tech lines */
.hud-line-h {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.25), transparent);
    animation: lineFade 6s ease-in-out infinite;
}

.hud-line-h:nth-child(1) { width: 30%; top: 20%; left: 0; animation-delay: 0s; }
.hud-line-h:nth-child(2) { width: 50%; top: 40%; right: 0; animation-delay: 2s; }
.hud-line-h:nth-child(3) { width: 25%; top: 60%; left: 10%; animation-delay: 4s; }
.hud-line-h:nth-child(4) { width: 40%; top: 80%; right: 5%; animation-delay: 1s; }

@keyframes lineFade {
    0%, 100% { opacity: 0.15; transform: scaleX(0.8); }
    50% { opacity: 0.35; transform: scaleX(1); }
}

/* Vertical tech lines */
.hud-line-v {
    position: absolute;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(0, 73, 73, 0.6), transparent);
    animation: lineFadeV 5s ease-in-out infinite;
}

.hud-line-v:nth-child(5) { height: 25%; top: 0; left: 10%; animation-delay: 1s; }
.hud-line-v:nth-child(6) { height: 35%; bottom: 0; right: 20%; animation-delay: 3s; }
.hud-line-v:nth-child(7) { height: 20%; top: 5%; left: 65%; animation-delay: 2.5s; }

@keyframes lineFadeV {
    0%, 100% { opacity: 0.15; transform: scaleY(0.7); }
    50% { opacity: 0.3; transform: scaleY(1); }
}

/* Corner brackets */
.hud-corner {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(0, 255, 255, 0.2);
    animation: cornerPulse 3s ease-in-out infinite;
}

.hud-corner.tl { top: 5%; left: 3%; border-right: none; border-bottom: none; }
.hud-corner.tr { top: 5%; right: 3%; border-left: none; border-bottom: none; }
.hud-corner.bl { bottom: 5%; left: 3%; border-right: none; border-top: none; }
.hud-corner.br { bottom: 5%; right: 3%; border-left: none; border-top: none; }

@keyframes cornerPulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.1); }
}

/* Data blocks */
.hud-data {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(0, 255, 255, 0.7);
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: dataScroll 15s linear infinite;
}

.hud-data:nth-child(10) { top: 30%; left: 5%; animation-delay: 0s; }
.hud-data:nth-child(11) { top: 70%; right: 8%; animation-delay: 5s; }
.hud-data:nth-child(12) { bottom: 25%; left: 12%; animation-delay: 10s; }

@keyframes dataScroll {
    0% { opacity: 0.2; transform: translateY(0); }
    50% { opacity: 0.5; }
    100% { opacity: 0.2; transform: translateY(-20px); }
}

/* Circular radar */
.hud-radar {
    position: absolute;
    width: 250px;
    height: 250px;
    border: 2px solid rgba(255, 0, 0, 0.4);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin-top: -125px;
    margin-left: -125px;
    animation: radarPulse 4s ease-in-out infinite;
}

.hud-radar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.8), transparent);
    transform-origin: left center;
    animation: radarSpin 2s linear infinite;
}

.hud-radar::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

@keyframes radarPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

@keyframes radarSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Extra decorative circles */
.hud-circle {
    position: absolute;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    animation: circlePulse 5s ease-in-out infinite;
}

.hud-circle.c1 { width: 80px; height: 80px; top: 15%; right: 15%; animation-delay: 0s; }
.hud-circle.c2 { width: 60px; height: 60px; bottom: 20%; left: 8%; animation-delay: 1.5s; border-color: rgba(255, 0, 0, 0.3); }
.hud-circle.c3 { width: 40px; height: 40px; top: 60%; right: 8%; animation-delay: 3s; }

@keyframes circlePulse {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

/* Additional corner brackets */
.hud-corner-2 {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 0, 0, 0.4);
    animation: cornerPulse2 4s ease-in-out infinite;
}

.hud-corner-2.tl { top: 25%; left: 20%; border-right: none; border-bottom: none; }
.hud-corner-2.br { bottom: 30%; right: 15%; border-left: none; border-top: none; }

@keyframes cornerPulse2 {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Hide scrollbar but keep functionality */
html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

/* Fondo transparente para secciones */
.fondo-transparente-seccion {
    background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.863) 0%, rgba(0, 0, 0, 1) 70%);
    position: relative;
    overflow: hidden;
}

.fondo-transparente-seccion::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    z-index: 1;
}

.fondo-transparente-seccion > * {
    position: relative;
    z-index: 2;
}

/* Fondo sólido para footer */
.fondo-solido-footer {
    background: linear-gradient(135deg, #000000 0%, #050505 100%);
    position: relative;
    overflow: hidden;
}

.fondo-solido-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1;
}

.fondo-solido-footer > * {
    position: relative;
    z-index: 2;
}

/* Laser Scan Loading Effect for Navigation Buttons */
.laser-btn {
    position: relative;
    overflow: hidden;
}

.laser-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    animation: laserScan 0.6s ease-out forwards;
}

@keyframes laserScan {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Full Screen Laser Loading Overlay */
.laser-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.laser-overlay.active {
    opacity: 1;
}

.laser-line::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 32px;
    background: linear-gradient(180deg, rgba(0,255,255,0.15), transparent);
}

@keyframes laserLineMove {
    0% { top: 0; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Scan Lines Effect */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 255, 0.03) 2px,
        rgba(0, 255, 255, 0.03) 4px
    );
    pointer-events: none;
}

/* Button pulse on click */
.btn-pulse {
    animation: btnPulse 0.4s ease-out;
}

@keyframes btnPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}