/* ==========================================================================
   LOGIN/REGISTER ANIMADO - login-register.css
   Usando variables de base.css para mantener consistencia
   ========================================================================== */

/* Importar variables de base.css (asumiendo que ya están cargadas) */
/* Variables adicionales específicas para este componente */
:root {
  --auth-shadow: 0 20px 50px rgba(33, 15, 55, 0.15);
  --auth-radius: 20px;
  --auth-transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Modo oscuro - ajustes específicos */
[data-theme="dark"] {
  --auth-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Reset específico para auth */
.auth-page {
  min-height: 100vh;
  background: var(--color-fondo);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Contenedor principal */
.auth-container {
  background: var(--bg-card);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  overflow: hidden;
  width: 100%;
  max-width: 900px;
  min-height: 550px;
  position: relative;
  display: flex;
}

/* ==========================================================================
   PANEL DESLIZANTE MEJORADO
   ========================================================================== */
.sliding-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 10;
  transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-texto-claro);
  text-align: center;
  padding: 40px;
  clip-path: ellipse(100% 100% at 100% 50%);
}

/* Panel en modo registro - se mueve a la izquierda con forma curva */
.sliding-panel.register-mode {
  right: auto;
  left: 0;
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  clip-path: ellipse(100% 100% at 0% 50%);
}

/* Animación de expansión al hacer clic */
.sliding-panel.expanding {
  width: 100%;
  clip-path: ellipse(150% 100% at 50% 50%);
  transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.sliding-panel.register-mode.expanding {
  width: 100%;
  clip-path: ellipse(150% 100% at 50% 50%);
}

/* Contenido del panel */
.panel-content {
  max-width: 300px;
  z-index: 2;
  position: relative;
}

.panel-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 300;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.panel-subtitle {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
  line-height: 1.6;
}

.panel-btn {
  background: transparent;
  border: 2px solid var(--color-texto-claro);
  color: var(--color-texto-claro);
  padding: 12px 35px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.panel-btn:hover {
  background: var(--color-texto-claro);
  color: var(--color-primario);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   FORMULARIOS
   ========================================================================== */
.form-container {
  width: 50%;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: var(--bg-card);
}

/* Posicionamiento inicial */
.login-container {
  transform: translateX(0);
}

.register-container {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

/* Estados activos */
.register-container.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}

.login-container.inactive {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Títulos de formulario */
.form-title {
  font-size: 2.2rem;
  color: var(--color-texto);
  margin-bottom: 10px;
  font-weight: 400;
}

.form-subtitle {
  color: var(--color-muted);
  margin-bottom: 35px;
  font-size: 1rem;
}

/* Grupos de campos */
.form-group {
  margin-bottom: 25px;
  position: relative;
  animation: slideInFromRight 0.6s ease-out;
  animation-fill-mode: both;
}

.form-group:nth-child(2) {
  animation-delay: 0.1s;
}

.form-group:nth-child(3) {
  animation-delay: 0.2s;
}

.form-group:nth-child(4) {
  animation-delay: 0.3s;
}

/* Campos de entrada */
.form-input {
  width: 100%;
  padding: 15px 45px 15px 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--radio-borde);
  font-size: 1rem;
  background: var(--bg-card);
  color: var(--text-color);
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primario);
  box-shadow: 0 0 0 3px rgba(33, 15, 55, 0.1);
  transform: translateY(-2px);
}

.form-input::placeholder {
  color: var(--color-muted);
  opacity: 0.7;
}

/* Iconos de campos */
.input-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

/* Botón principal */
.form-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 25px;
  color: var(--color-texto-claro);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: slideInFromRight 0.6s ease-out;
  animation-delay: 0.4s;
  animation-fill-mode: both;
}

.form-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-box);
}

.form-btn:active {
  transform: translateY(-1px);
}

/* ==========================================================================
   REDES SOCIALES
   ========================================================================== */
.social-login {
  margin-top: 20px;
}

.social-text {
  text-align: center;
  color: var(--color-muted);
  margin-bottom: 20px;
  position: relative;
  font-size: 0.9rem;
}

.social-text::before,
.social-text::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border-color);
}

.social-text::before {
  left: 0;
}

.social-text::after {
  right: 0;
}

.social-buttons {
  display: flex;
  gap: 15px;
}

.social-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: var(--radio-borde);
  background: var(--bg-card);
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--sombra-box);
  border-color: var(--color-primario);
}

.social-btn.google:hover {
  color: #4285f4;
  border-color: #4285f4;
}

.social-btn.facebook:hover {
  color: #1877f2;
  border-color: #1877f2;
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */
@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes panelSlide {
  0% {
    clip-path: ellipse(100% 100% at 100% 50%);
  }

  50% {
    clip-path: ellipse(150% 100% at 50% 50%);
  }

  100% {
    clip-path: ellipse(100% 100% at 0% 50%);
  }
}

.sliding-panel.animating {
  animation: panelSlide 0.8s ease-in-out;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .auth-container {
    flex-direction: column;
    max-width: 400px;
    min-height: auto;
  }

  .sliding-panel {
    position: relative;
    width: 100%;
    height: 200px;
    right: 0;
    left: 0;
    clip-path: none;
    order: -1;
  }

  .sliding-panel.register-mode {
    clip-path: none;
  }

  .form-container {
    width: 100%;
    padding: 40px 30px;
  }

  .register-container {
    transform: none;
    position: absolute;
    top: 200px;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .login-container.inactive {
    transform: none;
    display: none;
  }

  .panel-title {
    font-size: 1.8rem;
  }

  .panel-subtitle {
    font-size: 1rem;
  }

  .social-buttons {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 10px;
  }

  .form-container {
    padding: 30px 20px;
  }

  .form-title {
    font-size: 1.8rem;
  }
}