/* --- TODO TU CÓDIGO ORIGINAL SE MANTIENE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-1: #050816;
    --bg-2: #0a1024;
    --card: rgba(14, 20, 40, 0.88);
    --line: rgba(72, 255, 191, 0.18);
    --primary: #2bffb2;
    --primary-2: #17d78f;
    --text: #f4f7fb;
    --muted: #9aa7c2;
    --input: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.08);
    --danger: #10192f;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(43, 255, 178, 0.10), transparent 28%),
        radial-gradient(circle at top right, rgba(0, 183, 255, 0.10), transparent 26%),
        linear-gradient(135deg, var(--bg-1), var(--bg-2));
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.bg-effects span {
    position: absolute;
    width: 3px;
    height: 220px;
    background: linear-gradient(to bottom, transparent, #2bffb2, transparent);
    opacity: 0.35;
    filter: blur(0.3px);
    animation: pulse 2.8s infinite ease-in-out;
}

.bg-effects span:nth-child(1) { left: 8%; top: 18%; }
.bg-effects span:nth-child(2) { left: 18%; top: 28%; height: 160px; animation-delay: .3s; }
.bg-effects span:nth-child(3) { right: 18%; top: 24%; height: 180px; animation-delay: .6s; }
.bg-effects span:nth-child(4) { right: 10%; top: 16%; animation-delay: .9s; }
.bg-effects span:nth-child(5) { left: 50%; top: 70%; height: 120px; animation-delay: 1.2s; }

@keyframes pulse {
    0%, 100% { opacity: 0.2; transform: scaleY(0.9); }
    50% { opacity: 0.8; transform: scaleY(1.08); }
}

.topbar {
    width: 100%;
    padding: 20px 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(5, 8, 22, 0.45);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
}

.brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
}

.support-btn {
    text-decoration: none;
    color: #04110d;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 8px 25px rgba(43, 255, 178, 0.25);
}

.support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(43, 255, 178, 0.35);
}

.main-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

.card {
    width: 100%;
    max-width: 520px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 34px 28px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top center, rgba(43, 255, 178, 0.14), transparent 35%);
    pointer-events: none;
}

.logo-box {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.logo-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 800;
    color: #05110d;
    background: linear-gradient(135deg, var(--primary), #6fffff);
    box-shadow: 0 12px 30px rgba(43, 255, 178, 0.22);
}

.card h1 {
    text-align: center;
    font-size: 34px;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 28px;
}

.form-box {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #d8e3f8;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 15px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--input);
    color: var(--text);
    outline: none;
    font-size: 15px;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.submit-btn {
    margin-top: 6px;
    border: none;
    border-radius: 14px;
    padding: 15px 18px;
    font-size: 16px;
    font-weight: 800;
    color: #04110d;
    cursor: pointer;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    transition: transform .2s ease, box-shadow .2s ease;
    box-shadow: 0 10px 30px rgba(43, 255, 178, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer {
    padding: 18px 20px 26px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    position: relative;
    z-index: 2;
}

/* --- MEJORAS DE CARGA Y ANIMACIÓN (Añade esto al final) --- */

.loader {
    width: 18px;
    height: 18px;
    border: 3px solid #04110d;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden { display: none; }

.resultado.success {
    border-color: var(--primary);
    background: rgba(43, 255, 178, 0.05);
}

.resultado.error {
    border-color: #ff4b4b;
    background: rgba(255, 75, 75, 0.05);
}

.codigo-grande {
    display: block;
    font-size: 38px !important;
    letter-spacing: 5px;
    text-shadow: 0 0 20px var(--primary);
    margin-top: 10px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-up {
    animation: slideUp 0.4s ease-out forwards;
}

/* Estilo para las opciones del select */
select option {
    background: #182038;
    color: #ffffff;
}

/* Posicionamiento sutil del ojito de contraseña */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px; /* Deja un espacio para que el texto no pise el ojito */
}

.password-wrapper i {
    position: absolute;
    right: 15px; /* Lo pega a la derecha */
    color: #888; /* Color gris sutil */
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-wrapper i:hover {
    color: #00d26a; /* Brilla en verde al pasar el ratón */
}
