* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #111827;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    background: #111827;
    background-image: url('fondo.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 20px;
    box-sizing: border-box;
}

/* Ajustar fondo en móvil para mostrar parte izquierda */
@media (max-width: 768px) {
    .auth-container {
        background-position: left center;
    }
}

@media (max-width: 480px) {
    .auth-container {
        background-position: left center;
        background-size: auto 100%;
    }
}

.auth-card {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: 450px;
    border: none;
    margin: 100px 0;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 20px;
}

.welcome-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-logo {
    width: 120px;
    margin: 0 auto 30px;
    display: block;
    animation: fadeIn 0.8s ease, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.welcome-text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.preregister-btn {
    padding: 16px 48px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.preregister-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.6);
}

.preregister-btn:active {
    transform: translateY(-1px);
}

/* Thank You Section */
.thank-you-section {
    text-align: center;
    padding: 20px;
    animation: fadeIn 0.5s ease;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.thank-you-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
}

.thank-you-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
    line-height: 1.6;
    word-wrap: break-word;
}

.thank-you-details {
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px auto;
    text-align: left;
    max-width: 100%;
    box-sizing: border-box;
}

.thank-you-details p {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.thank-you-details ul {
    list-style: none;
    padding: 0;
}

.thank-you-details li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.thank-you-details li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #8b5cf6;
    font-weight: bold;
    font-size: 1.1rem;
}

.thank-you-footer {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-style: italic;
}

.back-to-welcome-btn {
    padding: 12px 36px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.back-to-welcome-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.6);
}

.back-to-welcome-btn:active {
    transform: translateY(-1px);
}

/* Form Section */
.form-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 10px;
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.auth-subtitle {
    text-align: center;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 4px;
    font-weight: 700;
}

.form-group input:not(.password-input-container input) {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #4b5563;
    border-radius: 8px;
    background: rgb(55, 65, 81);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:not(.password-input-container input):focus {
    outline: none;
    border-color: #8b5cf6;
    background: rgb(55, 65, 81);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Select styles */
.form-group select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #4b5563;
    border-radius: 8px;
    background: rgb(55, 65, 81);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23fff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-group select:focus {
    outline: none;
    border-color: #8b5cf6;
    background-color: rgb(55, 65, 81);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.form-group select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-group select option {
    background: rgb(55, 65, 81);
    color: white;
    padding: 10px;
}

.form-group {
    position: relative;
}

/* Password Input Container */
.password-input-container {
    position: relative;
    background: #111827;
    border-radius: 8px;
    border: 2px solid #4b5563;
}

.password-input-container input {
    background: transparent;
    border: none;
    width: 100%;
    padding: 12px 50px 12px 16px;
    background: rgb(55, 65, 81);
    border-radius: 6px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.password-input-container input:focus {
    outline: none;
    box-shadow: none;
}

.password-input-container:focus-within {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.1);
}

.password-input-container.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.password-input-container.valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.8);
}

.password-toggle .eye-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.6;
    transition: opacity 0.3s ease;
    display: block;
    margin: 0;
}

.password-toggle:hover .eye-icon {
    opacity: 0.8;
}

/* Auth Options */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: white;
    font-size: 0.9rem;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    accent-color: #8b5cf6;
}

.checkbox-container .terms-link {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.checkbox-container .terms-link:hover {
    color: #ec4899;
    border-bottom-color: #ec4899;
}

.auth-btn {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

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

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: inline-block;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: #9ca3af;
    font-size: 0.9rem;
}

.auth-switch a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: #ec4899;
    text-decoration: underline;
}

/* User Type Selection Styles */
.user-type-selection {
    margin-bottom: 30px;
}

.user-type-label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    color: #e5e7eb;
    font-size: 1rem;
}

.user-type-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.user-type-btn {
    flex: 1;
    padding: 20px;
    background-color: #374151;
    border: 2px solid #4b5563;
    border-radius: 12px;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-type-btn:hover {
    background-color: #4b5563;
    border-color: #6b7280;
    transform: translateY(-2px);
}

.user-type-btn.active {
    background-color: rgb(168 85 247 / 0.2);
    border-color: #8b5cf6;
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.user-type-content {
    text-align: center;
}

.user-type-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-type-description {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.3;
}

/* Form validation styles */
.form-group input:not(.password-input-container input).error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input:not(.password-input-container input).valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group input:not(.password-input-container input):focus.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input:not(.password-input-container input):focus.valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Autocomplete styles - override browser default white background */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1f2937 inset !important;
    -webkit-text-fill-color: white !important;
    background-color: #1f2937 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Firefox autocomplete styles */
.form-group input:-moz-autofill {
    background-color: #1f2937 !important;
    color: white !important;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-title {
        font-size: 2.5rem;
    }

    .welcome-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 25px;
    }

    .welcome-text {
        font-size: 1rem;
        padding: 0 20px;
    }

    .preregister-btn {
        padding: 14px 40px;
        font-size: 1rem;
    }

    .thank-you-section {
        padding: 30px 15px;
        max-width: 100%;
    }

    .thank-you-icon {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }

    .thank-you-title {
        font-size: 2rem;
        padding: 0 10px;
    }

    .thank-you-message {
        font-size: 1rem;
        padding: 0 10px;
    }

    .thank-you-details {
        padding: 20px 15px;
        margin: 20px 0;
    }

    .thank-you-details p {
        font-size: 1rem;
    }

    .thank-you-details li {
        font-size: 0.9rem;
    }

    .thank-you-footer {
        padding: 0 10px;
        font-size: 0.9rem;
    }

    .back-to-welcome-btn {
        padding: 12px 32px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .welcome-section {
        padding: 30px 10px;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .welcome-text {
        font-size: 0.95rem;
    }

    .preregister-btn {
        padding: 12px 32px;
        font-size: 0.95rem;
    }

    .thank-you-section {
        padding: 20px 10px;
    }

    .thank-you-title {
        font-size: 1.8rem;
    }

    .thank-you-message {
        font-size: 0.95rem;
    }

    .thank-you-details {
        padding: 15px 10px;
    }

    .thank-you-details li {
        font-size: 0.85rem;
        padding-left: 25px;
    }
    
    .auth-card h2 {
        font-size: 2rem;
    }
    
    .auth-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .user-type-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-type-btn {
        min-height: 70px;
        padding: 15px;
    }
    
    .user-type-title {
        font-size: 1rem;
    }
    
    .user-type-description {
        font-size: 0.85rem;
    }
}
