/* Retro Future Login Form - Complete & Self-Contained */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial Black", Arial, sans-serif;
  background: linear-gradient(
    135deg,
    #0a0a2e 0%,
    #16213e 25%,
    #0f3460 50%,
    #533483 75%,
    #e94560 100%
  );
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  line-height: 1.4;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Retro Background */
.retro-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.y2k-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(
      circle at 25% 25%,
      rgba(255, 0, 255, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(0, 255, 255, 0.1) 0%,
      transparent 50%
    );
}

.grid-dots {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle at 2px 2px,
    rgba(255, 255, 0, 0.3) 1px,
    transparent 0
  );
  background-size: 40px 40px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(40px, 40px);
  }
}

.scanner-lines {
  position: absolute;
  width: 100%;
  height: 100%;
}

.scan-line {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 255, 255, 0.8),
    transparent
  );
  animation: scanMove 8s linear infinite;
}

.scan-1 {
  top: 20%;
  animation-delay: 0s;
}

.scan-2 {
  top: 50%;
  animation-delay: -3s;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 0, 255, 0.8),
    transparent
  );
}

.scan-3 {
  top: 80%;
  animation-delay: -6s;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 0, 0.8),
    transparent
  );
}

@keyframes scanMove {
  0% {
    left: -100%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

.floating-orbs {
  position: absolute;
  width: 100%;
  height: 100%;
}

.retro-orb {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.3),
    transparent 70%
  );
  filter: blur(2px);
  animation: orbFloat 15s ease-in-out infinite;
}

.orb-1 {
  top: 10%;
  left: 10%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 0, 255, 0.2),
    transparent 70%
  );
  animation-delay: 0s;
}

.orb-2 {
  top: 70%;
  right: 15%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(0, 255, 255, 0.2),
    transparent 70%
  );
  animation-delay: -5s;
}

.orb-3 {
  bottom: 20%;
  left: 20%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 0, 0.2),
    transparent 70%
  );
  animation-delay: -10s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(50px, -30px) scale(1.1);
  }
  50% {
    transform: translate(-30px, -50px) scale(0.9);
  }
  75% {
    transform: translate(-50px, 30px) scale(1.05);
  }
}

.login-container {
  width: 100%;
  max-width: 450px;
  position: relative;
  z-index: 1;
}

.future-card {
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  position: relative;
  /* Shrink to active panel height; max-height caps signup scroll */
  height: auto;
  min-height: 0;
}

/* Language switcher — inside card, top (same for login / forgot / signup) */
.auth-lang-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 8px 12px;
  margin: -8px 0 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.auth-lang-pill:hover {
  color: #fff;
  border-color: rgba(0, 255, 255, 0.45);
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.15);
}

.auth-lang-pill.is-active {
  color: #fff;
  border-color: rgba(255, 0, 255, 0.5);
  background: linear-gradient(
    145deg,
    rgba(255, 0, 255, 0.12),
    rgba(0, 255, 255, 0.08)
  );
  box-shadow: 0 0 16px rgba(255, 0, 255, 0.2);
}

.auth-lang-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.auth-lang-code {
  font-size: 10px;
}

html[dir="rtl"] .auth-lang-switcher {
  flex-direction: row;
}

.future-card-scroll {
  /* Grow only when signup/forgot needs scroll; no flex:1 fill on short login */
  flex: 0 1 auto;
  min-height: 0;
  max-height: min(70vh, calc(100vh - 120px));
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.future-card-scroll::-webkit-scrollbar {
  display: none;
}

/*
 * Auth panels: login | forgot | signup — one horizontal row (300% width).
 * All three panels stay in normal flex flow so each occupies its own third.
 * (Absolute off-flow panels + translate used to show the *middle* third = empty strip — bug.)
 */
/*
 * Strip must stay LTR: with html[dir=rtl], flex row packs items from the right,
 * so the visible "left" third is empty/wrong — content disappears for Arabic.
 */
.auth-panels,
.auth-panels-inner {
  direction: ltr;
}

.auth-panels {
  overflow: hidden;
  width: 100%;
}

.auth-panels-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  width: 300%;
  /* Height set by JS to active panel only — avoids login inheriting signup tallness */
  transition:
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  transform: translateX(0);
  overflow: hidden;
}

