/* Importar fuente Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* Variables de colores - Paleta mejorada */
:root {
    /* Paleta principal - Azul más vibrante */
    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-primary-200: #bfdbfe;
    --color-primary-300: #93c5fd;
    --color-primary-400: #60a5fa;
    --color-primary-500: #3b82f6;
    --color-primary-600: #2563eb;
    --color-primary-700: #1d4ed8;
    --color-primary-800: #1e40af;
    --color-primary-900: #1e3a8a;

    /* Colores de acento */
    --color-accent-light: #f0f9ff;
    --color-accent-medium: #e0f2fe;
    --color-accent-dark: #bae6fd;

    /* Google */
    --color-google: #ea4335;
    --color-google-hover: #d33426;

    /* Escala de grises */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    /* Gradientes */
    --gradient-primary: linear-gradient(
        135deg,
        var(--color-primary-500),
        var(--color-primary-700)
    );
    --gradient-google: linear-gradient(135deg, #ea4335, #c5221f);
    --gradient-background: linear-gradient(135deg, #ffffff, #f8fafc);

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* Bordes */
    --border-light: 1px solid rgba(255, 255, 255, 0.4);
    --border-input: 1px solid var(--color-gray-300);
    --border-radius-lg: 0.75rem;
    --border-radius-md: 0.5rem;
    --border-radius-sm: 0.375rem;

    /* Tipografía */
    --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
        sans-serif;
}

/* Estilos base para los modales */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    overflow-y: auto;
    padding: 10px 5px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(8px);
    font-family: var(--font-sans);
}

.modal-content {
    position: relative;
    background: white;
    margin: 1rem auto;
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 340px;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: var(--border-light);
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Botón de cierre */
.close-modal {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--color-gray-600);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.close-modal:hover {
    color: var(--color-gray-900);
    background-color: var(--color-gray-200);
    transform: rotate(90deg);
}

/* Encabezado del modal */
.modal-header {
    margin-bottom: 1.25rem;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.modal-header p {
    font-size: 0.75rem;
    color: var(--color-gray-600);
    margin: 0;
    font-weight: 400;
    line-height: 1.3;
}

/* Estilos de formulario */
form {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 0.875rem;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.input-icon-wrapper:focus-within {
    transform: translateY(-1px);
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    width: 0.875rem;
    height: 0.875rem;
    color: var(--color-primary-500);
    pointer-events: none;
    transition: color 0.2s ease;
}

/* Ajustar la posición del placeholder más a la izquierda y mejorar el diseño de los inputs */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 0.625rem 0.625rem 0.625rem 2.25rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: white;
    color: var(--color-gray-800);
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.01em;
    font-family: var(--font-sans);
    height: 36px;
}

/* Ajustar el placeholder */
input::placeholder {
    color: var(--color-gray-500);
    opacity: 0.9;
    font-weight: 400;
    font-family: var(--font-sans);
    font-size: 0.75rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--color-primary-500);
    background-color: white;
    color: var(--color-gray-900);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

input[type="text"]:focus + .input-icon,
input[type="email"]:focus + .input-icon,
input[type="password"]:focus + .input-icon,
.input-icon-wrapper:focus-within .input-icon {
    color: var(--color-primary-600);
}

/* Opciones de formulario */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 0.75rem;
}

.forgot-password {
    color: var(--color-primary-700);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 600;
    position: relative;
    font-size: 0.75rem;
}

.forgot-password:hover {
    color: var(--color-primary-800);
}

/* Botones */
.primary-button {
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
    font-family: var(--font-sans);
    height: 36px;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.primary-button:active {
    transform: translateY(-1px);
}

.primary-button svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

.primary-button:hover svg {
    transform: translateX(2px);
}

.primary-button:disabled {
    background: var(--color-gray-400);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-button {
    padding: 0.625rem 1rem;
    background-color: white;
    color: var(--color-gray-800);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-sans);
    height: 36px;
}

.secondary-button:hover {
    background-color: var(--color-gray-100);
    border-color: var(--color-gray-400);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.secondary-button svg {
    width: 1rem;
    height: 1rem;
}

/* Divisor */
.modal-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    color: var(--color-gray-600);
    font-size: 0.75rem;
    font-weight: 600;
}

.modal-divider::before,
.modal-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        var(--color-gray-300),
        var(--color-gray-300),
        transparent
    );
}

.modal-divider span {
    padding: 0 0.5rem;
}

/* Botón de Google */
.social-login {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.625rem 1rem;
    background: var(--gradient-google);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.01em;
    font-family: var(--font-sans);
    height: 36px;
}

.google-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.google-btn svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

/* Footer del modal - Ahora centrado debajo del botón */
.modal-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-gray-600);
    margin-top: 1rem;
}

