/* Hybrid Split - Format 2 + Decorations from 3 + Social buttons */
html,
body {
  overflow: hidden;
  height: 100%;
  margin: 0;
  padding: 0;
}

.login-container {
  height: 100vh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-dark);
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

/* Decorative elements from option 3 */
.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(
      ellipse 80% 50% at 20% 40%,
      rgba(255, 255, 255, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 60%,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.wave-decoration {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
}

.wave-line {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.wave-line:nth-child(1) {
  width: 800px;
  height: 800px;
  top: -300px;
  right: -200px;
}

.wave-line:nth-child(2) {
  width: 600px;
  height: 600px;
  bottom: -200px;
  left: -200px;
}

.wave-line:nth-child(3) {
  width: 300px;
  height: 300px;
  top: 60%;
  left: 30%;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.orb-1 {
  width: 400px;
  height: 400px;
  top: 5%;
  right: 10%;
  background: rgba(168, 85, 247, 0.5);
}

.orb-2 {
  width: 300px;
  height: 300px;
  bottom: 10%;
  left: 5%;
  background: rgba(124, 58, 237, 0.5);
}

.auth-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 100%;
  max-height: 100vh;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

/* Split Card Layout */
.auth-card-scene {
  width: 100%;
  height: 100%;
  perspective: 1500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 850px;
  height: clamp(500px, 85vh, 600px);
  position: relative;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.auth-card.flipped {
  transform: rotateY(180deg);
}

.auth-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

.auth-back {
  transform: rotateY(180deg);
}

/* Left Panel */
.left-panel {
  width: 42%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  position: relative;
  overflow: hidden;
}

.left-panel::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -30%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.panel-header {
  position: relative;
  z-index: 2;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    110deg,
    #ffffff 20%,
    #e0e7ff 40%,
    #ffffff 50%,
    #c7d2fe 80%,
    #a5b4fc 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--primary);
}

.panel-title {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.panel-subtitle {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.5;
}

.panel-illustration {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 150px;
}

.illustration-box {
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.illustration-box svg {
  width: 60px;
  height: 60px;
  fill: white;
}

/* Right Panel */
.right-panel {
  width: 58%;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-header-fixed {
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.auth-header-fixed h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.auth-header-fixed p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-body-flex {
  flex: 1;
  display: flex;
  overflow-y: auto;
  overflow-x: hidden;
}

.form-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

/* Social Buttons from option 1 */
.social-buttons {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: var(--border);
  transform: translateY(-1px);
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Form Styles */
.form-group {
  margin-bottom: 0.6rem;
}

.form-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.form-group input {
  background: var(--surface-light);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 8px;
  color: var(--text);
}

.form-group input:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  outline: none;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

/* Submit Buttons */
.btn-auth {
  width: 100%;
  height: 38px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-top: 0.4rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
  position: relative;
  overflow: hidden;
}

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

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

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

/* Footer */
.auth-footer-fixed {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Switch Styling */
.switch-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 4px 12px;
  background: var(--surface-light);
  border-radius: 50px;
  width: fit-content;
}

.switch-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
  opacity: 0.6;
}

.switch-label.active-side {
  color: var(--primary);
  opacity: 1;
  font-weight: 700;
}

.premium-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.premium-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border);
  transition: 0.3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-toggle:checked + .slider {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
}

.auth-toggle:checked + .slider:before {
  transform: translateX(20px);
}

/* Message styling */
#mensaje {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  padding: 0.75rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  text-align: center;
  max-width: 100%;
}

#mensaje:empty {
  display: none;
}

#mensaje.info {
  background: rgba(var(--primary-rgb), 0.08);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  color: var(--primary);
}

#mensaje.success {
  background: rgba(var(--success-rgb), 0.08);
  border: 1px solid rgba(var(--success-rgb), 0.2);
  color: var(--success);
}

#mensaje.error {
  background: rgba(var(--danger-rgb), 0.08);
  border: 1px solid rgba(var(--danger-rgb), 0.2);
  color: var(--danger);
}

#mensaje.warning {
  background: rgba(var(--amber-rgb), 0.08);
  border: 1px solid rgba(var(--amber-rgb), 0.2);
  color: var(--amber);
}

/* Loading State */
.btn-auth.loading {
  color: transparent;
}

.btn-auth.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .auth-card {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .auth-face {
    border-radius: 0;
    flex-direction: column;
  }

  .left-panel {
    width: 100%;
    height: 30%;
    min-height: 180px;
    padding: 1.5rem;
  }

  .right-panel {
    width: 100%;
    height: 70%;
    padding: 1.5rem;
  }

  .panel-title {
    font-size: 1.3rem;
  }

  .illustration-box {
    width: 80px;
    height: 80px;
  }

  .illustration-box svg {
    width: 40px;
    height: 40px;
  }
}

/* Shine Animation */
@keyframes shine {
  to {
    background-position: 200% center;
  }
}
