.auth-wrapper {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

/* Infinite scrolling movie poster background (darkened + blurred) */

.auth-poster-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #000;
  pointer-events: none;
}

.auth-poster-bg .poster-grid {
  position: absolute;
  inset: -80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  filter: blur(10px) brightness(0.28) saturate(1.15);
  transform: perspective(1300px) rotateX(8deg) rotateZ(-9deg) scale(1.15);
  transform-origin: 50% 50%;
}

.auth-poster-bg .poster-row {
  display: flex;
  width: max-content;
  padding: 14px 0;
  will-change: transform;
  animation: auth-poster-scroll linear infinite;
}

.auth-poster-bg .poster-track {
  display: flex;
  gap: 14px;
  padding-right: 14px;
  flex: none;
}

.auth-poster-bg .poster-track img {
  width: 112px;
  height: 168px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
  display: block;
}

@keyframes auth-poster-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Dark vignette overlay so the auth card stays readable */
.auth-poster-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(0, 0, 0, 0.30) 0%, rgba(0, 0, 0, 0.78) 100%),
    rgba(0, 0, 0, 0.45);
}

/* Generic hide utility (Bootstrap 5 ships .d-none, not .hidden) */

.hidden {
  display: none !important;
}

.auth-card {
  background-color: var(--secondary-bg);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.auth-card.hidden {
  display: none;
}

/* Header Section */

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 8px;
}

/* Social Buttons Fixed Alignment */

.social-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-social {
  width: 100%;
  background-color: var(--tertiary-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-social:hover {
  background-color: #333333;
}

.btn-social img {
  width: 18px;
  height: 18px;
  position: absolute;
  left: 20px;
}

/* Divider Splitter */

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--text-tertiary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(248, 249, 250, 0.08);
}

.divider:not(:empty)::before {
  margin-right: .75em;
}

.divider:not(:empty)::after {
  margin-left: .75em;
}

/* Form Elements & Inputs - Completely Rebuilt to Fix the Bug */

.input-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.label-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: transparent;
  border: none;
}

/* Strict Clean Labels */

label {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 0 8px 0 !important;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
}

.view-trigger {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.view-trigger:hover {
  text-decoration: underline;
}

/* Pristine Input Fields */

input {
  width: 100%;
  padding: 14px 16px;
  background-color: var(--tertiary-bg);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-color);
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

input::placeholder {
  color: var(--text-tertiary);
}

/* Password field with visibility toggle */

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

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

.password-toggle .eye-closed {
  display: none;
}

.password-toggle.visible .eye-open {
  display: none;
}

.password-toggle.visible .eye-closed {
  display: block;
}

/* Password strength meter */

.password-strength {
  margin-top: 8px;
  display: none;
}

.password-strength.active {
  display: block;
}

.strength-bars {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.strength-bar {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background-color: var(--tertiary-bg);
  transition: background-color 0.2s;
}

.strength-bar.lvl-1, .strength-bar.lvl-2 {
  background-color: var(--danger);
}

.strength-bar.lvl-3 {
  background-color: var(--warning);
}

.strength-bar.lvl-4 {
  background-color: var(--success);
}

.strength-text {
  font-size: 12px;
  color: var(--text-tertiary);
}

.strength-text.weak {
  color: var(--danger);
}

.strength-text.fair {
  color: var(--warning);
}

.strength-text.good {
  color: var(--success);
}

/* Confirm password hint */

.confirm-hint {
  min-height: 18px;
  margin-top: 6px;
  font-size: 12px;
}

.confirm-hint.ok {
  color: var(--success);
}

.confirm-hint.mismatch {
  color: var(--danger);
}

/* Submission Button */

.btn-primary {
  width: 100%;
  padding: 14px;
  background-color: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Alert / feedback */

.auth-alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.4;
}

.auth-alert.error {
  background-color: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.auth-alert.success {
  background-color: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.auth-alert.info {
  background-color: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.4);
  color: #a5f3fc;
}

.auth-alert.hidden {
  display: none;
}

.opt {
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 400;
}

/* Back link for hybrid flow */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--text-color);
}

/* Footer Links */

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

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

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

