:root,
html[data-theme="dark"] {
    --background-color: #0F172A;
    /* Azul noche (Slate 900) */
    --text-color: #F8FAFC;
    /* Blanco roto (Slate 50) */
    --text-muted-color: #94A3B8;
    /* Gris azulado (Slate 400) */
    --header-bg: rgba(15, 23, 42, 0.7);
    /* Base azul noche con transparencia */
    --header-border: rgba(148, 163, 184, 0.1);
    /* Borde sutil */
    --card-bg: rgba(30, 41, 59, 0.5);
    /* Azul más claro para tarjetas (Slate 800) */
    --card-bg-solid: #1E293B;
    /* Azul sólido para tarjetas (Slate 800) */
    --card-border: rgba(148, 163, 184, 0.1);
    --card-hover-border: rgba(148, 163, 184, 0.2);

    --primary-button-bg: #2DD4BF;
    /* Turquesa vibrante (Teal 400) */
    --primary-button-text: #0F172A;
    /* Texto oscuro para alto contraste */
    --primary-button-hover-bg: #14B8A6;
    /* Turquesa más oscuro (Teal 500) */

    --secondary-button-text: #F8FAFC;
    --secondary-button-border: rgba(148, 163, 184, 0.3);
    --secondary-button-hover-bg: rgba(148, 163, 184, 0.1);

    --logo-filter: none;

    /* Gradiente principal "Aurora" */
    --hero-gradient-start: #8B5CF6;
    /* Violeta (Violet 500) */
    --hero-gradient-end: #2DD4BF;
    /* Turquesa (Teal 400) */
    --card-shadow: none;
    --connection-color-start: rgba(79, 70, 229, 0.1); /* Indigo muy suave */
    --connection-color-mid: #4F46E5; /* Indigo Fuerte (Visible en blanco) */
    --connection-color-end: rgba(79, 70, 229, 0.1);
    
    --halo-color: rgba(99, 102, 241, 0.1); /* Halo muy sutil */
}

html[data-theme="light"] {
    --background-color: #F9FAFB;
    /* Un blanco muy sutil y limpio */
    --text-color: #111827;
    /* Gris casi negro para máxima legibilidad */
    --text-muted-color: #6B7280;
    /* Gris intermedio y neutro */
    --header-bg: rgba(249, 250, 251, 0.7);
    --header-border: rgba(17, 24, 39, 0.08);
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-bg-solid: white;
    --card-border: rgba(17, 24, 39, 0.1);
    --card-hover-border: rgba(17, 24, 39, 0.15);

    --primary-button-bg: #3B82F6;
    /* Azul vibrante del logo (Blue-500) */
    --primary-button-text: white;
    --primary-button-hover-bg: #2563EB;
    /* Azul más oscuro para el hover (Blue-600) */

    --secondary-button-text: #111827;
    --secondary-button-border: rgba(17, 24, 39, 0.2);
    --secondary-button-hover-bg: rgba(17, 24, 39, 0.05);

    --logo-filter: none;

    /* Gradiente principal inspirado 100% en el logo */
    --hero-gradient-start: #3B82F6;
    /* Azul del logo */
    --hero-gradient-end: #F59E0B;
    /* Dorado/Ámbar del logo (Amber-500) */
    --card-shadow: 0 10px 15px -3px rgba(17, 24, 39, 0.05), 0 4px 6px -4px rgba(17, 24, 39, 0.05);
    --connection-start: rgba(99, 102, 241, 0.1);
    /* Indigo muy suave */
    --connection-mid: #3B82F6;
    /* Azul vibrante */
    --connection-end: rgba(99, 102, 241, 0.1);

    /* Glow del halo de fondo MODO CLARO */
    --halo-color: rgba(59, 130, 246, 0.15);
    /* Azul claro suave */
}

::selection {
    background: var(--hero-gradient-start);
    color: var(--primary-button-text);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.glass-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--header-border);
}

