/* ─────────────────────────────────────────────────────────────────────────────
   CYKLboard Lista de Espera — style.css
   Diseño: dark premium, glassmorphism, micro-animaciones
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Reset & Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --c-bg: #050A12;
    --c-surface: rgba(255, 255, 255, 0.04);
    --c-surface2: rgba(255, 255, 255, 0.08);
    --c-border: rgba(255, 255, 255, 0.10);
    --c-accent: #E8FF00;
    /* neon yellow */
    --c-accent2: #7B2FBE;
    /* violeta */
    --c-accent3: #FF4081;
    /* magenta */
    --c-gold: #FFD600;
    /* dorado VIP */
    --c-text: #E8EAF0;
    --c-text-muted: #8892A0;
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Barlow', system-ui, sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--c-bg);
    color: var(--c-text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* ── Fondos decorativos ── */
.bg-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% -10%, rgba(232, 255, 0, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 110%, rgba(123, 47, 190, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(255, 64, 129, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ── Layout ── */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    padding: 48px 24px 64px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ── Header ── */
.site-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.main-logo {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 0 16px rgba(232, 255, 0, 0.4));
    transition: filter var(--transition);
}

.main-logo:hover {
    filter: drop-shadow(0 0 28px rgba(232, 255, 0, 0.7));
}

.powered-by {
    font-size: 0.78rem;
    color: var(--c-text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.powered-by span {
    color: var(--c-accent);
    font-weight: 700;
}

.powered-by span a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}

.powered-by span a:hover {
    border-bottom-color: var(--c-accent);
}

/* ── Hero ── */
.hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(232, 255, 0, 0.10);
    border: 1px solid rgba(232, 255, 0, 0.25);
    color: var(--c-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 99px;
    animation: fadeDown 0.6s ease both;
}

h1 {
    font-size: clamp(2rem, 6vw, 3.4rem);
    font-weight: 900;
    font-style: italic;
    line-height: 1.0;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, var(--c-accent) 50%, var(--c-accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeUp 0.7s 0.1s ease both;
    text-wrap: balance;
}

.subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    color: var(--c-text-muted);
    line-height: 1.65;
    max-width: 520px;
    animation: fadeUp 0.7s 0.2s ease both;
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    animation: fadeUp 0.7s 0.3s ease both;
}

.pill {
    background: var(--c-surface2);
    border: 1px solid var(--c-border);
    color: var(--c-text);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 99px;
    letter-spacing: 0.03em;
    transition: background var(--transition), border-color var(--transition);
}

.pill:hover {
    background: rgba(232, 255, 0, 0.08);
    border-color: rgba(232, 255, 0, 0.35);
}

.pill--icon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pill-svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.85;
}

/* ── Form Container ── */
.form-container {
    position: relative;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: calc(var(--radius) + 8px);
    padding: clamp(36px, 5vw, 52px) clamp(28px, 5vw, 48px) clamp(28px, 5vw, 48px);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeUp 0.8s 0.4s ease both;
}

.badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: linear-gradient(135deg, var(--c-gold), #FFA000);
    color: #000;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 99px;
    box-shadow: 0 4px 14px rgba(255, 214, 0, 0.3);
}

h2 {
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.form-subtitle {
    font-size: 0.88rem;
    color: var(--c-text-muted);
    line-height: 1.6;
    margin-top: -8px;
}

/* ── Form ── */
form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--c-text-muted);
    text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--c-text);
    outline: none;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

input::placeholder {
    color: rgba(136, 146, 160, 0.55);
}

input:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

input:focus {
    border-color: var(--c-accent);
    background: rgba(232, 255, 0, 0.04);
    box-shadow: 0 0 0 3px rgba(232, 255, 0, 0.12);
}

input:invalid:not(:placeholder-shown) {
    border-color: var(--c-accent3);
    box-shadow: 0 0 0 3px rgba(255, 64, 129, 0.12);
}

/* ── Campo con error (validación JS) ── */
.input-group.field-error label {
    color: var(--c-accent3);
}

.input-group.field-error input {
    border-color: var(--c-accent3);
    box-shadow: 0 0 0 3px rgba(255, 64, 129, 0.15);
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.field-error-msg {
    font-size: 0.75rem;
    color: var(--c-accent3);
    font-weight: 600;
    margin-top: 2px;
    display: none;
}

.input-group.field-error .field-error-msg {
    display: block;
}

/* Texto de ayuda visible siempre (hint debajo del campo) */
.field-hint {
    font-size: 0.72rem;
    color: var(--c-text-muted);
    margin-top: 2px;
    line-height: 1.4;
    opacity: 0.75;
}

/* En estado de error el hint se oculta para dar protagonismo al error */
.input-group.field-error .field-hint {
    display: none;
}

/* Remove number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ── Submit Button ── */
.btn-primary {
    position: relative;
    margin-top: 8px;
    width: 100%;
    padding: 18px 28px;
    background: var(--c-accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    overflow: hidden;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 24px rgba(232, 255, 0, 0.25);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.btn-primary:hover:not(:disabled)::before {
    opacity: 1;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(232, 255, 0, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(232, 255, 0, 0.2);
}

.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

/* ── Loading state ── */
.btn-text,
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: absolute;
    inset: 0;
    padding: 18px 28px;
}

/* Static: show text, hide loading */
.btn-primary .btn-text {
    opacity: 1;
    transform: translateY(0);
}

.btn-primary .btn-loading {
    opacity: 0;
    transform: translateY(8px);
}

/* Loading: hide text, show loading */
.btn-primary.loading .btn-text {
    opacity: 0;
    transform: translateY(-8px);
}

.btn-primary.loading .btn-loading {
    opacity: 1;
    transform: translateY(0);
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* ── Form Message ── */
.form-message {
    display: none;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    animation: fadeUp 0.4s ease both;
}

.form-message.success {
    background: rgba(0, 229, 200, 0.10);
    border: 1px solid rgba(0, 229, 200, 0.30);
    color: #00E5C8;
}

.form-message.error {
    background: rgba(255, 64, 129, 0.10);
    border: 1px solid rgba(255, 64, 129, 0.30);
    color: var(--c-accent3);
}

/* ── Footer note ── */
.footer-note {
    font-size: 0.78rem;
    color: var(--c-text-muted);
    text-align: center;
    line-height: 1.6;
    border-top: 1px solid var(--c-border);
    padding-top: 16px;
    margin-top: 4px;
}

.footer-note strong {
    color: var(--c-text);
}

/* ── Product Version Footer ── */
.product-version {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 99px;
    font-size: 0.70rem;
    color: var(--c-text-muted);
    letter-spacing: 0.03em;
}

.version-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: rgba(232, 240, 255, 0.55);
}

/* Punto verde animado — indica sistema activo */
.version-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 0 6px rgba(37, 211, 102, 0.7);
    animation: pulse-dot 2.4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 6px rgba(37, 211, 102, 0.7);
    }

    50% {
        opacity: 0.55;
        box-shadow: 0 0 12px rgba(37, 211, 102, 0.3);
    }
}

.version-tag {
    background: rgba(232, 255, 0, 0.10);
    border: 1px solid rgba(232, 255, 0, 0.20);
    color: var(--c-accent);
    font-family: 'Courier New', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.version-sep {
    opacity: 0.35;
}

.version-build {
    font-family: 'Courier New', monospace;
    font-size: 0.66rem;
    color: rgba(136, 146, 160, 0.6);
    letter-spacing: 0.04em;
}

.version-powered {
    font-size: 0.68rem;
    color: rgba(136, 146, 160, 0.55);
    display: flex;
    align-items: center;
    gap: 4px;
}

.version-powered a {
    color: var(--c-accent);
    text-decoration: none;
    font-weight: 700;
    transition: opacity var(--transition);
}

.version-powered a:hover {
    opacity: 0.75;
}

@media (max-width: 480px) {
    .product-version {
        justify-content: center;
        border-radius: 12px;
        padding: 10px 14px;
    }
}

/* ── Animations ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

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

@keyframes shake {

    10%,
    90% {
        transform: translateX(-2px);
    }

    20%,
    80% {
        transform: translateX(4px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-6px);
    }

    40%,
    60% {
        transform: translateX(6px);
    }
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .container {
        padding: 32px 16px 48px;
        gap: 32px;
    }

    .form-container {
        padding: 24px 20px;
    }

    h1 {
        font-size: 1.9rem;
    }

    .feature-pills {
        gap: 6px;
    }

    .pill {
        font-size: 0.72rem;
        padding: 5px 11px;
    }
}

/* ── Honeypot (trampa anti-bot, invisible para humanos) ── */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ── Captcha Overlay ── */
.captcha-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.captcha-overlay.active {
    opacity: 1;
    visibility: visible;
}

.captcha-modal {
    background: rgba(12, 20, 32, 0.95);
    border: 1px solid rgba(232, 255, 0, 0.20);
    border-radius: calc(var(--radius) + 4px);
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(232, 255, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 24px;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.captcha-overlay.active .captcha-modal {
    transform: translateY(0) scale(1);
}

/* ── Captcha Header ── */
.captcha-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.captcha-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.captcha-header h3 {
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--c-text);
    margin: 0;
}

.captcha-header p {
    font-size: 0.78rem;
    color: var(--c-text-muted);
    margin: 4px 0 0;
}

/* ── Resumen de datos ── */
.captcha-summary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.captcha-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.captcha-row span {
    color: var(--c-text-muted);
    flex-shrink: 0;
}

.captcha-row strong {
    color: var(--c-text);
    font-weight: 700;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

/* ── Reto matemático ── */
.captcha-challenge {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.captcha-label {
    font-size: 0.80rem;
    color: var(--c-text-muted);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.captcha-math {
    font-size: 2rem;
    font-weight: 900;
    font-style: italic;
    color: var(--c-accent);
    letter-spacing: -0.02em;
    text-align: center;
    padding: 16px;
    background: rgba(232, 255, 0, 0.06);
    border: 1px solid rgba(232, 255, 0, 0.18);
    border-radius: var(--radius-sm);
}

.captcha-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-family: var(--font);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-text);
    text-align: center;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: textfield;
    -moz-appearance: textfield;
}

.captcha-input::-webkit-inner-spin-button,
.captcha-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
}

.captcha-input:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px rgba(232, 255, 0, 0.12);
}

.captcha-error {
    font-size: 0.82rem;
    color: var(--c-accent3);
    font-weight: 600;
    min-height: 1.2em;
    text-align: center;
}

/* ── Acciones del modal ── */
.captcha-actions {
    display: flex;
    gap: 10px;
}

.btn-captcha-cancel {
    flex: 1;
    padding: 13px;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    color: var(--c-text-muted);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.btn-captcha-cancel:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--c-text);
    background: rgba(255, 255, 255, 0.04);
}

.btn-captcha-confirm {
    flex: 2;
    padding: 13px;
    background: var(--c-accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #000;
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 20px rgba(232, 255, 0, 0.25);
}

.btn-captcha-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(232, 255, 0, 0.40);
}

.btn-captcha-confirm:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .captcha-modal {
        padding: 24px 20px;
    }

    .captcha-math {
        font-size: 1.6rem;
    }

    .captcha-actions {
        flex-direction: column;
    }
}