.modal-footer a {
    color: var(--color-primary-600);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
}

.modal-footer a:hover {
    color: var(--color-primary-800);
}

/* Mensaje debajo del botón */
.button-message {
    text-align: center;
    font-size: 0.6875rem;
    color: var(--color-gray-500);
    margin-top: 0.5rem;
    font-weight: 400;
}

.button-message a {
    color: var(--color-primary-600);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
}

.button-message a:hover {
    color: var(--color-primary-800);
}

/* Checkbox personalizado */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 22px;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.75rem;
    user-select: none;
    color: var(--color-gray-700);
    font-weight: 500;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 16px;
    width: 16px;
    background-color: white;
    border: 1px solid var(--color-gray-400);
    border-radius: 4px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--color-primary-500);
    background-color: var(--color-primary-50);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--color-primary-600);
    border-color: var(--color-primary-600);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 3px;
    height: 7px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    margin-left: 4px;
}

.checkbox-text a {
    color: var(--color-primary-700);
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

/* Modal de términos y condiciones */
.terms-content {
    max-width: 340px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.terms-body {
    flex: 1;
    margin-bottom: 1.25rem;
    border: 1px solid var(--color-gray-300);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background-color: white;
    box-shadow: var(--shadow-inner);
}

.terms-body iframe {
    border: none;
    background-color: white;
}

.terms-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Responsividad mejorada */
@media (min-width: 641px) {
    .modal {
        padding: 20px;
    }

    .modal-content {
        padding: 2.5rem;
        margin: 2rem auto;
        max-width: 500px;
        border-radius: var(--border-radius-lg);
    }

    .modal-header h2 {
        font-size: 1.75rem;
    }

    .modal-header p {
        font-size: 0.9375rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 0.875rem 1.25rem 0.875rem 3rem;
        font-size: 1rem;
        height: auto;
        border-radius: var(--border-radius-md);
    }

    .input-icon {
        left: 1.25rem;
        width: 1.25rem;
        height: 1.25rem;
    }

    .primary-button,
    .secondary-button,
    .google-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        height: auto;
        border-radius: var(--border-radius-md);
    }

    .close-modal {
        top: 1.25rem;
        right: 1.5rem;
        width: 36px;
        height: 36px;
        font-size: 1.75rem;
    }

    .form-options {
        font-size: 0.9375rem;
    }

    .checkbox-container {
        font-size: 0.9375rem;
        padding-left: 30px;
    }

    .checkmark {
        height: 20px;
        width: 20px;
    }

    .checkbox-container .checkmark:after {
        left: 7px;
        top: 3px;
        width: 5px;
        height: 10px;
    }

    .modal-divider {
        font-size: 0.9375rem;
        margin: 1.5rem 0;
    }

    .modal-footer {
        font-size: 0.875rem;
    }

    .button-message {
        font-size: 0.8125rem;
    }
}

/* Ajustes específicos para Samsung Galaxy S10 y dispositivos similares (360px) */
@media (max-width: 360px) {
    .modal {
        padding: 0;
    }

    .modal-content {
        padding: 1rem 0.75rem;
        margin: 0;
        border-radius: 0;
        max-width: 100%;
        width: 100%;
        height: 100%;
        border: none;
        box-shadow: none;
    }

    .modal-header {
        margin-bottom: 1rem;
    }

    .modal-header h2 {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }

    .modal-header p {
        font-size: 0.7rem;
    }

    .close-modal {
        top: 0.5rem;
        right: 0.5rem;
        width: 22px;
        height: 22px;
        font-size: 0.875rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 0.5rem 0.5rem 0.5rem 2rem;
        font-size: 0.75rem;
        height: 34px;
    }

    .input-icon {
        left: 0.625rem;
        width: 0.75rem;
        height: 0.75rem;
    }

    .primary-button,
    .secondary-button,
    .google-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        height: 34px;
    }

    .form-group {
        margin-bottom: 0.75rem;
    }

    .checkbox-container {
        font-size: 0.7rem;
        padding-left: 20px;
    }

    .checkmark {
        height: 14px;
        width: 14px;
    }

    .checkbox-container .checkmark:after {
        left: 4.5px;
        top: 1.5px;
        width: 2.5px;
        height: 6px;
    }

    .form-options {
        margin-bottom: 1rem;
        font-size: 0.7rem;
    }

    .modal-divider {
        margin: 0.75rem 0;
        font-size: 0.7rem;
    }

    .modal-divider span {
        padding: 0 0.375rem;
    }

    .modal-footer {
        margin-top: 0.75rem;
        font-size: 0.7rem;
    }

    .button-message {
        font-size: 0.625rem;
        margin-top: 0.375rem;
    }

    .google-btn svg {
        width: 0.875rem;
        height: 0.875rem;
        margin-right: 0.375rem;
    }

    /* Ajustar el espacio entre elementos */
    .social-login {
        margin-bottom: 1rem;
    }

    /* Asegurar que los botones sean tocables */
    .primary-button,
    .secondary-button,
    .google-btn,
    .close-modal {
        touch-action: manipulation;
    }
}

