/* Auth Pages Styles */
body.auth-page {
  padding-top: 0 !important;
  background: var(--bg-primary);
}

/* ============================================
   SPLIT LAYOUT (Professional Modern Design)
   ============================================ */
.auth-split-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  /* Default to column for mobile */
  flex-direction: column;
}

@media (max-width: 1023px) {
  .auth-split-layout {
    min-height: auto;
    overflow: visible;
    /* Ensure scrolling works on mobile */
    height: auto;
  }

  /* Ensure the body scrolls */
  body.auth-page {
    overflow-y: auto;
  }
}

@media (min-width: 1024px) {
  .auth-split-layout {
    flex-direction: row;
    /* Row for desktop */
  }
}

/* LEFT SIDE: Visual/Marketing */
.auth-graphic-side {
  display: flex;
  /* Always visible now */
  width: 100%;
  min-height: 35vh;
  /* Changed from fixed height to min-height */
  /* Hero section on mobile */
  background:
    linear-gradient(135deg, rgba(var(--accent-primary-rgb), 0.9), rgba(var(--accent-secondary-rgb), 0.8)),
    url('../assets/Images/chess-focus.webp') center/cover;
  /* Fallback or actual image if available */
  position: relative;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem;
  /* Reduced padding for mobile */
  color: var(--bg-primary);
  /* Contrast text */
  overflow: hidden;
  /* Prevent overflow */
}

/* Geometric shapes in the graphic side */
.graphic-shape {
  position: absolute;
  background: white;
  opacity: 0.1;
  border-radius: 50%;
  filter: blur(60px);
}

.graphic-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.graphic-quote {
  font-family: var(--font-family-display);
  font-family: var(--font-family-display);
  font-size: 1.5rem;
  /* Reduced base size for mobile */
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.graphic-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.graphic-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

/* RIGHT SIDE: Form */
.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  background: var(--bg-primary);
}

.auth-form-container {
  width: 100%;
  max-width: 480px;
  animation: fadeIn 0.6s ease-out;
}

/* Standard Auth Styles (Preserved but Scoped) */
.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-form label {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: block;
  color: var(--text-primary);
  font-weight: 600;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: color 0.3s ease;
  z-index: 2;
}


.auth-input {
  width: 100%;
  padding: 14px 16px 14px 52px !important;
  /* Force padding to prevent overlap */
  background: var(--bg-tertiary);
  border: 2px solid var(--border-secondary);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-primary);
  box-shadow: 0 0 0 4px rgba(var(--accent-primary-rgb), 0.15);
}

.auth-input:focus+.input-icon {
  color: var(--accent-primary);
}

/* Password Toggle - Fixed Positioning */
.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  z-index: 5;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: var(--text-primary);
}

/* Social Buttons */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: 0.75rem;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.social-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

.social-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

.auth-btn {
  width: 100%;
  margin-top: 1rem;
  font-size: 1.1rem;
  padding: 1rem;
  display: flex;
  /* Flexbox for centering */
  justify-content: center;
  /* Horizontally center */
  align-items: center;
  /* Vertically center */
  text-align: center;
}

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

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-secondary);
}

.divider::before {
  margin-right: 1rem;
}

.divider::after {
  margin-left: 1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (min-width: 1024px) {
  .auth-graphic-side {
    width: 45%;
    min-height: 100vh;
    /* Full height on desktop */
    padding: 4rem;
    /* Restore larger padding on desktop */
  }

  .graphic-quote {
    font-size: 2rem;
    /* Restore larger font on desktop */
    margin-bottom: 2rem;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Light Mode Overrides for Auth */
body.light-mode .auth-graphic-side {
  color: white;
  /* Ensure text remains white on the colored gradient side */
}

body.light-mode .graphic-shape {
  background: rgba(255, 255, 255, 0.2);
}

body.light-mode .auth-input {
  background: #f9fafb;
  /* Lighter background for inputs in light mode */
  border-color: #e5e7eb;
}

body.light-mode .auth-input:focus {
  background: white;
  border-color: var(--accent-primary);
}