.hero-section {
    position: relative;
    overflow: hidden;
}

#hero-animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    cursor: grab;
}

.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--hero-gradient-start), var(--hero-gradient-end));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease-out;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.animated-gradient-text {
    background: linear-gradient(90deg, var(--hero-gradient-start), var(--hero-gradient-end), var(--hero-gradient-start));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: background-pan 3s linear infinite;
}

@keyframes background-pan {
    from {
        background-position: 0% center;
    }

    to {
        background-position: -200% center;
    }
}

.cta-button {
    padding: 0.8rem 1.8rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transform-style: preserve-3d;
}

.left-cuad {
    margin-left: 40px;
}

.cta-primary {
    /* Se aplica el color sólido definido en las variables */
    background-color: var(--primary-button-bg);
    color: var(--primary-button-text);
    /* Sombra sutil mejorada */
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2), 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cta-primary:hover {
    background-color: var(--primary-button-hover-bg);
    transform: scale(1.05) perspective(1000px) rotateX(5deg);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.cta-secondary {
    background-color: transparent;
    color: var(--secondary-button-text);
    border-color: var(--secondary-button-border);
}

.cta-secondary:hover {
    background-color: var(--secondary-button-hover-bg);
    transform: scale(1.05);
}

.theme-toggle-button {
    background-color: var(--secondary-button-hover-bg);
    border-radius: 9999px;
    padding: 0.5rem;
    border: 1px solid var(--secondary-button-border);
}

.background-shape {
    position: absolute;
    z-index: -5;
    filter: blur(120px);
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.3) 0%, rgba(255, 193, 7, 0.2) 50%, transparent 70%);
    border-radius: 50%;
    top: 5%;
    left: -15%;
    animation: floatAnimation 15s ease-in-out infinite;
}

.shape-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.2) 0%, rgba(0, 123, 255, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    bottom: -20%;
    right: -20%;
    animation: floatAnimation 20s ease-in-out infinite reverse;
}

.shape-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.2) 0%, rgba(255, 193, 7, 0.15) 50%, transparent 70%);
    border-radius: 50%;
    top: 50%;
    right: 10%;
    animation: floatAnimation 18s ease-in-out infinite;
}

.shape-4 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.2) 0%, rgba(0, 123, 255, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    top: 15%;
    left: 5%;
    animation: floatAnimation 22s ease-in-out infinite reverse;
}

.shape-5 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.2) 0%, rgba(255, 193, 7, 0.15) 50%, transparent 70%);
    border-radius: 50%;
    bottom: 5%;
    right: -10%;
    animation: floatAnimation 25s ease-in-out infinite;
}

@keyframes floatAnimation {
    0% {
        transform: translateY(0) translateX(0) scale(1);
    }

    50% {
        transform: translateY(-30px) translateX(20px) scale(1.05);
    }

    100% {
        transform: translateY(0) translateX(0) scale(1);
    }
}

.bento-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

@media (min-width: 768px) {

    /* Ocultar preloader en móviles (menor a 768px) */
    @media (max-width: 768px) {
        #preloader {
            display: none !important;
        }

        #main-content {
            visibility: visible !important;
            opacity: 1 !important;
        }
    }

    .bento-item {
        padding: 2rem;
    }
}

.bento-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--card-hover-border);
}

