:root {
    /* Variables de entorno oscuro */
    --bg-base: #030712;
    --card-bg: #0b1329;
    --cf-orange: #f38020;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.15);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border-dim: rgba(255, 255, 255, 0.04);
    --ease-cf: cubic-bezier(0.16, 1, 0.3, 1);

    /* Inicialización estática para mitigar errores de análisis del IDE */
    --mouse-x: 0px;
    --mouse-y: 0px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   CONTENEDOR ESTILO NETWORK CLOUDFLARE
   ========================================================================== */
.hero-globe-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.globe-viewport-cloudflare {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1400px;
    aspect-ratio: 1.2 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    z-index: 1;
    /* Recorte radial sutil para desvanecer los polos inferiores */
    mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 55%, rgba(0,0,0,0.8) 65%, rgba(0,0,0,0) 72%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,1) 55%, rgba(0,0,0,0.8) 65%, rgba(0,0,0,0) 72%);
}

.hero-section {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 60px 20px;
}

.hero-section h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: #ffffff;
    margin-bottom: 16px;
}

.hero-section p {
    color: var(--text-muted);
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.nav-links {
    margin-top: 2rem;
}

.btn-enter {
    display: inline-block;
    padding: 12px 32px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.02);
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1rem;
    font-family: monospace;
    font-weight: 500;
    transition: all 0.2s var(--ease-cf);
}

.btn-enter:hover {
    background: var(--accent);
    color: var(--bg-base);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
    border-color: var(--accent);
}

#dotted-globe-canvas-cf {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#dotted-globe-canvas-cf:active {
    cursor: grabbing;
}

/* Marcador HUD en Centroamérica */
.geo-marker-ca-cf {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #f38020;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 12px 3px #f38020, 0 0 0 4px rgba(243, 128, 32, 0.2);
    z-index: 10;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-cf-sys 3s infinite ease-in-out;
}

@keyframes pulse-cf-sys {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* CONTENEDOR DE RED (INTEGRACIÓN LUMÍNICA) */
#cloudflare-network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    opacity: 1.0;
}

.main-hub {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* SISTEMA DE ANIMACIÓN ASÍNCRONA */
.hidden {
    opacity: 0;
    transform: translateY(12px);
    transition: transform 0.6s var(--ease-cf), opacity 0.6s var(--ease-cf);
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-text {
    animation: cfSlideUp 0.7s var(--ease-cf) forwards;
}

@keyframes cfSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* MEDIA QUERIES INTERFACES MÓVILES */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .globe-viewport-cloudflare {
        width: 95%;
        max-width: 100%;
    }
    
    .hero-section {
        padding: 40px 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section h1 {
        font-size: 3.5rem;
    }
    
    .globe-viewport-cloudflare {
        width: 85%;
        max-width: 900px;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .globe-viewport-cloudflare {
        width: 80%;
        max-width: 1100px;
    }
}

.nav-links {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

/* Botón Principal: Celeste Sólido de Alta Visibilidad */
.btn-cloudflare-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    background: #ffffff;
    border: 1px solid #ffffff;
    color: var(--bg-base);
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: monospace;
    font-weight: 700;
    transition: all 0.25s var(--ease-cf);
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

.btn-cloudflare-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-base);
    transform: translateY(-2px);
}

/* Botón Secundario: Transparente/Delineado estilo Terminal */
.btn-cloudflare-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    border: 1px solid rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.02);
    color: #ffffff;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: monospace;
    font-weight: 500;
    transition: all 0.25s var(--ease-cf);
}

.btn-cloudflare-secondary:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--bg-base);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

.btn-icon {
    width: 16px;
    height: 16px;
}