/*
 * FANTASYREALM - PASSWORD RECOVERY
 *
 * Styles only the password recovery page.
 * Navigation, footer and application background
 * are managed by the shared stylesheets.
 */

/* =========================================================
   PAGE LAYOUT
========================================================= */

.forgot-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;

  padding: 64px 20px 90px;

  color: #f5f0ff;
  font-family: "Inter", sans-serif;
}

.forgot-panel {
  box-sizing: border-box;

  width: min(580px, 100%);
  padding: 44px 46px;

  border: 1px solid rgba(168, 85, 247, 0.42);
  border-radius: 22px;

  background:
    linear-gradient(145deg,
      rgba(23, 14, 49, 0.96),
      rgba(9, 7, 26, 0.94));

  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.28),
    0 0 35px rgba(124, 58, 237, 0.13);

  backdrop-filter: blur(16px);
}

/* =========================================================
   INTRODUCTION
========================================================= */

.forgot-introduction {
  text-align: center;
}

.forgot-page .section-label {
  margin: 0 0 14px;

  color: #d8b4fe;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
}

.forgot-panel h1 {
  margin: 0 0 18px;

  color: #faf4ff;
  font-family: "Cinzel", serif;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  line-height: 1.25;

  text-shadow:
    0 0 22px rgba(168, 85, 247, 0.4);
}

.forgot-intro {
  max-width: 450px;
  margin: 0 auto;

  color: #c9c0da;
  font-size: 14px;
  line-height: 1.8;
}

.forgot-divider {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 14px;
  margin: 27px 0 32px;

  color: #edd5a8;
}

.forgot-divider span:first-child,
.forgot-divider span:last-child {
  width: 75px;
  height: 1px;

  background:
    linear-gradient(90deg,
      transparent,
      rgba(216, 180, 254, 0.8));
}

.forgot-divider span:last-child {
  transform: rotate(180deg);
}

/* =========================================================
   FORM FIELDS
========================================================= */

.forgot-form {
  display: grid;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.form-field label {
  color: #eee8f8;
  font-size: 13px;
  font-weight: 600;
}

.forgot-form input {
  box-sizing: border-box;

  width: 100%;
  min-width: 0;
  padding: 14px 16px;

  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;

  background: rgba(5, 5, 18, 0.75);
  color: #fff;

  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.forgot-form input::placeholder {
  color: #aaa0bf;
}

.forgot-form input:focus-visible {
  outline: 2px solid rgba(216, 180, 254, 0.75);
  outline-offset: 2px;

  border-color: #c084fc;
}

/* =========================================================
   RECOVERY FEEDBACK
========================================================= */

.form-message {
  margin: 0;
  padding: 14px 16px;

  border: 1px solid rgba(216, 180, 254, 0.4);
  border-radius: 12px;

  background: rgba(124, 58, 237, 0.15);
  color: #f0e3ff;

  font-size: 13px;
  line-height: 1.7;
}

.form-message[hidden] {
  display: none;
}

.form-message[data-type="error"] {
  border-color: rgba(252, 165, 165, 0.5);

  background: rgba(127, 29, 29, 0.2);
  color: #fecaca;
}

.form-message[data-type="success"] {
  border-color: rgba(134, 239, 172, 0.5);

  background: rgba(22, 101, 52, 0.18);
  color: #bbf7d0;
}

/* =========================================================
   SUBMISSION BUTTON
========================================================= */

.forgot-button {
  width: 100%;
  min-height: 48px;
  padding: 14px 24px;

  border: 1px solid rgba(233, 213, 255, 0.85);
  border-radius: 999px;

  background:
    linear-gradient(135deg,
      #6d28d9,
      #a855f7);

  color: #fff;

  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.forgot-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.4);
}

.forgot-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* =========================================================
   SUPPORTING INFORMATION
========================================================= */

.recovery-information {
  margin: 24px 0 0;

  color: #b6acc9;
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}

.forgot-actions {
  display: flex;
  justify-content: center;

  margin-top: 25px;
}

.back-link {
  display: inline-flex;
  align-items: center;

  gap: 9px;
  padding: 11px 20px;

  border: 1px solid rgba(216, 180, 254, 0.4);
  border-radius: 999px;

  background: rgba(124, 58, 237, 0.12);
  color: #eee3ff;

  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  border-color: #d8b4fe;
  background: rgba(124, 58, 237, 0.28);
}

.forgot-page button:focus-visible,
.forgot-page a:focus-visible {
  outline: 2px solid #edd5a8;
  outline-offset: 4px;
}

/* =========================================================
   RESPONSIVE DESIGN
========================================================= */

@media (max-width: 768px) {
  .forgot-page {
    padding: 38px 16px 65px;
  }

  .forgot-panel {
    padding: 32px 25px;
    border-radius: 17px;
  }
}

@media (max-width: 390px) {
  .forgot-page {
    padding-inline: 12px;
  }

  .forgot-panel {
    padding: 28px 18px;
  }

  .forgot-intro {
    font-size: 13px;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .forgot-button {
    transition: none;
  }

  .forgot-button:hover:not(:disabled) {
    transform: none;
  }
}