.bento-item::before {
    content: '';
    position: absolute;
    left: var(--x, 50%);
    top: var(--y, 50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle at center, rgba(0, 123, 255, 0.2), transparent 50%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease-out;
    pointer-events: none;
}

.bento-item:hover::before {
    opacity: 1;
}

.marquee {
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}

.marquee--reverse .marquee-track {
    animation-direction: reverse;
}

.marquee-card {
    width: 200px;
    height: 352px;
    margin: 0 0.75rem;
    border-radius: 1rem;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .marquee-card {
        width: 250px;
        height: 440px;
        margin: 0 1rem;
    }
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.testimonial-card::after {
    content: '“';
    position: absolute;
    top: -1rem;
    left: 1rem;
    font-size: 8rem;
    font-weight: 900;
    color: var(--hero-gradient-start);
    opacity: 0.08;
    z-index: 0;
    line-height: 1;
}

.testimonial-card>* {
    position: relative;
    z-index: 1;
}

.faq-item {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
}

.faq-item summary {
    cursor: pointer;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary svg {
    transition: transform 0.3s ease;
}

.faq-item[open] summary svg {
    transform: rotate(180deg);
}

.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pricing-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--card-bg-solid);
    box-shadow: var(--card-shadow);
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.pricing-card-popular {
    position: relative;
    border: 2px solid transparent;
    color: white !important;
}

.pricing-card-popular::before {
    content: "";
    position: absolute;
    inset: -4px;
    z-index: -1;
    border-radius: 1.2rem;
    background: radial-gradient(circle at top left,
            var(--hero-gradient-start),
            transparent 70%),
        radial-gradient(circle at bottom right,
            var(--hero-gradient-end),
            transparent 70%);
    filter: blur(12px);
    opacity: 0.7;
    animation: breathing-glow 5s ease-in-out infinite;
}

@keyframes breathing-glow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}


.site-footer {
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--header-border);
}

.footer-shape {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 200%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 123, 255, 0.1), transparent 50%);
    animation: footer-glow 10s ease-in-out infinite;
    z-index: 0;
}

@keyframes footer-glow {
    0% {
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translateX(-50%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) scale(1);
        opacity: 0.8;
    }
}

.footer-content {
    position: relative;
    z-index: 1;
}

/* --- Lógica para mostrar/ocultar logos por tema --- */
.logo-container img {
    max-height: 70px;
}

html[data-theme="dark"] .logo-light {
    display: none;
}

html[data-theme="dark"] .logo-dark {
    display: inline-block;
}

html[data-theme="light"] .logo-light {
    display: inline-block;
}

html[data-theme="light"] .logo-dark {
    display: none;
}

.scanner {}

/* --- Estilos para el preloader del video --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}

#preloader video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.large {
    object-fit: contain;
}

.phone-mockup {
    transition: transform 0.1s ease-out;
    perspective: 1000px;
}

.phone-mockup:hover {
    box-shadow: 0 20px 80px rgba(45, 212, 191, 0.3);
}

/* Animación de pulso personalizada para las barras del mockup */
@keyframes pulse-slate {

    0%,
    100% {
        background-color: rgba(51, 65, 85, 0.5);
    }

    50% {
        background-color: rgba(51, 65, 85, 0.8);
    }
}

