/* =======================================================
   OPTIMIZACIÓN DE ESCALA PARA MONITORES GRANDES (24"+)
   ======================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;800&family=Fira+Code:wght@400;600&display=swap');

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Evita que el header tape el contenido al anclar */
}

@media (min-width: 1536px) { html { font-size: 17px; } }
@media (min-width: 1920px) { html { font-size: 19px; } }

:root {
    --primary-color: #3633F9;
    --blue-light: #6b69ff;
    --bg-surface: #05070E;
    --whatsapp-green: #25d366;
    --whatsapp-hover: #1ebd5c;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-surface);
    color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   CANVAS Y MALLA DE FONDO
========================================== */
#tech-canvas {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    z-index: 0; /* ¡Cambiado de -1 a 0 para que esté por encima del fondo! */
    pointer-events: none;
}

.bg-grid {
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(54, 51, 249, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(54, 51, 249, 0.05) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    z-index: 0;
}

/* =========================================
   GLASSMORPHISM
========================================== */
.glass {
    background: rgba(5, 7, 14, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-blue {
    background: linear-gradient(135deg, rgba(54, 51, 249, 0.08) 0%, rgba(7, 11, 25, 0.8) 100%);
    backdrop-filter: blur(10px);
}

.hover-dynamic {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.hover-dynamic:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(54, 51, 249, 0.12);
}

/* =========================================
   DOCUMENTACIÓN API (CÓDIGO Y BADGES)
========================================== */
.code-wrapper {
    background: #030408;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
    position: relative;
}

.code-wrapper::before {
    content: "Copiar";
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: color 0.3s ease;
}
.code-wrapper:hover::before { color: var(--blue-light); }

.code-wrapper pre code {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: #a8a2ff;
    line-height: 1.5;
}

.badge-get {
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, 0.3);
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.badge-post {
    background: rgba(54, 51, 249, 0.15);
    color: var(--blue-light);
    border: 1px solid rgba(54, 51, 249, 0.3);
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

/* Scroll Menu Lateral Activo */
.doc-nav a.active {
    color: var(--blue-light);
    font-weight: 600;
    padding-left: 8px;
    border-left: 2px solid var(--primary-color);
}

/* =========================================
   SELECCIÓN DE TEXTO PERSONALIZADA
   ========================================= */
::selection {
    background-color: rgba(0, 218, 192, 0.767); /* Fondo cian translúcido */
    color: #ffffff; /* Texto blanco puro */
}

/* ==========================================
   SCROLLBAR & WHATSAPP
========================================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: #1a365d; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); }

.whatsapp-float {
    position: fixed; 
    bottom: 24px; 
    right: 24px; 
    width: 60px; 
    height: 60px;
    background-color: var(--whatsapp-green); 
    color: white; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.3); 
    z-index: 9999 !important; /* Fuerza a estar por encima de todo */
    transition: all 0.3s ease; 
    opacity: 1 !important; /* Siempre visible desde el segundo cero */
    transform: translateY(0) !important; 
    pointer-events: auto !important; 
}

.whatsapp-float:hover { 
    background-color: var(--whatsapp-hover); 
    transform: scale(1.1) translateY(0) !important; 
    box-shadow: 0 0 30px rgba(37, 211, 102, 0.6); 
}

.whatsapp-icon { 
    width: 32px; 
    height: 32px; 
    transition: transform 0.3s ease; 
}

.whatsapp-float:hover .whatsapp-icon { 
    transform: rotate(12deg); 
}

/* =======================================================
   ESTILIZACIÓN DEL SCROLLBAR INTERNO DEL MENÚ LATERAL
   ======================================================= */
.custom-sidebar-scroll::-webkit-scrollbar {
    width: 4px; /* Scrollbar super delgado para el índice */
}

.custom-sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.custom-sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--blue-light); /* Se ilumina en azul al interactuar */
}

/* =========================================
   ESTILOS DEL FOOTER UNIFICADO (Redes y Tiendas)
   ========================================= */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #9ca3af;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

.store-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.store-badge:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color); /* Brillo azul eléctrico */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(54, 51, 249, 0.2);
}

/* =========================================
   ANIMACIÓN DEL PRELOADER (BARRA DE CARGA)
   ========================================= */
@keyframes loadingBar {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}