/* ═══════════════════════════════════════════════════════════
   FORGOT PASSWORD PAGE — TAROTOPIA
   forgot-password.css
═══════════════════════════════════════════════════════════ */

/* ── TOKENS & RESET ──────────────────────────────────────── */

:root {
  --bg-dark:       #030214;
  --main-purple:   #3C0753;
  --gold:          #C9A84C;
  --gold-hover:    #dbbe6a;
  --pink:          #C37F9F;
  --soft:          #B8AFD4;
  --deep-blue:     #030637;
  --gold-glow:     rgba(219,190,106,0.42);
  --pink-glow:     rgba(195, 127, 159, 0.5);
  --shadow-violet: rgba(60,7,83,0.42);
  --transition:    cubic-bezier(.22,1,.36,1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Prata", serif;
  overflow-x: hidden;
  min-height: 100vh;
  color: white;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(60,7,83,0.52), transparent 70%),
    radial-gradient(circle at bottom, rgba(201,168,76,0.07),  transparent 32%),
    linear-gradient(180deg, #030214 0%, #07041A 50%, #030214 100%);
  background-attachment: fixed;
}

/* ── BACKGROUND & NAVBAR ─────────────────────────────────── */

.background-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  filter: blur(120px);
  background: radial-gradient(ellipse at 50% 40%, rgba(110,40,160,0.26), transparent 55%);
}

#starCanvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 2; pointer-events: none;
}

.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 50;
  padding: 14px 0;
}

.nav-inner {
  width: min(1240px, calc(100% - 48px));
  margin: auto; padding: 12px 24px;
  display: flex; align-items: center;
}

.logo-wrap img {
  display: block; width: auto; height: 72px; object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.22)) drop-shadow(0 0 18px rgba(195,127,159,0.14));
  transition: filter 0.35s ease, transform 0.35s var(--transition);
}

.logo-wrap:hover img, .logo-wrap:focus-visible img {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 10px rgba(219,190,106,0.68)) drop-shadow(0 0 26px rgba(219,190,106,0.32));
}

/* ── FORGOT PASSWORD LAYOUT ──────────────────────────────── */

.fp-main {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 140px 24px 80px;
}

.fp-container {
  width: 100%;
  max-width: 480px;
  background: rgba(8, 8, 18, 0.65);
  border: 1px solid rgba(184, 175, 212, 0.15);
  border-radius: 12px;
  box-shadow: 0 0 60px var(--shadow-violet);
  backdrop-filter: blur(16px);
  padding: 48px clamp(24px, 5vw, 48px);
  text-align: center;
}

/* ── STATE WRAPPERS ──────────────────────────────────────── */

.state-wrapper {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: stateFadeOut 0.4s forwards;
}

.state-wrapper.active {
  display: flex;
  animation: stateFadeIn 0.5s 0.2s forwards;
}

@keyframes stateFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes stateFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* ── STATE CONTENT & FORM ────────────────────────────────── */

.spinner {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
}

.spinner-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 16px var(--gold-glow);
  animation: orb-pulse 2.5s infinite ease-in-out;
}

@keyframes orb-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.8; }
  50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.spinner-star {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 12px;
  color: var(--soft);
  transform-origin: center center;
  animation: orbit 4s linear infinite;
}

.spinner-star.star-1 { animation-duration: 4s; font-size: 14px; }
.spinner-star.star-2 { animation-duration: 5.5s; animation-delay: -1.5s; font-size: 10px; }
.spinner-star.star-3 { animation-duration: 7s; animation-delay: -3s; font-size: 12px; }

@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg) translateX(32px) rotate(0deg); opacity: 0; }
  25% { opacity: 1; }
  75% { opacity: 1; }
  to { transform: translate(-50%, -50%) rotate(360deg) translateX(32px) rotate(-360deg); opacity: 0; }
}

.state-text {
  font-family: 'Grenze', serif;
  font-size: 16px;
  color: var(--soft);
  letter-spacing: 1px;
}

.state-title {
  font-family: 'Grenze', serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--gold-hover);
}

.state-description {
  font-size: 15px;
  color: var(--soft);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 16px;
}

#forgot-password-form {
  width: 100%;
  text-align: left;
}

.form-group { margin-bottom: 24px; }

.form-label {
  font-family: 'Grenze', serif;
  color: var(--soft);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
  transition: color 0.3s ease;
}

.form-input {
  font-family: 'Prata', serif;
  font-size: 15px;
  width: 100%;
  color: var(--soft);
  background: rgba(3, 2, 20, 0.7);
  border: 1px solid rgba(184, 175, 212, 0.3);
  border-radius: 4px;
  padding: 12px 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.form-input:focus {
  outline: none;
  color: white;
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow), inset 0 0 8px rgba(201, 168, 76, 0.1);
}

.form-input.has-error {
  border-color: var(--pink);
  box-shadow: 0 0 12px var(--pink-glow);
}

.form-group:has(.form-input.has-error) .form-label {
  color: var(--pink);
}

.error-message {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Grenze', serif; font-size: 12px;
  color: var(--pink); margin-top: 8px;
  opacity: 0; max-height: 0; overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease;
}

.error-message.visible { opacity: 1; max-height: 24px; }

.error-message::before {
  content: '✦'; color: var(--gold); font-size: 10px; flex-shrink: 0;
}

/* ── ACTION BUTTON ───────────────────────────────────────── */

.action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; position: relative;
  width: 100%;
  background: none; border: none; cursor: pointer;
}

.btn-inner {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; min-height: 52px; padding: 0 24px;
  background: linear-gradient(135deg, var(--gold-hover), var(--gold));
  color: var(--deep-blue);
  font-family: "Prata", serif; font-size: 13px;
  letter-spacing: 3px; text-transform: uppercase;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  border: 1px solid rgba(219,190,106,0.88);
  box-shadow: 0 0 20px rgba(219,190,106,0.06), 0 12px 40px rgba(3,6,55,0.22);
  transition: all 0.3s var(--transition);
}

.action-btn:hover .btn-inner, .action-btn:focus-visible .btn-inner {
  background: linear-gradient(135deg, #e3c875, var(--gold-hover));
  box-shadow: 0 0 20px var(--gold-glow), 0 0 48px rgba(219,190,106,0.22), 0 16px 52px var(--shadow-violet);
  transform: translateY(-2px);
}

.action-btn.secondary .btn-inner {
  background: transparent; color: var(--soft);
  border-color: rgba(184, 175, 212, 0.4); box-shadow: none;
}

.action-btn.secondary:hover .btn-inner,
.action-btn.secondary:focus-visible .btn-inner {
  color: white; border-color: var(--soft);
  background: rgba(184, 175, 212, 0.1);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 768px) {
  .background-glow { filter: blur(60px); }
  .logo-wrap img { height: 58px; filter: none; }
  .fp-main { padding-top: 120px; padding-bottom: 60px; }
}

@media (max-width: 480px) {
  .logo-wrap img { height: 48px; }
  .fp-container { padding-top: 32px; padding-bottom: 32px; }
  .state-title { font-size: 20px; }
  .state-description { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}