.animate-pulse-custom {
    animation: pulse-slate 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --- Estilos para los Mockups UI (Simulación de Interfaz) --- */
.ui-mockup-container {
    perspective: 1000px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* El "Celular" base */
.mockup-phone {
    width: 200px;
    height: 400px;
    background: var(--background-color);
    border: 8px solid var(--text-color);
    /* El borde cambia con el tema */
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: all 0.5s ease;
}

/* La "Isla dinámica" o notch */
.mockup-phone::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 15px;
    background: var(--text-color);
    border-radius: 10px;
    z-index: 20;
}

/* Ventanas flotantes (Estilo Email/Widget) */
.mockup-window {
    background: var(--card-bg-solid);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: absolute;
    transition: all 0.3s ease;
}

/* Efecto de escaneo láser */
.laser-scan {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #2DD4BF;
    box-shadow: 0 0 10px #2DD4BF, 0 0 20px #2DD4BF;
    animation: scanDown 2s infinite linear;
    z-index: 10;
}

@keyframes scanDown {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Chat Bubbles animadas */
.chat-bubble {
    padding: 10px 15px;
    border-radius: 15px;
    margin-bottom: 10px;
    max-width: 80%;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(20px);
    animation: popUpMessage 0.5s forwards;
}

@keyframes popUpMessage {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- ESCENA VISUAL DE IMPACTO --- */

.scene-container {
    position: relative;
    /* Ajusta la escala si se ve muy grande en pantallas medianas */
    transform: scale(0.9);
}

/* El Teléfono Central */
.mockup-phone {
    width: 240px;
    /* Un poco más ancho para mejor visualización */
    height: 480px;
    background: #1e293b;
    /* Color del chasis */
    border: 10px solid #1e293b;
    border-radius: 40px;
    box-shadow:
        0 0 0 2px #334155,
        /* Borde exterior sutil */
        0 25px 50px -12px rgba(0, 0, 0, 0.5);
    /* Sombra profunda */
    overflow: hidden;
}

/* La "Isla Dinámica" (Notch) */
.mockup-phone::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: #0f172a;
    border-radius: 12px;
    z-index: 50;
}

/* Clases de Cristal (Glassmorphism) */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    /* Muy sutil en dark mode */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- ANIMACIONES DE FLOTACIÓN (ORBITA) --- */

@keyframes float-slow {

    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0px);
    }

    50% {
        transform: translate(-50%, -50%) translateY(-15px);
    }
}

@keyframes float-medium {

    0%,
    100% {
        transform: translateY(0px) rotate(-5deg);
    }

    50% {
        transform: translateY(-20px) rotate(0deg);
    }
}

@keyframes float-fast {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes float-reverse {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(12px);
    }
}

.animate-float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

.animate-float-medium {
    animation: float-medium 5s ease-in-out infinite;
}

.animate-float-fast {
    animation: float-fast 4s ease-in-out infinite;
}

.animate-float-reverse {
    animation: float-reverse 7s ease-in-out infinite;
}

/* --- ESCENA DE IMPACTO MEJORADA --- */

/* Perspectiva para el efecto 3D */
.perspective-1200 {
    perspective: 1200px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

/* El Teléfono Central: Ahora con ILUMINACIÓN propia */
.mockup-phone {
    width: 260px;
    height: 520px;
    background: #1e293b;
    /* Color chasis oscuro */
    border: 8px solid #1e293b;
    border-radius: 45px;
    /* Sombra multicapa para profundidad y glow */
    box-shadow:
        0 0 0 2px #334155 inset,
        /* Borde interno */
        0 30px 60px -15px rgba(0, 0, 0, 0.6),
        /* Sombra de profundidad */
        0 0 40px -5px rgba(99, 102, 241, 0.3);
    /* Glow Índigo sutil */
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

/* Clase específica para el brillo intenso del teléfono */
.glowing-phone {
    /* En modo oscuro, el glow es más intenso */
    box-shadow:
        0 0 0 2px #334155 inset,
        0 40px 70px -15px rgba(0, 0, 0, 0.7),
        0 0 60px -10px rgba(99, 102, 241, 0.5),
        /* Glow Índigo principal */
        0 0 100px 0px rgba(45, 212, 191, 0.2);
    /* Glow Turquesa secundario */
}

html[data-theme="light"] .glowing-phone {
    /* En modo claro, el glow es más sutil y cálido/azul */
    background: #f1f5f9;
    /* Chasis claro */
    border-color: #f1f5f9;
    box-shadow:
        0 0 0 2px #e2e8f0 inset,
        0 30px 60px -20px rgba(0, 0, 0, 0.2),
        0 0 50px -10px rgba(59, 130, 246, 0.4),
        /* Glow Azul */
        0 0 80px -20px rgba(245, 158, 11, 0.2);
    /* Glow Ámbar */
}


/* Isla Dinámica (Notch) */
.mockup-phone::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 24px;
    background: #0f172a;
    border-radius: 14px;
    z-index: 50;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) inset;
}

