/* Reset y configuración base */
* {
    box-sizing: border-box;
}

h2 {
    color: white;
}

p {
    color: white;
}

/* Configuración del body con gradiente moderno */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 50%, #5d6d7e 100%);
    background-attachment: fixed;
    display: flex;
    align-items: flex-start; /* Evita recortes verticales centrando al inicio */
    justify-content: center;
    min-height: 100vh;
    overflow-y: auto; /* Habilita scroll cuando el contenido es más alto que la ventana */
}

/* Ocultar barra de desplazamiento sin desactivar el scroll */
html, body {
    -ms-overflow-style: none; /* IE y Edge */
    scrollbar-width: none; /* Firefox */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none; /* WebKit */
}

/* Container principal */
.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

/* Tarjeta principal mejorada */
.card-container.card {
    width: 100%;
    max-width: 380px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.card-container.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2c3e50, #3498db, #2c3e50);
    border-radius: 16px 16px 0 0;
}

/* Imagen de perfil mejorada */
.profile-img-card {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 50%;
    border: 3px solid #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.profile-img-card:hover {
    transform: scale(1.05);
}

/* Estilos de formulario mejorados */
.profile-name-card {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 30px;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

.reauth-email {
    display: block;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Inputs mejorados */
.form-signin input[type=email],
.form-signin input[type=password],
.form-signin input[type=text],
.form-signin input[type=tel] {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 400;
    color: #2c3e50;
    background-color: #fff;
    transition: all 0.3s ease;
    position: relative;
}

.form-signin input[type=email]:focus,
.form-signin input[type=password]:focus,
.form-signin input[type=text]:focus,
.form-signin input[type=tel]:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-signin input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

/* Grupo de input para contraseña - Botón del ojo DENTRO del campo */
.form-signin .input-group {
    position: relative !important;
    margin-bottom: 16px !important;
    display: block !important;
    width: 100% !important;
}

.form-signin .input-group .form-control {
    margin-bottom: 0 !important;
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    width: 100% !important;
    height: 48px !important;
    padding: 12px 16px !important;
    padding-right: 50px !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: #2c3e50 !important;
    background-color: #fff !important;
    transition: all 0.3s ease !important;
    display: block !important;
    float: none !important;
    position: relative !important;
}

.form-signin .input-group-btn {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    height: 48px !important;
    width: 48px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 8px 8px 0 !important;
}

.form-signin .input-group-btn .btn,
.form-signin .input-group-btn .btn-default,
.form-signin .input-group-btn button,
.form-signin .input-group-btn #toggle-password {
    height: 48px !important;
    width: 48px !important;
    border: none !important;
    border-radius: 0 8px 8px 0 !important;
    background-color: transparent !important;
    color: #6c757d !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.form-signin .input-group-btn .btn:hover,
.form-signin .input-group-btn .btn-default:hover,
.form-signin .input-group-btn button:hover,
.form-signin .input-group-btn #toggle-password:hover {
    background-color: rgba(233, 236, 239, 0.5) !important;
    color: #2c3e50 !important;
}

.form-signin .input-group-btn .btn:focus,
.form-signin .input-group-btn .btn-default:focus,
.form-signin .input-group-btn button:focus,
.form-signin .input-group-btn #toggle-password:focus {
    outline: none !important;
    box-shadow: none !important;
    background-color: rgba(233, 236, 239, 0.5) !important;
}

.form-signin .input-group:focus-within .form-control {
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1) !important;
    transform: translateY(-1px) !important;
}

.form-signin .input-group .form-control:focus {
    border-color: #3498db !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Enlace de contraseña olvidada */
.forgot-password {
    display: inline-block;
    color: #3498db;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Botón principal mejorado */
.btn.btn-signin {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.btn.btn-signin:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.3);
}

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

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

/* Botones sociales mejorados */
.login-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    position: relative;
}

.login-buttons::before {
    content: 'o continúa con';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 15px;
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.button {
    flex: 1;
    height: 48px;
    border: 2px solid #e9ecef;
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.button:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.button img {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.button:hover img {
    transform: scale(1.1);
}

.facebook-button:hover {
    border-color: #1877f2;
    background-color: rgba(24, 119, 242, 0.05);
}

.google-button:hover {
    border-color: #db4437;
    background-color: rgba(219, 68, 55, 0.05);
}

/* Alertas mejoradas */
.alert {
    border-radius: 8px;
    border: none;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-left: 4px solid #28a745;
}

/* Estilos para otros elementos del formulario */
.select-country {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background-color: #fff;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.select-country:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Estilos para registro */
.registroTitulo {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    letter-spacing: -0.5px;
}

.registroSubtitulos {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: left;
}

.registroTexto {
    color: #495057;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 400;
    text-align: justify;
    line-height: 1.5;
}

.requirementsTitle {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.requirements {
    font-size: 13px;
    color: #6c757d;
    margin-top: 8px;
    line-height: 1.4;
}

.text-success {
    color: #28a745;
}

.error-signup {
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 8px;
    text-align: left;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .card-container.card {
        padding: 30px 25px;
        margin: 10px auto;
    }
    
    /* Mejoras específicas para botones sociales en móvil */
    .login-buttons {
        flex-direction: row;
        gap: 10px;
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .login-buttons::before {
        font-size: 11px;
        padding: 0 12px;
    }
    
    .button {
        flex: 1;
        height: 52px;
        min-width: 0;
        border: 2px solid #e9ecef;
        border-radius: 10px;
        padding: 0 8px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .button img {
        width: 22px;
        height: 22px;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    }
    
    /* Estados táctiles mejorados para móvil */
    .button:active {
        transform: scale(0.95) translateY(1px);
        border-color: #3498db;
        background-color: rgba(52, 152, 219, 0.08);
        transition: all 0.1s ease;
    }
    
    .facebook-button:active {
        border-color: #1877f2;
        background-color: rgba(24, 119, 242, 0.12);
    }
    
    .google-button:active {
        border-color: #db4437;
        background-color: rgba(219, 68, 55, 0.12);
    }
    
    /* Mejora visual adicional para mejor contraste en móvil */
    .button:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    }
}

/* Media query adicional para pantallas muy pequeñas */
@media (max-width: 360px) {
    .card-container.card {
        padding: 25px 20px;
        margin: 5px auto;
    }
    
    .login-buttons {
        gap: 8px;
    }
    
    .button {
        height: 50px;
        padding: 0 6px;
    }
    
    .button img {
        width: 20px;
        height: 20px;
    }
    
    .login-buttons::before {
        font-size: 10px;
        padding: 0 10px;
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-container.card {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados de carga */
.btn.btn-signin:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn.btn-signin:disabled:hover {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}