/* ==================== RESET Y BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* ==================== ELEMENTOS DECORATIVOS ==================== */
.bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.bg-decoration::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 15%;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #1DB584, #00D084);
    border-radius: 50%;
    opacity: 0.1;
    animation: pulse 4s ease-in-out infinite;
}

.bg-decoration::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 10%;
    width: 150px;
    height: 150px;
    background: linear-gradient(45deg, #1DB584, #00D084);
    border-radius: 30px;
    opacity: 0.08;
    animation: pulse 6s ease-in-out infinite reverse;
}

/* ==================== ANIMACIONES ==================== */
@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.15; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

/* ==================== CONTENEDOR PRINCIPAL ==================== */
.login-container {
    background: #2a2a2a;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(29, 181, 132, 0.1);
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1DB584, #00D084);
    border-radius: 24px 24px 0 0;
}

/* ==================== SELECTOR DE IDIOMA ==================== */
.language-selector {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #9ca3af;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateY(-1px);
}

.lang-option.active {
    background: linear-gradient(135deg, #1DB584, #00D084);
    color: white;
    box-shadow: 0 4px 16px rgba(29, 181, 132, 0.3);
}

.flag {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.flag.mexico {
    background-image: url('/Assets/mexico.png');
}

.flag.usa {
    background-image: url('/Assets/united%20states.png');
}

/* ==================== LOGO Y HEADER ==================== */
.logo-section {
    text-align: center;
    margin-bottom: 48px;
    margin-top: 32px;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.logo-section img {
    width: 120px;
    height: auto;
    margin-bottom: 24px;
    filter: drop-shadow(0 8px 24px rgba(29, 181, 132, 0.3));
}

.welcome-text {
    color: #ffffff;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.welcome-subtext {
    color: #9ca3af;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

/* ==================== FORMULARIO ==================== */
.form-group {
    margin-bottom: 24px;
    transform: translateY(0);
    transition: transform 0.3s ease;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.form-group:focus-within {
    transform: translateY(-2px);
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #404040;
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    background: #1a1a1a;
    transition: all 0.3s ease;
    color: #ffffff;
    outline: none;
}

.form-group input:focus {
    border-color: #1DB584;
    background: #1a1a1a;
    box-shadow: 0 0 0 4px rgba(29, 181, 132, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #6b7280;
    font-weight: 400;
}

.form-group input:valid {
    border-color: #1DB584;
}

/* ==================== ICONOS DE INPUT ==================== */
.input-icon {
    position: relative;
}

.input-icon input {
    padding-left: 54px;
}

.input-icon::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    z-index: 1;
}

.input-icon.email::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231DB584'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 12a4 4 0 10-8 0 4 4 0 008 0zm0 0v1.5a2.5 2.5 0 005 0V12a9 9 0 10-9 9m4.5-1.206a8.959 8.959 0 01-4.5 1.207'/%3E%3C/svg%3E");
}

.input-icon.password::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231DB584'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'/%3E%3C/svg%3E");
}

/* ==================== BOTONES ==================== */
.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #1DB584, #00D084);
    color: white;
    border: none;
    padding: 20px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.login-btn::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;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(29, 181, 132, 0.4);
}

.login-btn:hover::before {
    left: 100%;
}

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

/* ==================== ESTADOS DE CARGA ==================== */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==================== MENSAJES DE ERROR ==================== */
.error-message {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.5s ease-in-out;
}

/* ==================== FOOTER ==================== */
.footer-links {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #404040;
}

.footer-links a {
    color: #1DB584;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00D084;
    text-decoration: underline;
}

.powered-by {
    text-align: center;
    margin-top: 24px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 400;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .login-container {
        padding: 32px 24px;
        margin: 16px;
        border-radius: 20px;
    }
    
    .welcome-text {
        font-size: 28px;
    }
    
    .logo-section img {
        width: 100px;
    }
    
    .language-selector {
        position: static;
        justify-content: center;
        margin-bottom: 24px;
        background: transparent;
        padding: 0;
    }
    
    .lang-name {
        display: none;
    }
}
.separator {
    margin: 24px 0;
    text-align: center;
    position: relative;
    animation: fadeIn 0.8s ease-out 0.8s both;
}

.separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(29, 181, 132, 0.3), transparent);
}

.separator span {
    background: #2a2a2a;
    padding: 0 24px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

/* Estilos para el formulario local */
.local-login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.8s ease-out 1s both;
}

/* Botón de Google específico */
.google-btn {
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 2px solid #e5e7eb !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.google-btn:hover {
    background: #f9fafb !important;
    border-color: #d1d5db !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

/* Botón local específico */
.local-btn {
    background: linear-gradient(135deg, #1DB584, #00D084) !important;
    margin-top: 8px;
}

/* Enlaces adicionales */
.additional-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #404040;
    animation: fadeIn 0.8s ease-out 1.2s both;
}

.register-link, .forgot-link {
    color: #1DB584;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 0;
    border-radius: 8px;
}

.register-link:hover, .forgot-link:hover {
    color: #00D084;
    background: rgba(29, 181, 132, 0.1);
    transform: translateY(-1px);
}

/* Mensaje de éxito */
.success-message {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 16px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideUp 0.5s ease-out;
}

/* ==================== ESTILOS PARA REGISTRO ==================== */

/* Validador de fortaleza de contraseña */
.password-strength {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.password-strength.muy-débil {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.password-strength.débil {
    color: #ea580c;
    background: rgba(234, 88, 12, 0.1);
}

.password-strength.regular {
    color: #ca8a04;
    background: rgba(202, 138, 4, 0.1);
}

.password-strength.fuerte {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
}

.password-strength.muy-fuerte {
    color: #1DB584;
    background: rgba(29, 181, 132, 0.1);
}

/* ==================== RESPONSIVE PARA NUEVOS ELEMENTOS ==================== */
@media (max-width: 480px) {
    .separator span {
        padding: 0 16px;
        font-size: 13px;
    }
    
    .additional-links {
        gap: 16px;
    }
    
    .google-btn svg {
        width: 18px;
        height: 18px;
    }
}