/* ============================================
   PrepX - auth.css
   Lamp animation + login/signup card styles
   ============================================ */

.auth-page {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(120, 90, 255, 0.14), transparent 60%),
    var(--bg);
}

/* Brand link (top-left) */
.auth-brand {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
}

.auth-brand img {
  height: 38px;
  width: 38px;
  object-fit: cover;
  border-radius: 8px;
}

/* ---------- STAGE ---------- */
.stage {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 50px;
  overflow: hidden;
}

/* ---------- LAMP ---------- */
.lamp {
  position: relative;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
}

.lamp-wire {
  width: 2px;
  height: 110px;
  background: linear-gradient(#3a3d52, #8a8fa8);
}

.lamp-shade {
  width: 150px;
  height: 58px;
  background: linear-gradient(180deg, #e0a24a, #8a5a1c);
  border-radius: 75px 75px 0 0 / 58px 58px 0 0;
  filter: brightness(0.4);
  transition: filter 0.6s, box-shadow 0.6s;
}

.stage.on .lamp-shade {
  filter: brightness(1);
  box-shadow: 0 14px 60px rgba(255, 179, 71, 0.55);
}

.lamp-bulb {
  position: absolute;
  top: 162px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 10px;
  border-radius: 50%;
  background: #fff4c9;
  opacity: 0.12;
  transition: opacity 0.5s, box-shadow 0.5s;
}

.stage.on .lamp-bulb {
  opacity: 1;
  box-shadow: 0 0 30px 12px rgba(255, 214, 120, 0.9);
}

/* ---------- PULL CORD ---------- */
.lamp-cord {
  position: absolute;
  top: 140px;
  left: calc(50% + 60px);
  width: 30px;
  height: 110px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.15s ease;
}

.cord-line {
  flex: 1;
  width: 2px;
  background: repeating-linear-gradient(#cfd3ff 0 4px, transparent 4px 7px);
}

.cord-bead {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #dfe2ff;
  box-shadow: 0 0 10px rgba(200, 205, 255, 0.6);
}

.lamp-cord:hover .cord-bead,
.lamp-cord:focus-visible .cord-bead {
  box-shadow: 0 0 16px rgba(255, 220, 150, 0.9);
}

.lamp-cord.pulled { transform: translateY(16px); }

.cord-hint {
  position: absolute;
  top: 262px;
  left: calc(50% + 48px);
  font-size: 0.8rem;
  white-space: nowrap;
  color: var(--text-muted);
  transition: opacity 0.4s;
}

.stage.on .cord-hint { opacity: 0; }

/* ---------- LIGHT CONE + FLOATING DOTS ---------- */
.light-cone {
  position: absolute;
  top: 168px;
  left: 50%;
  width: min(1000px, 160vw);
  height: calc(100% - 168px);
  transform: translateX(-50%);
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(255, 190, 90, 0.38), rgba(255, 160, 50, 0.08) 70%, transparent);
  opacity: 0;
  transition: opacity 0.8s;
  pointer-events: none;
}

.stage.on .light-cone { opacity: 1; }

.bokeh {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s 0.2s;
  pointer-events: none;
}

.stage.on .bokeh { opacity: 1; }

.bokeh span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 190, 90, 0.55), rgba(255, 190, 90, 0.08));
  animation: drift var(--dur, 6s) ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to   { transform: translate(14px, -30px); }
}

/* ---------- LOGIN CARD ---------- */
.login-card {
  position: relative;
  z-index: 3;
  width: min(92%, 390px);
  margin-top: 90px;
  padding: 28px 26px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);

  /* hidden until the light is on */
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition: opacity 0.6s 0.35s, transform 0.6s 0.35s, visibility 0s 0.95s;
}

.stage.on .login-card {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.6s 0.35s, transform 0.6s 0.35s, visibility 0s 0s;
}

.login-card h1 {
  font-size: 1.7rem;
  text-align: center;
}

.card-sub {
  text-align: center;
  margin: 4px 0 20px;
  font-size: 0.92rem;
}

/* Password show/hide */
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 70px; }

.toggle-pass {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.toggle-pass:hover { color: var(--amber); }

.form-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 16px;
  font-size: 0.85rem;
}

.form-row a,
.card-foot a {
  color: var(--amber);
  font-weight: 600;
}

.form-row a:hover,
.card-foot a:hover { text-decoration: underline; }

/* Messages */
.form-status {
  min-height: 22px;
  margin-top: 12px;
  font-size: 0.88rem;
  text-align: center;
}

.form-status.error   { color: #ff8a8a; }
.form-status.success { color: #6ee7b7; }

.card-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 0.9rem;
}

/* Button states */
.btn-primary.is-success {
  background: var(--grad-success);
  color: #fff;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26, 18, 6, 0.3);
  border-top-color: #1a1206;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Respect users who turn off animations */
@media (prefers-reduced-motion: reduce) {
  .bokeh span, .spinner { animation: none; }
  .lamp-cord, .login-card, .light-cone { transition: none; }
}

/* ============================================
   Signup + Forgot password additions
   ============================================ */

[hidden] { display: none !important; }

.login-card.wide { width: min(92%, 430px); }

/* Two fields side by side */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* Password strength meter */
.strength { margin-top: 8px; }

.strength-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.strength-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  transition: width 0.3s, background 0.3s;
}

.strength-label {
  margin-top: 4px;
  min-height: 18px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Terms checkbox */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.check-row input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  accent-color: var(--amber);
}

.check-row a { color: var(--amber); font-weight: 600; }
.check-row a:hover { text-decoration: underline; }

/* Verify / sent panels */
.verify-panel,
.sent-panel { text-align: center; }

.big-icon {
  font-size: 2.6rem;
  margin-bottom: 8px;
}

.verify-email {
  color: var(--text);
  word-break: break-all;
}

.small-note {
  margin-top: 14px;
  font-size: 0.85rem;
}

.panel-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.panel-actions .btn { text-decoration: none; }

#requestPanel h1,
#sentPanel h1,
#verifyPanel h1 { font-size: 1.6rem; }