.auth-panels.show-forgot .auth-panels-inner {
  transform: translateX(calc(-100% / 3));
}

.auth-panels.show-signup .auth-panels-inner {
  transform: translateX(calc(-200% / 3));
}

.auth-panel {
  box-sizing: border-box;
  width: calc(100% / 3);
  flex: 0 0 calc(100% / 3);
  min-width: calc(100% / 3);
  max-width: calc(100% / 3);
}

.recover-panel-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.8px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.recover-contact-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.recover-contact-btn {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.03)
  );
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.recover-contact-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.recover-contact-call:hover {
  border-color: rgba(0, 255, 255, 0.6);
}

.recover-contact-whatsapp:hover {
  border-color: rgba(37, 211, 102, 0.7);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.15);
}

.recover-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  line-height: 0;
}

.recover-contact-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.recover-contact-call .recover-contact-icon--phone {
  color: rgba(0, 255, 255, 0.95);
}

.recover-contact-whatsapp .recover-contact-icon--whatsapp {
  color: #25d366;
}

.recover-contact-whatsapp:hover .recover-contact-icon--whatsapp {
  color: #2ee576;
}

.auth-panel .chrome-header {
  margin-bottom: 40px;
}

.future-login {
  margin-top: 24px;
}

.future-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  backdrop-filter: blur(20px);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.3),
    0 10px 30px rgba(255, 0, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.future-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
  background-size: 400% 400%;
  animation: chromeShift 6s ease-in-out infinite;
  border-radius: 24px;
  z-index: -2;
}

@keyframes chromeShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.future-card::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background: linear-gradient(
    145deg,
    rgba(16, 16, 40, 0.95),
    rgba(32, 32, 64, 0.9)
  );
  border-radius: 22px;
  z-index: -1;
}

.chrome-header {
  text-align: center;
  margin-bottom: 40px;
}

