@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght@100..700&display=swap');

:root {
  --forgot-primary: #ef2546;
  --forgot-bg: #060501;
  --forgot-surface: #181f20;
  --forgot-border: #2a3839;
  --forgot-text: #ffffff;
  --forgot-muted: #9ca3af;
}

.popup-container.forgot-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  font-family: 'Space Grotesk', sans-serif;
  color: var(--forgot-text);
  overflow: hidden;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-container.forgot-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.popup-container.forgot-modal::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('https://lh3.googleusercontent.com/aida-public/AB6AXuAmJDwnXrisSUe7ZcOXXm-I5KM80V_FTeBIkxgAGZIUV6D-nV9jCkitxwqDdW8pI6FZL3emPBOs3eqNoI-ne8U6v81-oNqthAX5WpM7GUtxm3WUn-tra5rctU2jfZxS0-cNqN0RUGC6-bzufTHU44Very5x-72XlYwA2qn5a3tI-OHs_twibBIpsjGQPYpH8uMhgFG2cbBfZD0TKYs9p3F0gF2wdRAMuW5SL7Ioaj2Wg68qiuwGZmr6VILiYRr-UF4FM3UQnkzUOVU');
  background-size: cover;
  background-position: center;
  filter: grayscale(1);
  opacity: 0.35;
  z-index: 0;
}

.popup-container.forgot-modal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 5, 1, 0.8), rgba(6, 5, 1, 0.95));
  z-index: 0;
}

.forgot-modal__card {
  position: relative;
  width: min(480px, 100%);
  background: var(--forgot-surface);
  border: 1px solid var(--forgot-border);
  border-radius: 16px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 1;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s ease;
}

.popup-container.forgot-modal.active .forgot-modal__card {
  transform: translateY(0) scale(1);
}

.forgot-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #b6bfc1;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  z-index: 2;
}

.forgot-modal__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.forgot-modal__accent {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--forgot-primary), transparent);
}

.forgot-modal__body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.forgot-modal__header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.forgot-modal__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(239, 37, 70, 0.12);
  border: 1px solid rgba(239, 37, 70, 0.25);
  display: grid;
  place-items: center;
  color: var(--forgot-primary);
  margin: 0 auto 0.5rem;
  user-select: none;
}

.forgot-modal__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.forgot-modal__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--forgot-muted);
  font-family: 'Noto Sans', sans-serif;
  line-height: 1.6;
}

.forgot-modal__message {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-family: 'Noto Sans', sans-serif;
}

.forgot-modal__message.success {
  display: block;
  color: #d9fbe3;
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.35);
}

.forgot-modal__message.error {
  display: block;
  color: #ffd1d7;
  background: rgba(239, 37, 70, 0.15);
  border-color: rgba(239, 37, 70, 0.35);
}

.forgot-modal__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.forgot-modal__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #d1d5db;
}

.forgot-modal__input-wrapper {
  position: relative;
}

.forgot-modal__input {
  width: 100%;
  height: 48px;
  padding: 0 1rem 0 2.75rem;
  border-radius: 12px;
  border: 1px solid var(--forgot-border);
  background: #0c1011;
  color: var(--forgot-text);
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.forgot-modal__input::placeholder {
  color: #6b7280;
}

.forgot-modal__input:focus {
  outline: none;
  border-color: var(--forgot-primary);
  box-shadow: 0 0 0 2px rgba(239, 37, 70, 0.25);
}

.forgot-modal__input-icon {
  display: none;
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 20px;
}

.forgot-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.forgot-modal__submit {
  position: relative;
  height: 48px;
  border-radius: 12px;
  border: none;
  background: var(--forgot-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.forgot-modal__submit:hover {
  background: #d91f3d;
  box-shadow: 0 0 20px rgba(239, 37, 70, 0.4);
}

.forgot-modal__submit:active {
  transform: scale(0.98);
}

.forgot-modal__submit [data-loading-text] {
  transition: opacity 0.2s ease;
}

.forgot-modal__form.is-loading .forgot-modal__submit [data-loading-text] {
  opacity: 0;
}

.modal-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(24, 31, 32, 0.6);
  backdrop-filter: blur(4px);
  z-index: 5;
}

.popup-content.is-busy .modal-loading {
  display: flex;
}

.modal-loading__spinner {
  width: 56px;
  height: 56px;
  animation: modal-spin 1s linear infinite;
  transform-origin: 50% 50%;
}

.modal-loading__text {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: #cbd5d4;
  font-family: 'Noto Sans', sans-serif;
}

@keyframes modal-spin {
  to {
    transform: rotate(360deg);
  }
}

.forgot-modal__cancel {
  height: 40px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.forgot-modal__cancel:hover {
  color: #fff;
}

.forgot-modal__footer {
  background: #131819;
  border-top: 1px solid var(--forgot-border);
  padding: 1rem 2rem;
  text-align: center;
  font-size: 11pt;
  color: var(--text-muted);
}

.forgot-modal__footer a {
  color: var(--primary-accent);
  text-decoration: none;
}

.forgot-modal__footer a:hover {
  color: var(--primary-accent-hover);
}

@media (max-width: 480px) {
  .forgot-modal__body {
    padding: 1.75rem 1.5rem;
  }
}