#auth-modal {
  padding: 0;
  border: none;
  border-radius: var(--border-radius-lg);
  background: transparent;
  width: auto;
  height: auto;
  max-width: 900px;
  max-height: 600px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

#auth-modal::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.auth-modal-content {
  background: var(--pico-card-background-color);
  border-radius: var(--border-radius-lg);
  padding: 0;
  margin: 0;
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  min-width: 800px;
  min-height: 500px;
  max-width: 900px;
  max-height: 600px;
}

.auth-modal-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: transparent;
  position: relative;
  z-index: 10;
  margin: 0 !important;
}

.auth-modal-close {
  background: rgba(255, 255, 255, 0.1) !important;
  border: none !important;
  padding: var(--spacing-xs) !important;
  cursor: pointer !important;
  color: rgba(24, 24, 24, 0.9) !important;
  border-radius: 50% !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.1);
}

.auth-modal-close:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5) !important;
  outline-offset: 2px !important;
}

.auth-modal-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
}

/* Hero Section (Lado izquierdo) */
.auth-hero-section {
  position: relative;
  background: transparent;
  padding: var(--spacing-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.auth-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.auth-hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  color: white;
}

.auth-heart-icon {
  display: inline-block;
  padding: var(--spacing-md);
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #ff6b6b;
  backdrop-filter: blur(10px);
  margin-bottom: var(--spacing-md);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.auth-main-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 var(--spacing-md) 0;
  line-height: 1.2;
  font-family: 'Source Serif 4', serif;
}

.auth-subtitle {
  font-size: 1.1rem;
  margin: 0 0 var(--spacing-xl) 0;
  opacity: 0.9;
  line-height: 1.5;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.9rem;
  opacity: 0.9;
}

.feature-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

/* Form Section (Lado derecho) */
.auth-form-section {
  padding: var(--spacing-xl);
  background: var(--pico-card-background-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-forms-container {
  width: 100%;
  max-width: 320px;
}

.form-section-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 var(--spacing-lg) 0;
  color: var(--color);
  text-align: center;
  font-family: 'Source Serif 4', serif;
}

.form-placeholder {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  padding: var(--spacing-xl);
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--border-radius-md);
  border: 2px dashed var(--muted-border-color);
}

.demo-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.demo-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-sm);
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.demo-btn.primary {
  background: var(--color-gen);
  color: white;
}

.demo-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 7px rgba(102, 126, 234, 0.4);
}

.demo-btn.secondary {
  background: transparent;
  color: var(--color);
  border: 1px solid var(--muted-border-color);
}

.demo-btn.secondary:hover {
  background: var(--muted-border-color);
}

/* Responsive: Tablet */
@media (max-width: 768px) {
  #auth-modal {
    max-width: 95vw;
    max-height: 85vh;
  }
  
  .auth-modal-content {
    min-width: 90vw;
    min-height: 70vh;
  }
  
  .auth-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  
  .auth-hero-section {
    padding: var(--spacing-lg);
    min-height: 200px;
  }
  
  .auth-main-title {
    font-size: 1.75rem;
  }
  
  .auth-features {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
  }
  
  .feature-item {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-xs);
    font-size: 0.8rem;
  }
  
  .auth-form-section {
    padding: var(--spacing-lg);
  }
}

/* Responsive: Mobile */
@media (max-width: 480px) {
  #auth-modal {
    max-width: 98vw;
    max-height: 90vh;
    border-radius: var(--border-radius-md);
  }
  
  .auth-modal-content {
    border-radius: var(--border-radius-md);
    min-width: 95vw;
    min-height: 80vh;
  }
  
  .auth-hero-section {
    padding: var(--spacing-md);
    min-height: 180px;
  }
  
  .auth-main-title {
    font-size: 1.5rem;
  }
  
  .auth-subtitle {
    font-size: 1rem;
    max-width: none;
  }
  
  .auth-features {
    display: none; /* Ocultar features en mobile para ahorrar espacio */
  }
  
  .auth-form-section {
    padding: var(--spacing-md);
  }
  
  .form-section-title {
    font-size: 1.5rem;
  }
  
  .form-placeholder {
    padding: var(--spacing-lg);
  }
}

/* Tema oscuro */
[data-theme="dark"] #auth-modal {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .auth-form-section {
  background: var(--pico-card-background-color);
}

[data-theme="dark"] .form-placeholder {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .demo-btn.secondary {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .demo-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Modo automático oscuro */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #auth-modal {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  }
  
  :root:not([data-theme="light"]) .form-placeholder {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  :root:not([data-theme="light"]) .demo-btn.secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
  }
  
  :root:not([data-theme="light"]) .demo-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* Animaciones de entrada */
#auth-modal {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#auth-modal[open] {
  opacity: 1;
  transform: scale(1);
}

#auth-modal[open] .auth-hero-content {
  animation: slideInLeft 0.5s ease-out 0.2s both;
}

#auth-modal[open] .auth-forms-container {
  animation: slideInRight 0.5s ease-out 0.3s both;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

body.modal-open {
  overflow: hidden;
}