.retro-logo {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-chrome {
  position: relative;
  width: 64px;
  height: 64px;
  background: linear-gradient(145deg, #e6e6fa, #c0c0ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: logoRotate 8s linear infinite;
}

@keyframes logoRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.chrome-inner {
  position: relative;
  z-index: 2;
  animation: logoRotate 8s linear infinite reverse;
}

.chrome-glow {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: conic-gradient(from 0deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
  border-radius: 50%;
  animation: glowRotate 4s linear infinite;
  z-index: 0;
  filter: blur(8px);
}

@keyframes glowRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.y2k-title {
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: 2px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.title-chrome {
  background: linear-gradient(45deg, #e6e6fa, #c0c0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.title-neon {
  background: linear-gradient(45deg, #ff00ff, #00ffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 0, 255, 0.8);
  animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
  0% {
    filter: brightness(1);
  }
  100% {
    filter: brightness(1.3);
  }
}

.retro-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 1px;
}

/* Retro Form Fields */
.retro-field {
  position: relative;
  margin-bottom: 28px;
  padding-top: 20px;
}

.field-chrome {
  position: relative;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  overflow: visible;
  transition: all 0.3s ease;
}

.chrome-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
  background-size: 400% 400%;
  animation: borderShift 4s ease-in-out infinite;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@keyframes borderShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.retro-field input {
  width: 100%;
  background: transparent;
  border: none;
  padding: 18px 16px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  position: relative;
  z-index: 2;
  font-family: inherit;
  letter-spacing: 1px;
}

.retro-field input::placeholder {
  color: transparent;
}

/* Retro select (e.g. Role) — match input styling */
.retro-field select {
  width: 100%;
  background: transparent !important;
  border: none !important;
  padding: 18px 40px 18px 16px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  outline: none;
  position: relative;
  z-index: 2;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

.retro-field select option {
  background: #1a1a3e;
  color: #ffffff;
}

.retro-field select:focus + label,
.retro-field select:valid + label {
  top: -18px;
  font-size: 11px;
  color: #00ffff;
  transform: translateY(0);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Extra specificity for Role select in auth page */
.login-container #signupRole {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
}

.retro-field label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 3;
  letter-spacing: 1px;
}

.retro-field input:focus + label,
.retro-field input:not(:placeholder-shown) + label {
  top: -18px;
  font-size: 11px;
  color: #00ffff;
  transform: translateY(0);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.field-hologram {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff00ff, #00ffff);
  transition: width 0.3s ease;
  z-index: 2;
}

/* Password Toggle */
.retro-field:has(.retro-toggle) input {
  padding-right: 56px;
}

.retro-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 4;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.toggle-chrome {
  width: 20px;
  height: 20px;
  transition: all 0.2s ease;
}

.retro-toggle:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.eye-hidden {
  display: none;
}

.retro-toggle.toggle-active .eye-future {
  display: none;
}

.retro-toggle.toggle-active .eye-hidden {
  display: block;
}

/* Future Options */
.future-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.retro-checkbox {
  display: flex;
  align-items: center;
  gap: 18px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  letter-spacing: 1px;
}

.retro-checkbox input[type="checkbox"] {
  display: none;
}

.checkbox-chrome {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-frame {
  width: 100%;
  height: 100%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  transition: all 0.3s ease;
  position: absolute;
}

.check-hologram {
  opacity: 0;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 1;
}

.retro-checkbox input[type="checkbox"]:checked + .checkbox-chrome .check-frame {
  background: linear-gradient(
    45deg,
    rgba(0, 255, 255, 0.2),
    rgba(255, 0, 255, 0.2)
  );
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.retro-checkbox
  input[type="checkbox"]:checked
  + .checkbox-chrome
  .check-hologram {
  opacity: 1;
}

.future-link {
  color: #ff00ff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.2s ease;
  position: relative;
}

.future-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #ff00ff, #00ffff);
  transition: width 0.3s ease;
}

.future-link:hover::after {
  width: 100%;
}

.future-link:hover {
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Retro Button */
.retro-button {
  width: 100%;
  background: transparent;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  position: relative;
  margin-bottom: 32px;
  overflow: hidden;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.button-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
  background-size: 400% 400%;
  animation: buttonShift 3s ease-in-out infinite;
  border-radius: 12px;
  z-index: 1;
}

@keyframes buttonShift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.retro-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(255, 0, 255, 0.3);
}

.retro-button:active {
  transform: translateY(0);
}

/* Forgot password: submit disabled until valid email */
.retro-button--recover-submit:disabled,
.retro-button--recover-submit[aria-disabled="true"] {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 1;
}

.retro-button--recover-submit:disabled .button-chrome {
  animation: none;
  background: linear-gradient(
    145deg,
    rgba(80, 80, 100, 0.85),
    rgba(50, 50, 70, 0.9)
  );
  background-size: 100% 100%;
  filter: grayscale(0.5);
}

.retro-button--recover-submit:disabled .button-text {
  color: rgba(255, 255, 255, 0.45);
  text-shadow: none;
}

.retro-button--recover-submit:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Signup: submit disabled until terms accepted */
.retro-button--signup-submit:disabled,
.retro-button--signup-submit[aria-disabled="true"] {
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  opacity: 1;
}

.retro-button--signup-submit:disabled .button-chrome {
  animation: none;
  background: linear-gradient(
    145deg,
    rgba(80, 80, 100, 0.85),
    rgba(50, 50, 70, 0.9)
  );
  background-size: 100% 100%;
  filter: grayscale(0.5);
}

.retro-button--signup-submit:disabled .button-text {
  color: rgba(255, 255, 255, 0.45);
  text-shadow: none;
}

.retro-button--signup-submit:disabled:hover {
  transform: none;
  box-shadow: none;
}

.button-text {
  position: relative;
  z-index: 2;
  transition: opacity 0.3s ease;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.button-text-loading {
  display: none;
  position: relative;
  z-index: 2;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.retro-button.loading .button-text {
  display: none;
}

.retro-button.loading .button-text-loading {
  display: inline-flex;
}

.button-loading-spinner {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: buttonSpinner 0.7s linear infinite;
}

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

.button-hologram {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff00ff, #00ffff);
  border-radius: 14px;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.3s ease;
  z-index: 0;
}

.retro-button:hover .button-hologram {
  opacity: 0.5;
}

/* Retro Divider */
.retro-divider {
  display: flex;
  align-items: center;
  margin: 32px 0;
  gap: 16px;
}

.divider-chrome {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  position: relative;
  overflow: hidden;
}

.divider-chrome::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #00ffff, transparent);
  animation: dividerScan 4s linear infinite;
}

@keyframes dividerScan {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.divider-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Future Social */
.future-social {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.social-retro {
  flex: 1;
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  min-height: 48px;
  position: relative;
  overflow: hidden;
  letter-spacing: 1px;
}

.social-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.02)
  );
  transition: all 0.3s ease;
}

.social-retro:hover {
  border-color: rgba(0, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
}

.social-retro:hover .social-chrome {
  background: linear-gradient(
    145deg,
    rgba(0, 255, 255, 0.1),
    rgba(255, 0, 255, 0.1)
  );
}

.social-retro span,
.social-retro svg {
  position: relative;
  z-index: 2;
}

.social-hologram {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: rgba(0, 255, 255, 0.3);
  border-radius: 9px;
  opacity: 0;
  filter: blur(6px);
  transition: opacity 0.3s ease;
  z-index: 0;
}

.social-retro:hover .social-hologram {
  opacity: 1;
}

/* Future Signup */
.future-signup {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}

.signup-text {
  margin-right: 6px;
}

.signup-link {
  font-weight: 600;
}

/* Retro Error */
.retro-error {
  color: #ff4da6;
  font-size: 12px;
  font-weight: 500;
  margin-top: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s ease;
  position: relative;
  z-index: 5;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 77, 166, 0.5);
}

.retro-error.show {
  opacity: 1;
  transform: translateY(0);
}

/* Success / info lines (e.g. check email, password saved): same tone as .retro-field label */
.retro-message.retro-message--success,
.retro-message--success {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: none;
  margin-top: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s ease;
  position: relative;
  z-index: 5;
  display: block;
}

.retro-message.retro-message--success.show,
.retro-message--success.show {
  opacity: 1;
  transform: translateY(0);
}

/* Standalone reset-password page: gap between form-level message and submit button */
#resetPasswordForm #resetFormError.show {
  display: block;
  margin-bottom: 1.25rem;
}

/* Account deleted/blocked: prominent red message (child span when shown) */
.retro-error .retro-error--blocked,
.retro-error--blocked {
  color: #e53935;
  font-weight: 600;
  text-shadow: 0 0 12px rgba(229, 57, 53, 0.6);
}

.retro-field.error .field-chrome {
  border-color: #ff4da6;
  box-shadow: 0 0 15px rgba(255, 77, 166, 0.3);
}

.retro-field.error label {
  color: #ff4da6;
}

/* Signup location cascade: show/hide — fully collapse so no stray element shows */
.signup-cascade-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  pointer-events: none !important;
}

.signup-cascade-block {
  margin-bottom: 28px;
  padding-top: 20px;
}

.signup-cascade-block .retro-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

/* Hide label once user has selected an option */
.signup-cascade-block:has(.user-searchable-select-trigger.has-selection)
  > .retro-label {
  display: none;
}

/* Signup location select root: full width so trigger never looks like a short bar */
.auth-panel-signup .signup-location-select-root {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.auth-panel-signup
  .signup-location-select-root
  .user-searchable-select-trigger {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100% !important;
  min-width: 0;
  min-height: 52px;
  padding: 18px 16px;
  box-sizing: border-box;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 1px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
  outline: none;
  box-shadow: none;
}

.auth-panel-signup
  .signup-location-select-root
  .user-searchable-select-trigger:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.06)
  );
}

.auth-panel-signup
  .signup-location-select-root
  .user-searchable-select-trigger:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.auth-panel-signup
  .signup-location-select-root
  .user-searchable-select-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-panel-signup
  .retro-field.error
  .signup-location-select-root
  .user-searchable-select-trigger {
  border-color: #ff4da6;
  box-shadow: none;
}

/* Trigger text: takes remaining space, selected value and × on same line */
.auth-panel-signup
  .signup-location-select-root
  .user-searchable-select-trigger-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Clear (×) button: same line as selected value, no wrap */
.auth-panel-signup
  .signup-location-select-root
  .user-searchable-select-clear-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.8);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.auth-panel-signup
  .signup-location-select-root
  .user-searchable-select-clear-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Dropdown visibility (login page has no Tailwind — .hidden must be defined) */
body:has(.login-container) .user-searchable-select-dropdown.hidden {
  display: none !important;
}

/* Dropdown panel (portaled to body): professional style on login page, no gradient glow */
body:has(.login-container) .user-searchable-select-dropdown {
  background: linear-gradient(145deg, #1a1a3e 0%, #0f3460 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  min-width: 200px;
  overflow: hidden;
}

/* List: scrollable options (login page) */
body:has(.login-container) .user-searchable-select-list {
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 8px 10px;
}

body:has(.login-container) .user-searchable-select-list::-webkit-scrollbar {
  width: 6px;
}

body:has(.login-container)
  .user-searchable-select-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
}

body:has(.login-container)
  .user-searchable-select-list::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.4);
  border-radius: 99px;
}

