/**
 * Estilos para páginas de autenticación (Login/Register)
 * AI Smart Content - Diseño futurista consistente
 */

/* Importar estilos base */
@import url('base.css');

/* Variables específicas de login */
:root {
    --bg-primary: var(--bg-dark);
}

body {
    position: relative;
    background: #0a0a0a;
    background-image: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><path d="M0,400 Q300,200 600,400 T1200,400 L1200,800 L0,800 Z" fill="%23333" opacity="0.3"/></svg>');
    background-size: cover;
    background-position: center;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, rgba(210, 254, 63, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(210, 254, 63, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Contenedor principal */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo en la tarjeta */
.auth-logo {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
}

/* Tarjeta de autenticación */
.auth-card {
    background: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: fadeInScale 1s ease-out 0.2s both;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: shimmer 2s infinite;
}

/* Animación shimmer movida a base.css */


/* Formularios */
.auth-form {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: left;
    color: var(--text-primary);
}

/* Grupos de formulario */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container input,
.input-container select {
    width: 100%;
    padding: 12px 16px;
    padding-right: 45px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: var(--bg-black);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-container input:focus,
.input-container select:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
    outline: none;
}

.input-container input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Botón de toggle password */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: rgba(0, 0, 0, 0.7);
}

/* Indicador de fortaleza de contraseña */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    background: var(--error-color);
    width: 0%;
    transition: all 0.3s ease;
}

.strength-fill.weak {
    width: 25%;
    background: var(--error-color);
}

.strength-fill.medium {
    width: 50%;
    background: var(--warning-color);
}

.strength-fill.strong {
    width: 75%;
    background: var(--success-color);
}

.strength-fill.very-strong {
    width: 100%;
    background: var(--success-color);
}

.strength-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 60px;
}

/* Opciones de formulario */
.form-options {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 25px;
}

/* Checkbox personalizado */
.checkbox-container {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background: rgba(42, 42, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background: rgba(42, 42, 42, 0.9);
    border-color: var(--primary-color);
}

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

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

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

/* Enlaces */
.forgot-password,
.link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover,
.link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Botón de autenticación */
.auth-button {
    width: 100%;
    padding: 12px;
    background: #4285f4;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
}

.auth-button:hover {
    background: #357ae8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

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

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

.loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Divider */
.divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 50px);
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: rgba(42, 42, 42, 0.95);
    padding: 0 15px;
}

/* Botones sociales */
.social-login {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.social-button {
    flex: 1;
    padding: 12px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: var(--bg-black);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-button:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-button.google i {
    color: #4285f4;
    font-size: 1.1rem;
}

/* Register Link */
.register-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.register-link a {
    color: #4285f4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: #357ae8;
    text-decoration: underline;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--error-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.notification-icon {
    font-size: 1.1rem;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.notification-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

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

/* Animación fadeInScale movida a base.css */

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 30px 25px;
        margin: 20px 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    .logo i {
        font-size: 2.5rem;
    }
    
    .tab-button {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .input-container input,
    .input-container select {
        padding: 12px 12px 12px 40px;
        font-size: 0.9rem;
    }
    
    .auth-button {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .tab-button {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}