html[data-theme="light"] .mockup-phone::after {
    background: #e2e8f0;
}


/* --- GLASSMORPHISM MEJORADO (Más cristal, menos plástico) --- */
.glass-card {
    /* Fondo muy translúcido para que pase la luz */
    background: rgba(30, 41, 59, 0.2);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    /* Bordes brillantes y sutiles */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

html[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    /* Al pasar el mouse, se vuelven más nítidos */
    backdrop-filter: blur(20px) saturate(200%);
    background: rgba(30, 41, 59, 0.3);
    transform: translateY(-5px) scale(1.02) !important;
    /* Sobreescribe la animación de flotar */
    box-shadow: 0 25px 45px -10px rgba(0, 0, 0, 0.5);
}


/* --- NUEVAS ANIMACIONES --- */

/* Flujo de datos en las líneas SVG */
.animate-dash-flow {
    stroke-dasharray: 5, 5;
    animation: dashFlow 20s linear infinite;
}

@keyframes dashFlow {
    from {
        stroke-dashoffset: 200;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* Escáner en el QR */
.animate-scan-down {
    animation: scanDown 2.5s ease-in-out infinite;
}

@keyframes scanDown {

    0%,
    100% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    50% {
        top: 100%;
        opacity: 1;
    }

    90% {
        opacity: 0;
    }
}

/* Brillo que pasa por el botón */
.animate-shine-slow {
    animation: shineMove 4s ease-in-out infinite;
    transform: translateX(-100%) skewX(-15deg);
}

@keyframes shineMove {
    0% {
        transform: translateX(-100%) skewX(-15deg);
    }

    50%,
    100% {
        transform: translateX(200%) skewX(-15deg);
    }
}

/* Brillo rápido para notificaciones */
.animate-shine-fast {
    animation: shineMoveFast 3s ease-in-out infinite;
    transform: translateX(-100%);
}

@keyframes shineMoveFast {

    0%,
    50% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}


/* Pulso lento para el halo de fondo */
.animate-pulse-slow {
    animation: pulseSlow 6s ease-in-out infinite;
}

@keyframes pulseSlow {

    0%,
    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}


/* MANTENEMOS LAS ANIMACIONES DE FLOTACIÓN ANTERIORES */
@keyframes float-slow {

    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0px) rotate(0deg);
    }

    50% {
        transform: translate(-50%, -50%) translateY(-12px) rotate(1deg);
    }
}

/* ... (mantén float-medium, float-fast, float-reverse del código anterior) ... */

/* --- ESTILO PREMIUM DARK MODE (Inspirado en tus imágenes) --- */

/* 1. El Resplandor Ambiental (Backlight) */
.ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(168, 85, 247, 0.2) 40%, rgba(0, 0, 0, 0) 70%);
    filter: blur(60px);
    z-index: 0;
    animation: pulse-glow 8s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* 2. El Teléfono "Ultra-Sleek" */
.premium-phone {
    width: 280px;
    height: 560px;
    background: #0f172a;
    /* Fondo muy oscuro */
    border: 6px solid #1e293b;
    /* Borde metálico oscuro */
    border-radius: 45px;
    position: relative;
    z-index: 10;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        /* Brillo interno borde */
        0 50px 100px -20px rgba(0, 0, 0, 0.8);
    /* Sombra profunda */
    overflow: hidden;
}

/* 3. Tarjetas de Cristal "Frosted" (Exactas a la ref) */
.premium-glass {
    background: rgba(15, 23, 42, 0.6);
    /* Fondo oscuro semitransparente */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Borde sutil */
    border-radius: 24px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.premium-glass:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px) scale(1.02);
}