body:has(.login-container)
  .user-searchable-select-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 255, 0.55);
}

body:has(.login-container)
  .user-searchable-select-dropdown
  .user-searchable-option {
  padding: 10px 14px;
  border-radius: 8px;
  color: #ffffff;
  transition: background-color 0.15s ease;
}

body:has(.login-container)
  .user-searchable-select-dropdown
  .user-searchable-option:hover {
  background: rgba(0, 255, 255, 0.12);
}

body:has(.login-container)
  .user-searchable-select-dropdown
  .user-searchable-option.bg-primary\/10 {
  background: rgba(0, 255, 255, 0.15);
}

body:has(.login-container) .user-searchable-select-empty {
  padding: 24px 16px;
  color: rgba(255, 255, 255, 0.6);
}

/* Dropdown search input: match form style, no glowing border */
body:has(.login-container) .user-searchable-select-dropdown input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  color: #ffffff;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  outline: none;
}

body:has(.login-container) .user-searchable-select-dropdown input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
}

/* Retro Success */
.retro-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.retro-success.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.success-portal {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-rings {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.portal-ring {
  position: absolute;
  border: 2px solid transparent;
  border-radius: 50%;
  animation: portalExpand 1.5s ease-out forwards;
  opacity: 0;
}

.ring-1 {
  width: 60px;
  height: 60px;
  top: 30px;
  left: 30px;
  border-color: #ff00ff;
  animation-delay: 0s;
}

.ring-2 {
  width: 80px;
  height: 80px;
  top: 20px;
  left: 20px;
  border-color: #00ffff;
  animation-delay: 0.2s;
}

.ring-3 {
  width: 100px;
  height: 100px;
  top: 10px;
  left: 10px;
  border-color: #ffff00;
  animation-delay: 0.4s;
}

.ring-4 {
  width: 120px;
  height: 120px;
  top: 0;
  left: 0;
  border-color: #ff00ff;
  animation-delay: 0.6s;
}

@keyframes portalExpand {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(180deg);
  }
  100% {
    opacity: 0.8;
    transform: scale(1) rotate(360deg);
  }
}

.success-core {
  position: relative;
  z-index: 2;
  animation: coreActivate 0.8s ease-out 0.8s forwards;
  opacity: 0;
}

@keyframes coreActivate {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.success-title {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: 2px;
  background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleShimmer 2s ease-in-out infinite;
}

@keyframes titleShimmer {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3);
  }
}