/* Ajustes específicos para dispositivos extremadamente pequeños (320px y menos) */
@media (max-width: 320px) {
    .modal-content {
        padding: 0.875rem 0.625rem;
    }

    .modal-header h2 {
        font-size: 1rem;
    }

    .modal-header p {
        font-size: 0.65rem;
    }

    .close-modal {
        top: 0.375rem;
        right: 0.375rem;
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 0.5rem 0.5rem 0.5rem 1.875rem;
        font-size: 0.7rem;
        height: 32px;
    }

    .input-icon {
        left: 0.5rem;
        width: 0.7rem;
        height: 0.7rem;
    }

    .primary-button,
    .secondary-button,
    .google-btn {
        padding: 0.5rem 0.625rem;
        font-size: 0.7rem;
        height: 32px;
    }

    .checkbox-container {
        font-size: 0.65rem;
        padding-left: 18px;
    }

    .checkmark {
        height: 12px;
        width: 12px;
    }

    .checkbox-container .checkmark:after {
        left: 4px;
        top: 1px;
        width: 2px;
        height: 5px;
    }

    .form-options {
        font-size: 0.65rem;
    }

    .modal-divider {
        font-size: 0.65rem;
    }

    .modal-footer {
        font-size: 0.65rem;
    }

    .button-message {
        font-size: 0.6rem;
    }
}

/* Mejoras de accesibilidad para todos los tamaños */
.primary-button:focus-visible,
.secondary-button:focus-visible,
.google-btn:focus-visible,
.close-modal:focus-visible,
input:focus-visible {
    outline: 2px solid var(--color-primary-600);
    outline-offset: 2px;
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) {
    .primary-button:active,
    .secondary-button:active,
    .google-btn:active {
        transform: scale(0.98);
    }

    .close-modal:active {
        transform: scale(0.95);
    }
}

/* Soporte para modo oscuro */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background-color: var(--color-gray-900);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .modal-header h2 {
        color: var(--color-gray-100);
    }

    .modal-header p {
        color: var(--color-gray-400);
    }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        background-color: var(--color-gray-800);
        border-color: var(--color-gray-700);
        color: var(--color-gray-100);
    }

    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus {
        background-color: var(--color-gray-800);
        color: white;
        border-color: var(--color-primary-500);
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
    }

    input::placeholder {
        color: var(--color-gray-500);
    }

    .checkbox-container {
        color: var(--color-gray-300);
    }

    .checkmark {
        background-color: var(--color-gray-800);
        border-color: var(--color-gray-600);
    }

    .close-modal {
        background-color: var(--color-gray-800);
        border-color: var(--color-gray-700);
        color: var(--color-gray-300);
    }

    .close-modal:hover {
        background-color: var(--color-gray-700);
        color: var(--color-gray-100);
    }

    .secondary-button {
        background-color: var(--color-gray-800);
        border-color: var(--color-gray-700);
        color: var(--color-gray-200);
    }

    .secondary-button:hover {
        background-color: var(--color-gray-700);
        border-color: var(--color-gray-600);
    }

    .modal-divider::before,
    .modal-divider::after {
        background: linear-gradient(
            to right,
            transparent,
            var(--color-gray-700),
            var(--color-gray-700),
            transparent
        );
    }

    .modal-divider {
        color: var(--color-gray-400);
    }

    .modal-footer {
        color: var(--color-gray-400);
    }

    .button-message {
        color: var(--color-gray-500);
    }
}