/* UI Interna: Botones tipo "Píldora" */
.ui-pill {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ui-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

/* Animación de flotación suave */
.float-y {
    animation: floatY 6s ease-in-out infinite;
}

.float-y-delayed {
    animation: floatY 7s ease-in-out infinite 1s;
}

.float-y-reverse {
    animation: floatY 8s ease-in-out infinite 2s reverse;
}

@keyframes floatY {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* --- ESCENA DE IMPACTO MEJORADA --- */

/* Perspectiva para el efecto 3D */
.perspective-1200 {
    perspective: 1200px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

/* El Teléfono Central: Ahora con ILUMINACIÓN propia */
.mockup-phone {
    width: 260px;
    height: 520px;
    background: #1e293b;
    /* Color chasis oscuro */
    border: 8px solid #1e293b;
    border-radius: 45px;
    /* Sombra multicapa para profundidad y glow */
    box-shadow:
        0 0 0 2px #334155 inset,
        /* Borde interno */
        0 30px 60px -15px rgba(0, 0, 0, 0.6),
        /* Sombra de profundidad */
        0 0 40px -5px rgba(99, 102, 241, 0.3);
    /* Glow Índigo sutil */
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

/* Clase específica para el brillo intenso del teléfono */
.glowing-phone {
    /* En modo oscuro, el glow es más intenso */
    box-shadow:
        0 0 0 2px #334155 inset,
        0 40px 70px -15px rgba(0, 0, 0, 0.7),
        0 0 60px -10px rgba(99, 102, 241, 0.5),
        /* Glow Índigo principal */
        0 0 100px 0px rgba(45, 212, 191, 0.2);
    /* Glow Turquesa secundario */
}

html[data-theme="light"] .glowing-phone {
    /* En modo claro, el glow es más sutil y cálido/azul */
    background: #f1f5f9;
    /* Chasis claro */
    border-color: #f1f5f9;
    box-shadow:
        0 0 0 2px #e2e8f0 inset,
        0 30px 60px -20px rgba(0, 0, 0, 0.2),
        0 0 50px -10px rgba(59, 130, 246, 0.4),
        /* Glow Azul */
        0 0 80px -20px rgba(245, 158, 11, 0.2);
    /* Glow Ámbar */
}


/* Isla Dinámica (Notch) */
.mockup-phone::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 24px;
    background: #0f172a;
    border-radius: 14px;
    z-index: 50;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) inset;
}

html[data-theme="light"] .mockup-phone::after {
    background: #e2e8f0;
}


/* --- GLASSMORPHISM MEJORADO (Más cristal, menos plástico) --- */
.glass-card {
    /* Fondo muy translúcido para que pase la luz */
    background: rgba(30, 41, 59, 0.2);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    /* Bordes brillantes y sutiles */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

html[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    /* Al pasar el mouse, se vuelven más nítidos */
    backdrop-filter: blur(20px) saturate(200%);
    background: rgba(30, 41, 59, 0.3);
    transform: translateY(-5px) scale(1.02) !important;
    /* Sobreescribe la animación de flotar */
    box-shadow: 0 25px 45px -10px rgba(0, 0, 0, 0.5);
}


/* --- NUEVAS ANIMACIONES --- */

/* Flujo de datos en las líneas SVG */
.animate-dash-flow {
    stroke-dasharray: 5, 5;
    animation: dashFlow 20s linear infinite;
}

@keyframes dashFlow {
    from {
        stroke-dashoffset: 200;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* Escáner en el QR */
.animate-scan-down {
    animation: scanDown 2.5s ease-in-out infinite;
}

@keyframes scanDown {

    0%,
    100% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    50% {
        top: 100%;
        opacity: 1;
    }

    90% {
        opacity: 0;
    }
}

/* Brillo que pasa por el botón */
.animate-shine-slow {
    animation: shineMove 4s ease-in-out infinite;
    transform: translateX(-100%) skewX(-15deg);
}

@keyframes shineMove {
    0% {
        transform: translateX(-100%) skewX(-15deg);
    }

    50%,
    100% {
        transform: translateX(200%) skewX(-15deg);
    }
}

/* Brillo rápido para notificaciones */
.animate-shine-fast {
    animation: shineMoveFast 3s ease-in-out infinite;
    transform: translateX(-100%);
}

@keyframes shineMoveFast {

    0%,
    50% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}


/* Pulso lento para el halo de fondo */
.animate-pulse-slow {
    animation: pulseSlow 6s ease-in-out infinite;
}

@keyframes pulseSlow {

    0%,
    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}


/* MANTENEMOS LAS ANIMACIONES DE FLOTACIÓN ANTERIORES */
@keyframes float-slow {

    0%,
    100% {
        transform: translate(-50%, -50%) translateY(0px) rotate(0deg);
    }

    50% {
        transform: translate(-50%, -50%) translateY(-12px) rotate(1deg);
    }
}

/* ... (mantén float-medium, float-fast, float-reverse del código anterior) ... */

/* --- ANIMACIONES DE ECOSISTEMA --- */

/* 1. Surcos de Energía (Líneas de conexión) */
.connection-line {
    fill: none;
    stroke: url(#connectionGradient);
    /* Usaremos un gradiente SVG */
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 10, 10;
    /* Línea punteada */
    animation: flowData 20s linear infinite;
    filter: drop-shadow(0 0 3px rgba(45, 212, 191, 0.5));
    /* Glow sutil */
}

@keyframes flowData {
    to {
        stroke-dashoffset: -200;
    }

    /* Hace que los puntos se muevan hacia el centro */
}

/* 2. Animación del Widget de Escáner */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2DD4BF;
    box-shadow: 0 0 10px #2DD4BF, 0 0 20px #2DD4BF;
    animation: scanning 2s ease-in-out infinite;
}

@keyframes scanning {
    0% {
        top: 10%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 90%;
        opacity: 0;
    }
}

/* 3. Animación de Gráficas (Barras creciendo) */
.bar-grow {
    animation: growUp 3s ease-out infinite alternate;
    transform-origin: bottom;
}

@keyframes growUp {
    0% {
        transform: scaleY(0.5);
    }

    100% {
        transform: scaleY(1);
    }
}

/* 4. Animación de Chat (Typing dots) */
.typing-dot {
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* 5. Animación de Tarjeta NFC (Brillo metálico) */
.shine-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    animation: shineCard 4s infinite;
}

@keyframes shineCard {

    0%,
    50% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* 6. Animación de Notificación (Bounce) */
.notification-badge {
    animation: bounceBadge 2s infinite;
}

@keyframes bounceBadge {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

/* Estilos base para posicionamiento */
.orbit-widget {
    position: absolute;
    z-index: 20;
    transition: all 0.3s ease;
}

.orbit-widget:hover {
    z-index: 50;
    transform: scale(1.05);
}

lass-card {
    /* Base (se sobrescribe abajo según tema) */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

html[data-theme="light"] .glass-card {
    /* MODO CLARO: Tarjeta "Física" y Limpia */
    background: rgba(255, 255, 255, 0.95); /* Casi opaco */
    border: 1px solid rgba(0, 0, 0, 0.08); /* Borde gris sutil */
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05), 
        0 10px 15px -3px rgba(0, 0, 0, 0.05); /* Sombra elegante */
}

html[data-theme="dark"] .glass-card {
    /* MODO OSCURO: Cristal Brillante */
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 0 transparent; /* Sin sombra externa negra, usamos glow en elementos */
}

/* Hover Effects */
html[data-theme="light"] .glass-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: rgba(79, 70, 229, 0.3); /* Borde índigo al hover */
}

/* SURCOS (Líneas) - Grosor y Color */
.connection-line {
    fill: none;
    stroke: url(#connectionGradient); 
    stroke-width: 2.5px; /* Más grueso para verse mejor */
    stroke-linecap: round;
    stroke-dasharray: 6, 6; /* Punteado más cerrado */
    animation: flowData 30s linear infinite;
}