.success-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  letter-spacing: 1px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .future-card {
    padding: 36px 28px;
    border-radius: 20px;
  }

  .y2k-title {
    font-size: 1.75rem;
    flex-direction: column;
    gap: 4px;
  }

  .retro-logo {
    width: 64px;
    height: 64px;
  }

  .logo-chrome {
    width: 52px;
    height: 52px;
  }

  .future-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .future-social {
    flex-direction: column;
  }

  .floating-orbs {
    opacity: 0.5;
  }

  .grid-dots {
    opacity: 0.3;
  }

  .scan-line {
    opacity: 0.6;
  }
}

/* Signup password strength indicator – visible on dark background */
.signup-pwd-strength {
  background: rgba(255, 255, 255, 0.25) !important;
  height: 6px;
  border-radius: 9999px;
  overflow: hidden;
}

.signup-pwd-strength-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease, background-color 0.3s ease;
  min-width: 0;
}

.signup-pwd-strength-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

/* Signup: terms consent row */
.retro-terms-card {
  margin-bottom: 18px;
  border-radius: 14px;
  padding: 12px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.retro-terms {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: nowrap;
  line-height: 1.35;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.85);
  user-select: none;
  cursor: pointer;
}

.retro-terms__checkbox {
  width: 18px;
  height: 18px;
  margin-top: 0;
  accent-color: #00ffff;
  flex: 0 0 auto;
}