/* Ajustes específicos para pantallas de 360x760 (Samsung Galaxy S10) */
@media (max-width: 360px) and (max-height: 760px) {
    .modal {
        padding: 0;
        overflow-y: auto;
    }

    .modal-content {
        padding: 0.875rem 0.625rem;
        margin: 0;
        border-radius: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        border: none;
        box-shadow: none;
    }

    /* Ajustar el espacio vertical para pantallas más pequeñas */
    .form-group {
        margin-bottom: 0.625rem;
    }

    .modal-header {
        margin-bottom: 0.875rem;
    }

    .modal-header h2 {
        font-size: 1rem;
    }

    .modal-header p {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    /* Reducir aún más los elementos interactivos */
    input[type="text"],
    input[type="email"],
    input[type="password"] {
        padding: 0.5rem 0.5rem 0.5rem 1.875rem;
        font-size: 0.7rem;
        height: 32px;
    }

    .primary-button,
    .secondary-button,
    .google-btn {
        height: 32px;
        font-size: 0.7rem;
    }

    /* Reducir espaciado vertical entre secciones */
    .social-login {
        margin-bottom: 0.75rem;
    }

    .modal-divider {
        margin: 0.625rem 0;
    }

    .modal-footer {
        margin-top: 0.625rem;
    }

    /* Eliminar cualquier elemento decorativo */
    .modal-content::before,
    .modal-content::after {
        display: none;
    }

    /* Asegurar que el formulario sea compacto */
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
}

/* Ajustes específicos para pantallas muy pequeñas en altura */
@media (max-height: 600px) {
    .modal-content {
        padding: 0.75rem 0.5rem;
    }

    .modal-header {
        margin-bottom: 0.75rem;
    }

    .form-group {
        margin-bottom: 0.5rem;
    }

    .social-login {
        margin-bottom: 0.625rem;
    }

    .modal-divider {
        margin: 0.5rem 0;
    }

    .modal-footer {
        margin-top: 0.5rem;
    }

    /* Reducir aún más los tamaños para pantallas con poca altura */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    .primary-button,
    .secondary-button,
    .google-btn {
        height: 30px;
    }
}

/* Ajustes finales para asegurar que el modal se ajuste perfectamente a 360x760 */
@media (width: 360px) and (height: 760px) {
    .modal-content {
        max-width: 350px;
        padding: 0.875rem 0.625rem;
        margin: 0 auto;
    }

    /* Asegurar que no haya desbordamiento horizontal */
    body,
    html {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Eliminar cualquier margen o padding innecesario */
    .modal {
        padding: 0;
    }

    /* Optimizar el espacio vertical */
    .form-group {
        margin-bottom: 0.625rem;
    }

    .modal-header {
        margin-bottom: 0.875rem;
    }

    .social-login {
        margin-bottom: 0.75rem;
    }

    .modal-divider {
        margin: 0.625rem 0;
    }

    .modal-footer {
        margin-top: 0.625rem;
    }
}

/* Estilos para el modal de autenticación unificado */
.auth-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-option-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background-color: white;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.auth-option-button:hover {
    border-color: #d4a000;
    background-color: #fff9e6;
    transform: translateY(-1px);
}

.auth-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background-color: #fff9e6;
    color: #d4a000;
}

.auth-option-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.auth-option-text {
    flex: 1;
}

.auth-option-text h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
}

.auth-option-text p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #718096;
}

#auth-modal .google-btn {
    width: 100%;
    justify-content: center;
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    z-index: 2;
}

.password-toggle:hover {
    color: #333;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 35px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 1em;
}

.password-toggle:hover {
    color: #333;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 35px;
}

/* Media query específico para móviles */
@media (max-width: 480px) {
    .password-toggle {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        height: 20px;
        width: 20px;
        font-size: 1em;
        padding: 0;
        border: none;
        background: transparent;
    }

    .password-wrapper {
        display: flex;
        align-items: center;
    }

    .password-wrapper input[type="password"],
    .password-wrapper input[type="text"] {
        padding-right: 35px;
    }
}

/* Corrigiendo el posicionamiento del icono de ojo */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 1rem;
    background: transparent;
    border: none;
    padding: 0;
}

.password-toggle:hover {
    color: #333;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    padding-right: 35px;
    width: 100%;
}

/* Media query más preciso para móviles */
@media (max-width: 480px) {
    .password-toggle {
        right: 10px;
        width: 18px;
        height: 18px;
        font-size: 0.9rem;
    }

    input[type="password"],
    input[type="text"] {
        font-size: 0.85rem !important;
    }
}
