*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #00284C;
    --bg-dark: #001a33;
    --accent: #FA7D00;
    --accent-light: #FF9A3C;
    --accent-dark: #E06D00;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-muted: rgba(255, 255, 255, 0.6);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    /* Evita scroll horizontal por las partículas */
    overflow-y: auto;
    /* Permite scroll vertical si el form es más alto que la pantalla */
    padding: 30px 0;
    /* Margen superior e inferior al hacer scroll */
    position: relative;
}

/* Animated background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-animation .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb:nth-child(1) {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: -15%;
    right: -10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.orb:nth-child(2) {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #0055AA, transparent 70%);
    bottom: -10%;
    left: -5%;
    animation-delay: -5s;
    animation-duration: 20s;
}

.orb:nth-child(3) {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-light), transparent 70%);
    top: 50%;
    left: 40%;
    animation-delay: -10s;
    animation-duration: 30s;
    opacity: 0.2;
}

.orb:nth-child(4) {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: 20%;
    left: 10%;
    animation-delay: -7s;
    animation-duration: 22s;
    opacity: 0.25;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(60px, -40px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 60px) scale(0.95);
    }

    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1);
    }
}

/* Layout Wrapper */
.main-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    max-width: 1000px;
    padding: 20px;
    flex-wrap: wrap;
}

/* Info Panel */
.info-panel {
    flex: 1;
    min-width: 320px;
    max-width: 440px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 36px 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(40px);
    position: relative;
    overflow: hidden;
}

.info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

.info-panel h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
    line-height: 1.2;
}

.info-panel .date-text {
    font-size: 16px;
    color: var(--accent-light);
    font-weight: 500;
    margin-bottom: 30px;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px 10px;
    width: 70px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.countdown-item span:first-child {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
}

.countdown-item .label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-panel .info-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Main container */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(40px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form card */
.form-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 36px 32px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Header */
.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-logo 2.5s ease-in-out infinite;
}

.form-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes pulse-logo {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 8px 16px rgba(250, 125, 0, 0.3));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 12px 28px rgba(250, 125, 0, 0.5));
    }
}

.form-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.form-header h1:last-of-type {
    margin-bottom: 8px;
}

.form-header p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Form groups */
.form-group {
    position: relative;
    margin-bottom: 20px;
    animation: fadeInField 0.5s ease forwards;
    opacity: 0;
}

.form-group:nth-child(1) {
    animation-delay: 0.2s;
}

.form-group:nth-child(2) {
    animation-delay: 0.3s;
}

.form-group:nth-child(3) {
    animation-delay: 0.4s;
}

.form-group:nth-child(4) {
    animation-delay: 0.5s;
}

@keyframes fadeInField {
    to {
        opacity: 1;
        transform: translateY(0);
    }

    from {
        transform: translateY(15px);
    }
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    transition: fill 0.3s ease;
    pointer-events: none;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group select {
    cursor: pointer;
    padding-right: 40px;
}

.form-group select option {
    background: var(--bg-primary);
    color: var(--white);
    padding: 10px;
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.3s ease;
}

.select-arrow svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--accent);
    background: rgba(250, 125, 0, 0.06);
    box-shadow: 0 0 0 4px rgba(250, 125, 0, 0.1);
}

.form-group input:focus+.icon,
.form-group select:focus~.icon {
    fill: var(--accent);
}

.form-group input:focus~.input-wrapper .icon,
.form-group select:focus~.input-wrapper .icon {
    fill: var(--accent);
}

.input-wrapper:focus-within .icon {
    fill: var(--accent);
}

.input-wrapper:focus-within~label {
    color: var(--accent);
}

.form-group:focus-within label {
    color: var(--accent);
}

/* Validation states */
.form-group.error input,
.form-group.error select {
    border-color: #FF4444;
    background: rgba(255, 68, 68, 0.06);
}

.form-group.success input,
.form-group.success select {
    border-color: #00C853;
    background: rgba(0, 200, 83, 0.06);
}

.error-message {
    font-size: 12px;
    color: #FF6B6B;
    margin-top: 6px;
    display: none;
    align-items: center;
    gap: 4px;
    animation: shakeIn 0.4s ease;
}

.form-group.error .error-message {
    display: flex;
}

@keyframes shakeIn {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-5px);
    }

    40% {
        transform: translateX(5px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }
}

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
    letter-spacing: 0.3px;
    animation: fadeInField 0.5s ease 0.6s forwards;
    opacity: 0;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(250, 125, 0, 0.4);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(250, 125, 0, 0.3);
}

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.85;
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-text svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-loader {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-submit.loading .btn-loader {
    display: block;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
    animation: fadeInField 0.5s ease 0.7s forwards;
    opacity: 0;
}

.form-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--accent-light);
}

/* Success overlay */
.success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 40, 76, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 20;
}

.success-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 32px rgba(250, 125, 0, 0.4);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.success-checkmark svg {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: var(--white);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawCheck 0.6s ease 0.3s forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.success-overlay h2 {
    font-size: 22px;
    color: var(--white);
    margin-bottom: 8px;
    animation: fadeInField 0.5s ease 0.4s forwards;
    opacity: 0;
}

.success-overlay p {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    animation: fadeInField 0.5s ease 0.5s forwards;
    opacity: 0;
}

.btn-reset {
    margin-top: 24px;
    padding: 12px 28px;
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: 12px;
    color: var(--accent);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInField 0.5s ease 0.6s forwards;
    opacity: 0;
}

.btn-reset:hover {
    background: var(--accent);
    color: var(--white);
}

/* Responsive */
@media (max-width: 560px) {
    .form-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .form-header h1 {
        font-size: 20px;
    }

    .form-group input,
    .form-group select {
        padding: 10px 12px 10px 38px;
        font-size: 13px;
    }

    .container {
        padding: 12px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* Floating labels enhancement */
.form-group .focus-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 0 0 14px 14px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group:focus-within .focus-line {
    left: 0;
    width: 100%;
}