        /* =========================================
           VARIABLES DE COLOR (TEMA)
           ========================================= */
        :root {

            /* MODO CLARO */
            --bg-body: #f7f7f7;
            --bg-card: rgba(255, 255, 255, 0.92);
            --bg-input: rgba(255, 255, 255, 0.6);
            --text-main: #333333;
            --text-label: #6B7280;
            --border-color: rgba(17, 29, 53, 0.15);
            /* Borde azul muy suave para modo claro */
            --divider-soft: rgba(0, 0, 0, 0.05);
            /* Línea muy suave tipo footer */
            --primary-color: #111D35;
            --accent-color: #111D35;
            --shadow-color: rgba(0, 0, 0, 0.12);
            --header-text: #212529;
            --info-bg: rgba(230, 244, 234, 0.8);
            --info-text: #1e4620;
            --info-border: rgba(198, 231, 208, 0.8);

            /* Toggle Light (Grey & Dark Blue #111D35) */
            --toggle-bg: #F3F4F6;
            --toggle-border: #E5E7EB;
            --toggle-icon-inactive: #6B7280;
            --toggle-icon-active: #FFFFFF;
            --toggle-bg-active: #111D35;
            --toggle-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);

            /* Chevron Light (SVG encoded color #333) */
            --chevron-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            --bg-overlay: rgba(17, 29, 53, 0.75);
            /* Overlay azul para contraste con video claro */
            --button-text: #FFFFFF;
            /* Texto blanco en botón oscuro */
        }

        /* MODO OSCURO */
        body.dark-mode {
            --bg-body: #111D35;
            --bg-card: rgba(17, 29, 53, 0.85);
            /* Azul corporativo translúcido en lugar de negro/gris */
            --bg-input: rgba(255, 255, 255, 0.06);
            /* Input sutilmente más claro sobre el azul */
            --text-main: #f0f6fc;
            --text-label: #a8b8d0;
            /* Gris azulado para etiquetas */
            --border-color: rgba(255, 255, 255, 0.18);
            /* Un poco más de contraste en la línea en dark mode */
            --divider-soft: rgba(255, 255, 255, 0.1);
            /* Línea muy suave tipo footer dark */
            --primary-color: #FDC107;
            /* Updated as requested */
            --accent-color: #FDC107;
            --shadow-color: rgba(0, 0, 0, 0.5);
            --header-text: #ffffff;
            --info-bg: rgba(253, 193, 7, 0.15);
            --info-text: #FDC107;
            --info-border: rgba(253, 193, 7, 0.3);
            /* Toggle Dark (Dark & Yellow #FDC107) */
            --toggle-bg: rgba(0, 0, 0, 0.25);
            --toggle-border: rgba(255, 255, 255, 0.15);
            --toggle-icon-inactive: #8b949e;
            --toggle-icon-active: #111D35;
            /* Dark Blue icon on Yellow */
            --toggle-bg-active: #FDC107;
            --toggle-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);

            /* Chevron Dark (SVG encoded color #FFF) */
            --chevron-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
            --bg-overlay: rgba(17, 29, 53, 0.85);
            /* Overlay azul oscuro para modo dark */
            --button-text: #111D35;
            /* Texto azul oscuro en botón amarillo */
        }

        body.dark-mode #validation-section h2 {
            color: var(--primary-color);
        }

        /* =========================================
           ESTILOS GENERALES
           ========================================= */
        body {
            font-family: 'Inter', sans-serif;
            margin: 0;
            padding: 0;
            color: var(--text-main);
            background-color: var(--bg-body);
            display: flex;
            justify-content: center;
            align-items: flex-start;
            min-height: 100vh;
            transition: background-color 0.3s, color 0.3s;
        }

        body.has-video {
            background-color: transparent !important;
        }

        .container {
            position: relative;
            z-index: 1;
            background-color: var(--bg-card);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--border-color);
            border-radius: 16px;
            box-shadow: 0 16px 40px var(--shadow-color);
            margin: 40px auto;
            max-width: 600px;
            width: 95%;
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            animation: floatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            opacity: 0;
            transform: translateY(30px);
        }

        @keyframes floatIn {
            0% {
                opacity: 0;
                transform: translateY(40px) scale(0.98);
            }

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

        .card-image-banner {
            height: 140px;
            width: 100%;
            background-image: url('img/fondo.jpg');
            background-size: cover;
            background-position: center;
        }

        .form-content {
            padding: 30px;
        }

        .internal-header {
            display: flex;
            align-items: center;
            margin-bottom: 30px;
        }

        .internal-header img {
            height: 75px;
            /* Más grande como solicitado */
            margin-right: 15px;
            transition: all 0.3s ease;
        }

        /* Quitamos el filtro ya que cambiaremos el archivo src mediante JS para máxima calidad */
        body.dark-mode .internal-header img {
            filter: none;
        }

        .internal-header h1 {
            font-size: 24px;
            font-weight: 700;
            margin: 0;
            color: var(--header-text);
        }

        h2 {
            font-size: 20px;
            font-weight: 600;
            margin-top: 0;
            margin-bottom: 20px;
            color: var(--header-text);
        }

        h3 {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-label);
            margin-top: 40px;
            margin-bottom: 20px;
            text-transform: uppercase;
            letter-spacing: 1px;
            display: flex;
            align-items: center;
        }

        h3::after {
            content: "";
            flex: 1;
            height: 1px;
            background: var(--border-color);
            margin-left: 15px;
            opacity: 0.5;
        }

        /* FORMULARIOS */
        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-label);
            margin-bottom: 8px;
        }

        input[type="text"],
        input[type="email"],
        select {
            width: 100%;
            padding: 12px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 15px;
            box-sizing: border-box;
            background-color: var(--bg-input);
            color: var(--text-main);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }

        input:focus,
        select:focus {
            outline: none;
            border-color: var(--accent-color);
            box-shadow: 0 8px 16px rgba(17, 29, 53, 0.1);
            transform: translateY(-2px);
            background-color: var(--bg-card);
        }

        /* --- STYLING DEL SELECT (CHEVRON CUSTOM) --- */
        select {
            appearance: none;
            /* Quita la flecha por defecto */
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: var(--chevron-icon);
            background-repeat: no-repeat;
            background-position: right 14px center;
            background-size: 16px;
            padding-right: 40px;
            /* Espacio para que el texto no toque la flecha */
            cursor: pointer;
        }

        input[readonly] {
            opacity: 0.7;
            cursor: not-allowed;
            background-color: rgba(0, 0, 0, 0.05);
        }

        /* BOTONES */
        button {
            background: var(--primary-color);
            color: var(--button-text);
            padding: 14px 20px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            width: 100%;
            margin-top: 30px;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(17, 29, 53, 0.2);
        }

        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(17, 29, 53, 0.35);
            filter: brightness(1.1);
        }

        button:active {
            transform: translateY(1px);
            box-shadow: 0 2px 4px rgba(17, 29, 53, 0.2);
            filter: brightness(0.95);
        }

        /* --- UI POLISH: LOADING & SUCCESS STATES --- */
        .btn-loading {
            position: relative;
            color: transparent !important;
            pointer-events: none;
        }

        .btn-loading::after {
            content: "";
            position: absolute;
            width: 20px;
            height: 20px;
            top: 50%;
            left: 50%;
            margin-top: -10px;
            margin-left: -10px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 0.6s linear infinite;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .success-checkmark {
            width: 80px;
            height: 80px;
            margin: 0 auto 30px;
            display: none;
            opacity: 0;
            transform: scale(0.8) translateY(10px);
            transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .success-checkmark.active {
            display: block;
            opacity: 1;
            transform: scale(1) translateY(0);
        }

        .success-checkmark svg circle {
            stroke-dasharray: 166;
            stroke-dashoffset: 166;
            stroke-width: 2;
            stroke-miterlimit: 10;
            stroke: var(--primary-color);
            fill: none;
            animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
        }

        .success-checkmark svg path {
            transform-origin: 50% 50%;
            stroke-dasharray: 48;
            stroke-dashoffset: 48;
            animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
        }

        @keyframes stroke {
            100% {
                stroke-dashoffset: 0;
            }
        }

        /* --- CONTENT HIERARCHY & TRANSITIONS --- */
        .fade-slide-in {
            animation: fadeSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        @keyframes fadeSlideIn {
            from {
                opacity: 0;
                transform: translateY(15px);
            }

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

        .card-header-premium {
            text-align: center;
            margin-bottom: 40px;
            border-bottom: 1px solid var(--divider-soft);
            padding-bottom: 20px;
        }

        .validation-message-refined {
            margin-top: 15px;
            padding: 12px;
            border-radius: 8px;
            font-size: 14px;
            display: none;
            text-align: center;
            animation: fadeIn 0.3s ease;
        }

        .voucher-info-card {
            background: rgba(253, 193, 7, 0.1);
            border-left: 4px solid var(--primary-color);
            padding: 20px;
            border-radius: 12px;
            margin-bottom: 35px;
            display: none;
            animation: fadeSlideIn 0.8s ease;
        }

        .voucher-info-card p {
            margin: 0;
            font-size: 15px;
            font-weight: 500;
        }

        button:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            background-color: rgba(0, 0, 0, 0.05);
        }

        /* MENSAJES */
        .message {
            margin-top: 20px;
            padding: 15px;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 500;
            display: flex;
            align-items: center;
        }

        .message.error {
            background-color: #fef2f2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }

        .message.success {
            background-color: #f0fdf4;
            color: #166534;
            border: 1px solid #bbf7d0;
        }

        .message::before {
            margin-right: 10px;
            font-size: 18px;
        }

        .message.error::before {
            content: '❌';
        }

        .message.success::before {
            content: '✅';
        }

        #fixedAccessMessage {
            margin-top: 25px;
            background-color: var(--info-bg);
            color: var(--info-text);
            border: 1px solid var(--info-border);
        }

        #fixedAccessMessage::before {
            content: 'ℹ️';
        }

        /* SECCIONES OCULTAS */
        #registration-details,
        #dynamicOptionsSection,
        .zone-select,
        .fixed-zone-text,
        #fixedAccessMessage {
            display: none;
        }

        /* LISTA DE ETAPAS */
        #stagesList {
            background: var(--bg-card);
            border: 1px solid var(--border-color);
            border-radius: 10px;
            overflow: hidden;
        }

        .stage-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 15px 20px;
            border-bottom: 1px solid var(--border-color);
            transition: background-color 0.2s;
        }

        .stage-row:last-child {
            border-bottom: none;
        }

        .stage-row:hover {
            background-color: rgba(0, 0, 0, 0.03);
        }

        .stage-left-group {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .stage-check {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: var(--primary-color);
        }

        .stage-left-group label {
            margin-bottom: 0;
            font-size: 15px;
            font-weight: 500;
            color: var(--text-main);
            cursor: pointer;
        }

        .zone-select {
            width: auto;
            min-width: 140px;
        }

        .fixed-zone-text {
            display: none;
            padding: 8px 16px;
            background-color: rgba(0, 0, 0, 0.05);
            color: var(--text-label);
            border-radius: 30px;
            font-size: 13px;
            font-weight: 600;
            border: 1px solid var(--border-color);
            text-align: center;
            min-width: 120px;
        }

        /* =========================================
           SELECTOR DE TEMA - DISEÑO CORREGIDO
           ========================================= */
        .theme-toggle-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1000;

            /* Fondo y borde */
            background-color: var(--toggle-bg);
            border: 1px solid var(--toggle-border);
            box-shadow: var(--toggle-shadow);

            /* Forma de cápsula */
            border-radius: 9999px;
            /* Pill total */

            /* Layout FLEX ajustado sin espacio extra */
            display: inline-flex;
            align-items: center;

            /* Padding mínimo para que el círculo casi toque el borde */
            padding: 2px;

            /* Reset de altura de línea para evitar espacio fantasma */
            line-height: 0;

            gap: 2px;
            /* Pequeña separación entre botones */
            transition: all 0.3s ease;
        }

        .theme-toggle-input {
            display: none;
        }

        .theme-toggle-label {
            /* Dimensiones fijas para círculo perfecto */
            width: 28px;
            height: 28px;

            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;

            color: var(--toggle-icon-inactive);
            transition: all 0.2s ease;

            /* Override global label style */
            margin-bottom: 0;

            /* Evitar selección de texto */
            user-select: none;
            -webkit-user-select: none;
        }

        .theme-toggle-label:hover {
            color: var(--text-main);
            background-color: rgba(255, 255, 255, 0.05);
        }

        .theme-toggle-icon {
            width: 14px;
            height: 14px;
            fill: none;
            /* Iconos de línea */
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            display: block;
            /* Elimina espacio debajo del SVG */
        }

        /* Estado Activo: Círculo Azul Lleno */
        .theme-toggle-input:checked+.theme-toggle-label {
            background-color: var(--toggle-bg-active);
            color: var(--toggle-icon-active);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
        }

        /* =========================================
   MEDIA QUERIES (MOBILE)
   ========================================= */
        @media (max-width: 480px) {
            .container {
                margin: 20px auto;
                width: 92%;
            }

            .form-content {
                padding: 20px;
            }

            .internal-header h1 {
                font-size: 20px;
            }

            .stage-row {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .stage-left-group {
                width: 100%;
                margin-bottom: 5px;
            }

            .zone-select {
                width: 100%;
                min-width: unset;
            }

            button {
                width: 100%;
            }
        }

        /* Video background container */
        .video-background {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            z-index: -2;
            pointer-events: none;
        }

        .video-background iframe {
            position: absolute;
            top: 50%;
            left: 50%;
            width: 100vw;
            height: 56.25vw;
            /* 16:9 Aspect Ratio */
            min-height: 100vh;
            min-width: 177.77vh;
            /* 16:9 Aspect Ratio */
            transform: translate(-50%, -50%) scale(1.2);
            /* Zoom más agresivo para eliminar bandas negras residuales al 100% */
            border: none;
        }

        /* Dark blue overlay */
        .video-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg-overlay);
            z-index: -1;
            pointer-events: none;
            transition: background 0.5s ease;
        }