.retro-terms__text {
  font-size: 13px;
  flex: 1 1 220px;
  min-width: 0;
}

.retro-terms__link {
  color: #00ffff;
  text-decoration: underline;
  text-decoration-color: rgba(0, 255, 255, 0.55);
  text-underline-offset: 3px;
  position: relative;
  white-space: normal;
}

.retro-terms__link:hover {
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
  text-decoration-color: rgba(0, 255, 255, 0.9);
}

/* RTL: keep checkbox near the right edge */
[dir="rtl"] .retro-terms {
  direction: rtl;
  justify-content: flex-start;
}

[dir="rtl"] .retro-terms__checkbox {
  order: 1;
}

[dir="rtl"] .retro-terms__text {
  order: 2;
  text-align: right;
}

/* Modal: terms popup */
.retro-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.retro-modal.show {
  display: block;
}

.retro-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.retro-modal.show .retro-modal__backdrop {
  opacity: 1;
}

.retro-modal__panel {
  position: relative;
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(
    145deg,
    rgba(25, 25, 40, 0.92),
    rgba(10, 10, 18, 0.94)
  );
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  transform: translateY(14px) scale(0.985);
  opacity: 0;
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.2s ease;
}

.retro-modal.show .retro-modal__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.retro-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  flex: 0 0 auto;
}

.retro-modal__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.25;
  flex: 1 1 auto;
  min-width: 0;
}

.retro-modal__close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.retro-modal__close:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(0, 255, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.12);
  transform: translateY(-1px);
}

.retro-modal__close:active {
  transform: translateY(0);
}

.retro-modal__close:focus-visible {
  outline: none;
  border-color: rgba(0, 255, 255, 0.7);
  box-shadow:
    0 0 0 3px rgba(0, 255, 255, 0.18),
    0 0 22px rgba(0, 255, 255, 0.16);
}

.retro-modal__body {
  padding: 14px 14px 18px;
  overflow: auto;
  max-height: none;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.65;
  flex: 1 1 auto;
}

.retro-modal__body h4 {
  margin: 16px 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: rgba(0, 255, 255, 0.88);
}

.retro-modal__body h4:first-child {
  margin-top: 0;
}

.retro-modal__body p {
  margin: 0 0 10px;
}

.retro-modal__body ul {
  margin: 0 0 10px;
  padding-left: 18px;
}

[dir="rtl"] .retro-modal__body ul {
  padding-left: 0;
  padding-right: 18px;
}

.retro-modal__body li {
  margin-bottom: 3px;
}

.retro-modal__body .terms-footer {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
}

/* Modal: better scrollbar (Firefox + WebKit) */
.retro-modal__body {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 255, 0.55) rgba(255, 255, 255, 0.08);
}

.retro-modal__body::-webkit-scrollbar {
  width: 10px;
}

.retro-modal__body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.retro-modal__body::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 255, 0.35);
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
}

.retro-modal__body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 255, 255, 0.5);
}

/* Modal: RTL header should keep close button at start edge */
[dir="rtl"] .retro-modal__header {
  flex-direction: row-reverse;
}

@media (max-width: 480px) {
  .retro-modal__panel {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    margin: 10px auto;
    border-radius: 14px;
  }

  .retro-modal__header {
    padding: 12px 12px;
  }

  .retro-modal__body {
    padding: 12px 12px 16px;
    font-size: 13px;
  }

  .retro-modal__close {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
}
