:root {
            --glow-color-1: #FF9900;
            --glow-color-2: #B45BFF;
            --glow-color-3: #5B7BFF;
            --bg-dark: #0A0A14;
            --bg-card: #121222;
        }

        html.light {
            --bg-dark: #F1F3F9;
            --bg-card: #FFFFFF;
        }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-dark);
            background-image:
                url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23121222' fill-opacity='0.4'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm-90-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9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10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
            color: #F1F5F9;
            overflow-x: hidden;
        }

        .gradient-text {
            background: linear-gradient(135deg, var(--glow-color-1), var(--glow-color-2), var(--glow-color-3));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .header {
            background-color: rgba(10, 10, 20, 0.8);
        }

        /* Nav: subrayado animado con gradiente; .active lo fija (scroll-spy) */
        .nav-link {
            position: relative;
        }

        .nav-link::after {
            content: '';
            position: absolute;
            left: 0.75rem;
            right: 100%;
            bottom: 0.15rem;
            height: 2px;
            border-radius: 2px;
            background: linear-gradient(90deg, var(--glow-color-1), var(--glow-color-2));
            transition: right 0.25s ease;
        }

        .nav-link:hover::after,
        .nav-link.active::after {
            right: 0.75rem;
        }

        .nav-link.active,
        .mobile-link.active {
            color: #FFFFFF;
        }

        .mobile-link.active {
            background-color: rgba(255, 255, 255, 0.06);
        }

        .glass-card {
            background: rgba(18, 18, 34, 0.6);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 1rem;
            transition: background 0.3s, border-color 0.3s;
        }

        .glass-card:hover {
            background: rgba(25, 25, 45, 0.7);
            border-color: rgba(180, 91, 255, 0.5);
        }

        .gradient-btn {
            background-color: #7C3AED;
            color: #FFFFFF;
            box-shadow: 0 2px 14px 0 rgba(124, 58, 237, 0.35);
            transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
        }

        .gradient-btn:hover {
            background-color: #8B5CF6;
            transform: translateY(-1px);
            box-shadow: 0 4px 18px 0 rgba(139, 92, 246, 0.45);
        }

        .leader-card {
            background-color: var(--bg-card);
            border: 1px solid transparent;
            border-radius: 1rem;
            position: relative;
            overflow: hidden;
            transition: transform 0.3s, border-color 0.3s;
        }

        .leader-card:before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: conic-gradient(from 180deg at 50% 50%, var(--glow-color-2), var(--glow-color-3), var(--glow-color-1), var(--glow-color-2));
            transition: transform 1s;
            opacity: 0;
            z-index: 1;
        }

        .leader-card:hover:before {
            transform: rotate(360deg);
            opacity: 1;
        }

        .leader-card:hover {
            border-color: rgba(180, 91, 255, 0.5);
            transform: translateY(-5px);
        }

        .leader-card .content {
            position: relative;
            z-index: 2;
            background-color: var(--bg-card);
            margin: 2px;
            border-radius: calc(1rem - 2px);
            padding: 1.5rem;
        }

        .event-card .date-box {
            background: linear-gradient(135deg, var(--glow-color-2), var(--glow-color-3));
        }

        /* Timeline */
        .timeline {
            position: relative;
            max-width: 1200px;
            margin: 0 auto;
        }

        .timeline::after {
            content: '';
            position: absolute;
            width: 6px;
            background-color: #27273a;
            top: 0;
            bottom: 0;
            left: 50%;
            margin-left: -3px;
            border-radius: 3px;
        }

        .timeline-container {
            padding: 10px 40px;
            position: relative;
            background-color: inherit;
            width: 50%;
        }

        .timeline-container.left {
            left: 0;
        }

        .timeline-container.right {
            left: 50%;
        }

        /* Responsive timeline */
        @media screen and (max-width: 768px) {
            .timeline::after {
                left: 31px;
            }

            .timeline-container {
                width: 100%;
                padding-left: 70px;
                padding-right: 25px;
            }

            .timeline-container.right {
                left: 0%;
            }

            .timeline-container.left::after,
            .timeline-container.right::after {
                left: 18px;
            }
        }

        .timeline-container::after {
            content: '';
            position: absolute;
            width: 25px;
            height: 25px;
            right: -12px;
            background-color: var(--bg-dark);
            border: 4px solid var(--glow-color-2);
            top: 15px;
            border-radius: 50%;
            z-index: 1;
        }

        .timeline-container.right::after {
            left: -13px;
        }

        .timeline-content {
            padding: 20px 30px;
            position: relative;
            border-radius: 6px;
        }

        /* Flecha volver-arriba: oculta hasta que el usuario scrollea */
        #back-to-top {
            opacity: 0;
            transform: translateY(12px);
            pointer-events: none;
            transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
        }

        #back-to-top.is-visible {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        /* Animation on scroll */
        .animate-on-scroll {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.6s ease-out, transform 0.6s ease-out;
        }

        .animate-on-scroll.is-visible {
            opacity: 1;
            transform: translateY(0);
        }

        .delay-100 {
            transition-delay: 100ms;
        }

        .delay-200 {
            transition-delay: 200ms;
        }

        .delay-300 {
            transition-delay: 300ms;
        }

        .delay-400 {
            transition-delay: 400ms;
        }

        .delay-500 {
            transition-delay: 500ms;
        }

        /* ============ MODO CLARO ============
           Remapea las utilidades de color del tema oscuro.
           El fondo/tarjetas ya cambian via variables (--bg-dark, --bg-card). */
        html.light body {
            background-image: none;
            color: #1E293B;
        }

        html.light .text-white { color: #0F172A; }
        html.light .text-slate-200 { color: #1E293B; }
        html.light .text-slate-300 { color: #334155; }
        html.light .text-gray-300 { color: #334155; }
        html.light .text-slate-400 { color: #475569; }
        html.light .text-slate-500 { color: #64748B; }
        html.light .text-slate-600 { color: #94A3B8; }

        html.light .bg-white\/5 { background-color: rgba(15, 23, 42, 0.04); }
        html.light .bg-white\/10 { background-color: rgba(15, 23, 42, 0.07); }
        html.light .hover\:bg-white\/5:hover { background-color: rgba(15, 23, 42, 0.05); }
        html.light .hover\:bg-white\/10:hover { background-color: rgba(15, 23, 42, 0.08); }
        html.light .hover\:bg-white\/20:hover { background-color: rgba(15, 23, 42, 0.12); }
        html.light .border-white\/5 { border-color: rgba(15, 23, 42, 0.06); }
        html.light .border-white\/10 { border-color: rgba(15, 23, 42, 0.1); }
        html.light .border-white\/15 { border-color: rgba(15, 23, 42, 0.15); }
        html.light .border-white\/20 { border-color: rgba(15, 23, 42, 0.2); }

        html.light .bg-slate-800\/30 { background-color: rgba(15, 23, 42, 0.04); }
        html.light .bg-slate-800\/50 { background-color: rgba(15, 23, 42, 0.06); }
        html.light .bg-slate-900\/40 { background-color: rgba(255, 255, 255, 0.65); }
        html.light .bg-gray-800 { background-color: #FFFFFF; }
        html.light .bg-slate-700 { background-color: #E2E8F0; }
        html.light .hover\:bg-slate-600:hover { background-color: #CBD5E1; }
        html.light .bg-slate-800 { background-color: #E2E8F0; }
        html.light .border-slate-700 { border-color: #D6DEE8; }
        html.light .border-slate-800 { border-color: rgba(15, 23, 42, 0.1); }

        html.light .header {
            background-color: rgba(255, 255, 255, 0.85);
        }

        html.light .glass-card {
            background: rgba(255, 255, 255, 0.75);
            border-color: rgba(15, 23, 42, 0.08);
        }

        html.light .glass-card:hover {
            background: rgba(255, 255, 255, 0.9);
            border-color: rgba(180, 91, 255, 0.5);
        }

        html.light #mobile-menu {
            background: rgba(255, 255, 255, 0.95);
        }

        /* Logos de comunidades diseñados para fondo oscuro: placa oscura en modo claro */
        html.light #ug-list a img {
            background-color: #121222;
        }

        html.light #cloud-clubs-list a img {
            background-color: #121222;
            border-radius: 0.5rem;
            padding: 5px;
        }

        html.light .nav-link.active,
        html.light .mobile-link.active {
            color: #0F172A;
        }

        html.light .mobile-link.active {
            background-color: rgba(15, 23, 42, 0.05);
        }

        html.light .timeline::after {
            background-color: #CBD5E1;
        }

        html.light .timeline-content.bg-slate-800\/80 {
            background: rgba(255, 255, 255, 0.85);
        }

        html.light .text-cyan-300 { color: #0E7490; }
        html.light .hover\:text-cyan-200:hover { color: #155E75; }
        html.light .text-orange-400 { color: #C2570B; }
        html.light .text-purple-300 { color: #7E22CE; }
        html.light .text-purple-400 { color: #7E22CE; }
        html.light .text-blue-400 { color: #1D4ED8; }
        html.light .text-sky-400 { color: #0369A1; }
        html.light .text-emerald-400 { color: #047857; }
        html.light .text-emerald-300 { color: #047857; }
        html.light .text-amber-300 { color: #B45309; }
        html.light .text-green-400 { color: #15803D; }
        html.light .text-blue-500 { color: #1D4ED8; }
        html.light .text-orange-500 { color: #C2570B; }
        html.light .text-orange-300 { color: #C2570B; }

        html.light .hover\:text-white:hover { color: #0F172A; }
        html.light .text-slate-400.hover\:text-white:hover { color: #0F172A; }

        /* ============ RED DE CIRCUITOS EN LA CABECERA ============
           Malla de circuitos (estilo flyer/logo) solo en la parte superior:
           se disuelve hacia abajo (mask) y se desvanece al scrollear (JS ajusta opacity). */
        body {
            position: relative;
        }

        #circuit-bg {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 175vh;
            pointer-events: none;
            z-index: -1;
            opacity: 0.2;
            transition: opacity 0.15s linear;
            background-repeat: repeat;
            background-size: 360px 520px;
            background-position: top center;
            -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 98%);
            mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 98%);
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='520' viewBox='0 0 360 520' fill='none' stroke='%238B5CF6' stroke-width='1'%3E%3Cpath d='M20 0v100l25 25v150l-25 25v220' stroke-linecap='round'/%3E%3Cpath d='M180 0v60' stroke-linecap='round'/%3E%3Ccircle cx='180' cy='68' r='4'/%3E%3Cpath d='M180 76v146' stroke-linecap='round'/%3E%3Cpath d='M180 226l12 7v14l-12 7-12-7v-14z'/%3E%3Cpath d='M180 254v146l20 20v84' stroke-linecap='round'/%3E%3Ccircle cx='200' cy='510' r='4'/%3E%3Cpath d='M320 0v80l-20 20v100' stroke-linecap='round'/%3E%3Ccircle cx='300' cy='208' r='4'/%3E%3Cpath d='M300 216v104l20 20v180' stroke-linecap='round'/%3E%3Cpath d='M45 150h70' stroke-linecap='round'/%3E%3Ccircle cx='123' cy='150' r='4'/%3E%3Cpath d='M230 350h-60' stroke-linecap='round'/%3E%3Ccircle cx='162' cy='350' r='4'/%3E%3Cpath d='M90 50v10m-5-5h10' stroke-linecap='round'/%3E%3Cpath d='M255 115v10m-5-5h10' stroke-linecap='round'/%3E%3Cpath d='M60 355v10m-5-5h10' stroke-linecap='round'/%3E%3Cpath d='M305 445v10m-5-5h10' stroke-linecap='round'/%3E%3Ccircle cx='140' cy='35' r='1.8' fill='%238B5CF6' stroke='none'/%3E%3Ccircle cx='262' cy='60' r='1.8' fill='%238B5CF6' stroke='none'/%3E%3Ccircle cx='35' cy='120' r='1.8' fill='%238B5CF6' stroke='none'/%3E%3Ccircle cx='90' cy='240' r='1.8' fill='%238B5CF6' stroke='none'/%3E%3Ccircle cx='120' cy='300' r='1.8' fill='%238B5CF6' stroke='none'/%3E%3Ccircle cx='345' cy='270' r='1.8' fill='%238B5CF6' stroke='none'/%3E%3Ccircle cx='160' cy='455' r='1.8' fill='%238B5CF6' stroke='none'/%3E%3Ccircle cx='280' cy='490' r='1.8' fill='%238B5CF6' stroke='none'/%3E%3C/svg%3E");
        }

        html.light #circuit-bg {
            opacity: 0.3;
        }

        /* WhatsApp flotante: icono blanco siempre, en ambos temas */
        .wa-float,
        html.light .wa-float {
            color: #FFFFFF;
        }
