@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;800&display=swap');

:root {
    --bg-dark: #07090f;
    --glass-bg: rgba(20, 25, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #3b82f6; 
    --primary-glow: rgba(59, 130, 246, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

body { font-family: 'Montserrat', sans-serif; margin: 0; background-color: var(--bg-dark); color: var(--text-main); overflow-x: hidden; display: flex; flex-direction: column; min-height: 100vh;}
a { text-decoration: none; transition: 0.3s; }
button { font-family: 'Montserrat', sans-serif; }

/* =====================================================================
   FONDO TECNOLÓGICO GLOBAL (Optimizado con GPU)
   ===================================================================== */
.tech-environment { 
    position: fixed; 
    top: 0; left: 0; width: 100vw; height: 100vh; 
    z-index: -1; perspective: 1200px; pointer-events: none; overflow: hidden;
    transform: translateZ(0); /* Aceleración GPU */
    will-change: transform;
}

.ambient-light { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.5; animation: float 10s infinite alternate ease-in-out; will-change: transform; }
.light-1 { top: -10%; left: -10%; width: 40vw; height: 40vw; background: rgba(59, 130, 246, 0.3); }
.light-2 { bottom: -10%; right: -10%; width: 50vw; height: 50vw; background: rgba(139, 92, 246, 0.2); animation-delay: -5s; }
@keyframes float { 0% { transform: translate(0, 0); } 100% { transform: translate(50px, 50px); } }

/* --- 1. RÁFAGAS DE DATOS (Neón Grueso) --- */
.data-burst { position: absolute; opacity: 0; will-change: transform, opacity; }

.burst-1 { width: 300px; height: 3px; top: 20%; left: -30%; background: linear-gradient(to right, transparent 0%, #ffffff 50%, transparent 100%); filter: drop-shadow(0 0 5px var(--primary)) drop-shadow(0 0 15px var(--primary)); animation: burstMoveH 4s infinite linear; }
.burst-2 { width: 400px; height: 3px; top: 60%; right: -40%; background: linear-gradient(to right, transparent 0%, #ffffff 50%, transparent 100%); filter: drop-shadow(0 0 5px var(--primary)) drop-shadow(0 0 15px var(--primary)); animation: burstMoveH 5.5s infinite linear reverse; }
.burst-3 { width: 250px; height: 3px; top: 85%; left: -20%; background: linear-gradient(to right, transparent 0%, #ffffff 50%, transparent 100%); filter: drop-shadow(0 0 5px #ec4899) drop-shadow(0 0 15px #ec4899); animation: burstMoveH 3.5s infinite linear -1.5s; }
.burst-4 { width: 350px; height: 3px; top: 40%; left: -40%; background: linear-gradient(to right, transparent 0%, #ffffff 50%, transparent 100%); filter: drop-shadow(0 0 5px #8b5cf6) drop-shadow(0 0 15px #8b5cf6); animation: burstMoveH 6s infinite linear -3s; }

.burst-5 { width: 3px; height: 300px; top: -30%; left: 30%; background: linear-gradient(to bottom, transparent 0%, #ffffff 50%, transparent 100%); filter: drop-shadow(0 0 5px var(--primary)) drop-shadow(0 0 15px var(--primary)); animation: burstMoveV 5s infinite linear -2s; }
.burst-6 { width: 3px; height: 400px; top: -40%; right: 25%; background: linear-gradient(to bottom, transparent 0%, #ffffff 50%, transparent 100%); filter: drop-shadow(0 0 5px #ec4899) drop-shadow(0 0 15px #ec4899); animation: burstMoveV 6.5s infinite linear -4s; }

@keyframes burstMoveH { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 0.9; } 85% { opacity: 0.9; } 100% { transform: translateX(150vw); opacity: 0; } }
@keyframes burstMoveV { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 0.9; } 85% { opacity: 0.9; } 100% { transform: translateY(150vh); opacity: 0; } }

/* --- 2. PANELES HOLOGRÁFICOS --- */
.glass-pane { 
    position: absolute; 
    background: rgba(15, 20, 35, 0.2); 
    border: 1px solid rgba(59, 130, 246, 0.15); 
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3), inset 0 0 15px rgba(59, 130, 246, 0.05); 
    opacity: 0; 
    will-change: transform, opacity;
}
.pane-1 { width: 150px; height: 100px; top: 10%; left: 10%; animation: moveDiag 14s infinite ease-in-out -4s; }
.pane-2 { width: 220px; height: 140px; top: 35%; right: 8%; animation: moveLat 16s infinite ease-in-out -9s; border-color: rgba(139, 92, 246, 0.2); }
.pane-3 { width: 120px; height: 120px; bottom: 15%; left: 8%; animation: moveDiag 12s infinite ease-in-out reverse -2s; border-color: rgba(236, 72, 153, 0.15); }
.pane-4 { width: 90px; height: 180px; bottom: 20%; right: 28%; animation: moveLat 19s infinite ease-in-out -12s; }
.pane-5 { width: 260px; height: 80px; top: 8%; right: 22%; animation: moveDiag 22s infinite ease-in-out -8s; }
.pane-6 { width: 110px; height: 110px; top: 55%; left: 25%; animation: moveDiag 15s infinite ease-in-out -5s; border-color: rgba(139, 92, 246, 0.2); }
.pane-7 { width: 190px; height: 90px; bottom: 8%; right: 45%; animation: moveLat 17s infinite ease-in-out -1s; }
.pane-8 { width: 140px; height: 140px; top: 22%; left: 42%; animation: moveDiag 18s infinite ease-in-out reverse -14s; border-color: rgba(236, 72, 153, 0.15); }

@keyframes moveDiag { 0% { transform: translate(0, 20px) rotate(-5deg); opacity: 0; } 10% { opacity: 0.5; } 50% { transform: translate(30px, -30px) rotate(3deg); opacity: 0.7; } 90% { opacity: 0.5; } 100% { transform: translate(50px, -50px) rotate(6deg); opacity: 0; } }
@keyframes moveLat { 0% { transform: translateX(30px) scale(0.9); opacity: 0; } 10% { opacity: 0.4; } 50% { transform: translateX(-15px) scale(1.05); opacity: 0.6; } 90% { opacity: 0.4; } 100% { transform: translateX(-40px) scale(1); opacity: 0; } }

/* --- 3. NODOS PARPADEANTES --- */
.tech-node { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 18px 5px rgba(59,130,246,0.9); animation: nodeBlink 3s infinite alternate; will-change: opacity, transform; }
.n-1 { top: 25%; left: 18%; animation-delay: -1s; }
.n-2 { bottom: 25%; right: 20%; background: #8b5cf6; box-shadow: 0 0 18px 5px rgba(139,92,246,0.9); animation-delay: -2s;}
.n-3 { top: 65%; left: 55%; background: #ec4899; box-shadow: 0 0 18px 5px rgba(236,72,153,0.9); animation-delay: 0s;}
.n-4 { top: 15%; right: 35%; animation-delay: -1.5s; }
.n-5 { bottom: 18%; left: 32%; background: #8b5cf6; box-shadow: 0 0 18px 5px rgba(139,92,246,0.9); animation-delay: -0.5s; }
.n-6 { top: 48%; right: 12%; background: #ec4899; box-shadow: 0 0 18px 5px rgba(236,72,153,0.9); animation-delay: -2.5s;}
@keyframes nodeBlink { 0% { opacity: 0.3; transform: scale(0.8); } 100% { opacity: 1; transform: scale(1.8); } }

/* =====================================================================
   NAVBAR & ESTRUCTURA PRINCIPAL
   ===================================================================== */
nav { position: fixed; top: 0; width: 100%; background: rgba(10, 15, 25, 0.6); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-bottom: 1px solid var(--glass-border); z-index: 1000; transform: translateZ(0); will-change: backdrop-filter; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 22px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
.logo i { color: var(--primary); }
.nav-links { display: flex; align-items: center; gap: 15px; }
.nav-greeting { font-size: 14px; color: var(--text-muted); font-weight: 600; margin-right: 10px;}

.btn-glass { background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-main); padding: 8px 18px; border-radius: 50px; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.3s;}
.btn-glass:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.btn-primary { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 50px; font-size: 13px; font-weight: 600; box-shadow: 0 0 15px var(--primary-glow); cursor: pointer; transition: 0.3s;}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 5px 20px rgba(59,130,246,0.6); }

.unified-hub { padding: 110px 0 60px; flex-grow: 1; position: relative; z-index: 10; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 25px; width: 100%; box-sizing: border-box;}

/* =====================================================================
   HERO BANNER (Optimizado)
   ===================================================================== */
.hub-hero { 
    position: relative; 
    border-radius: 24px; 
    overflow: hidden; 
    margin-bottom: 50px; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.4); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    background: rgba(10, 14, 23, 0.35); 
    backdrop-filter: blur(18px); 
    -webkit-backdrop-filter: blur(18px);
    padding: 60px 40px; 
    transform: translateZ(0); /* Aceleración GPU */
    will-change: backdrop-filter;
}

.hero-columns { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

.hero-left { text-align: left; }
.logo-wrapper { text-align: center; margin-bottom: 15px; } 
.hero-code-logo { font-size: 85px; font-weight: 900; letter-spacing: -4px; display: inline-block; background: linear-gradient(-45deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6); background-size: 300% 300%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: stripeFluid 6s ease infinite; filter: drop-shadow(0px 0px 15px rgba(139, 92, 246, 0.4)); }
@keyframes stripeFluid { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.hero-left h2 { font-size: 38px; font-weight: 800; margin: 0 0 15px 0; color: white; letter-spacing: -1px; line-height: 1.2; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9); }
.hero-left p { font-size: 16px; color: #f8fafc; line-height: 1.7; font-weight: 300; margin: 0; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }

.video-placeholder { 
    width: 100%; aspect-ratio: 4 / 3; 
    border-radius: 6px; 
    background: rgba(0,0,0,0.5); 
    border: 1px solid rgba(255,255,255,0.08); 
    box-shadow: inset 0 0 30px rgba(0,0,0,0.6), 0 20px 40px rgba(0,0,0,0.4); 
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; 
}
.video-overlay { display: flex; flex-direction: column; align-items: center; gap: 15px; color: #64748b; transition: 0.3s; }
.play-btn { width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; font-size: 20px; border: 1px solid rgba(255,255,255,0.1); transition: 0.3s; }
.video-placeholder:hover .video-overlay { color: var(--primary); }
.video-placeholder:hover .play-btn { background: rgba(59, 130, 246, 0.2); border-color: var(--primary); color: white; transform: scale(1.1); box-shadow: 0 0 20px rgba(59,130,246,0.4);}
.video-overlay span { font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;}
.video-placeholder iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; }

/* =====================================================================
   GRID & CARDS (Optimizadas)
   ===================================================================== */
.section-title { font-size: 22px; font-weight: 800; margin: 0 0 30px 0; color: var(--text-main); display: flex; align-items: center; gap: 10px; text-shadow: 0 2px 10px rgba(0,0,0,0.8);}
.section-title i { color: var(--primary); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; }

.card { 
    background: rgba(20, 25, 35, 0.5); 
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: 20px; padding: 25px; transition: 0.4s; display: flex; flex-direction: column; position: relative; 
    transform: translateZ(0); /* Aceleración GPU */
    will-change: transform, backdrop-filter;
    box-sizing: border-box; /* ARREGLO: Evita que las tarjetas se desborden del ancho en móviles */
}
.card:hover { transform: translateY(-8px) translateZ(0); border-color: rgba(255,255,255,0.15); box-shadow: 0 15px 35px rgba(0,0,0,0.5); }
.card-tag { position: absolute; top: 30px; right: 30px; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 5px 12px; border-radius: 20px; letter-spacing: 1px; z-index: 10; backdrop-filter: blur(5px); }
.tag-app { background: rgba(59, 130, 246, 0.2); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-dev { background: rgba(245, 158, 11, 0.2); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.3); }

.card-img-banner { width: 100%; height: 130px; border-radius: 12px; background-size: cover; background-position: center; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.05); box-shadow: inset 0 0 20px rgba(0,0,0,0.3); }
.card-icon { width: 55px; height: 55px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--primary); margin-bottom: 20px; box-shadow: inset 0 0 20px rgba(255,255,255,0.02); }

.card-title { font-size: 18px; margin: 0 0 10px; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.8);}
.card-desc { color: #f1f5f9; font-size: 13px; line-height: 1.6; margin-bottom: 30px; flex-grow: 1; font-weight: 300; text-shadow: 0 2px 8px rgba(0,0,0,0.8);}
.card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--glass-border); padding-top: 15px; margin-top: auto; }
.btn-card { color: var(--text-main); font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.btn-card i { transition: 0.3s; color: var(--primary); }
.btn-card:hover i { transform: translateX(5px); }

/* --- FOOTER --- */
footer { border-top: 1px solid var(--glass-border); padding: 40px 25px; text-align: center; background: rgba(0,0,0,0.4); backdrop-filter: blur(15px); margin-top: auto; transform: translateZ(0); will-change: backdrop-filter; }
.footer-links { display: flex; justify-content: center; gap: 30px; margin-bottom: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); font-size: 14px; font-weight: 400; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { color: #64748b; font-size: 13px; font-weight: 300; }

/* --- MODALES Y COOKIES --- */
.modal-overlay { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.8); z-index: 9999; backdrop-filter: blur(15px); justify-content: center; align-items: center; transform: translateZ(0); }
.modal-content { background: rgba(20, 25, 35, 0.9); border: 1px solid var(--glass-border); width: 100%; max-width: 450px; border-radius: 16px; box-shadow: 0 25px 50px rgba(0,0,0,0.6); overflow: hidden; max-height: 90vh; display: flex; flex-direction: column; }
.modal-header { padding: 20px 25px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; background: rgba(10, 15, 25, 0.6); }
.modal-header h3 { margin: 0; color: var(--text-main); font-size: 18px; display: flex; align-items: center; gap: 10px; }
.btn-close { background: none; border: none; color: var(--text-muted); font-size: 24px; cursor: pointer; transition: 0.3s; padding: 0;}
.btn-close:hover { color: white; transform: rotate(90deg); }
.modal-body { padding: 25px; overflow-y: auto; }

.profile-tabs { display: flex; gap: 10px; margin-bottom: 25px; border-bottom: 1px solid var(--glass-border); padding-bottom: 10px; overflow-x: auto; }
.tab-btn { flex: 1; background: transparent; border: none; color: var(--text-muted); padding: 10px; font-weight: 600; cursor: pointer; transition: 0.3s; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.tab-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.tab-btn.active { background: rgba(59, 130, 246, 0.15); color: var(--primary); box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.1); }

.tab-content { display: none; animation: fadeIn 0.4s; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.profile-section { background: rgba(10, 15, 25, 0.5); border: 1px solid var(--glass-border); padding: 20px; border-radius: 12px; }
.profile-section h4 { margin: 0 0 15px 0; color: var(--text-main); font-size: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }

.form-input { width: 100%; padding: 12px 15px; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); color: white; border-radius: 8px; font-family: 'Montserrat', sans-serif; box-sizing: border-box; margin-bottom: 15px;}
.form-input:focus { outline: none; border-color: var(--primary); }

.alert-success { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); padding: 12px; border-radius: 8px; font-size: 13px; margin-bottom: 15px; text-align: center; }
.alert-error { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); padding: 12px; border-radius: 8px; font-size: 13px; margin-bottom: 15px; text-align: center; }

.cookie-toggle { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.cookie-info strong { display: block; font-size: 14px; color: var(--text-main); margin-bottom: 3px; }
.cookie-info p { margin: 0; font-size: 11px; color: var(--text-muted); padding-right: 15px; }

.switch { position: relative; display: inline-block; width: 40px; height: 20px; flex-shrink: 0;}
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.1); border-radius: 34px; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: var(--text-muted); border-radius: 50%; transition: .4s; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); background-color: white; }
input:disabled + .slider { opacity: 0.5; cursor: not-allowed; }

#cookie-banner { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(15, 20, 30, 0.95); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); padding: 25px 40px; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.8); display: none; align-items: center; gap: 30px; z-index: 9998; max-width: 900px; width: 90%; }
.cookie-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; font-weight: 300; }
.cookie-text a { color: var(--primary); font-weight: 600; text-decoration: underline; }
.cookie-buttons { display: flex; gap: 15px; flex-shrink: 0; }

@media (max-width: 992px) {
    .hero-columns { grid-template-columns: 1fr; gap: 40px; }
    .hero-left { text-align: center; }
}

@media (max-width: 768px) {
    .nav-greeting { display: none; }
    
    /* ARREGLO: Navbar más limpia y proporcionada para móviles */
    .nav-container { padding: 12px 15px; }
    .nav-links { gap: 8px; }
    .btn-glass, .btn-primary { padding: 8px 12px; font-size: 11px; }
    .logo { font-size: 18px; }
    
    .unified-hub { padding-top: 90px; }
    .hero-code-logo { font-size: 70px; }
    .hero-left h2 { font-size: 28px; }
    
    /* REDUCCIÓN TÁCTICA DE BLUR PARA FLUIDEZ EXTREMA EN MÓVIL */
    .hub-hero { 
        padding: 40px 20px; margin-bottom: 30px; 
        backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    }
    .card {
        backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); 
    }

    #cookie-banner { flex-direction: column; text-align: center; gap: 20px; padding: 25px; }
    .cookie-buttons { width: 100%; justify-content: center; flex-wrap: wrap; }
    .cookie-buttons button { flex: 1; min-width: 120px; }
    .profile-tabs { overflow-x: auto; white-space: nowrap; }
    
    /* En móvil se ocultan algunas animaciones de fondo para mejorar rendimiento bruto */
    .glass-pane:nth-child(n+7) { display: none; } 
    .data-burst:nth-child(n+4) { display: none; }
}

/* Ajuste extra para móviles muy estrechos (Evitar que el menú colapse) */
@media (max-width: 480px) {
    .nav-links { gap: 5px; }
    .btn-glass, .btn-primary { padding: 6px 8px; font-size: 10px; }
    .logo { font-size: 16px; gap: 5px; }
}
/* --- ETIQUETAS TECNOLÓGICAS (BADGES) --- */
.tech-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}
.tech-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
}