:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --accent: #38bdf8;
  --accent2: #34d399;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --danger: #f87171;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.card {
  width: 100%;
  max-width: 560px;
  background: var(--panel);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
}
.subtitle {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.nav-link {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 16px;
}
.nav-link:hover { text-decoration: underline; }
button {
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, opacity 0.2s ease;
}
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 14px;
  line-height: 1.5;
}
.copyright {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  margin-top: 24px;
  opacity: 0.7;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.hidden {
  display: none;
}
.modal-content {
  position: relative;
  background: var(--panel);
  border-radius: 16px;
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--danger);
  color: #2b0a0a;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0;
  line-height: 1;
}
.reset-modal-content {
  width: 340px;
  align-items: stretch;
}
.reset-modal-content h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  text-align: center;
}
.reset-modal-content .modal-help {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  margin: 0 0 16px;
  line-height: 1.4;
}
.reset-modal-content input {
  width: 100%;
  background: #0b1220;
  color: var(--text);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 12px;
  text-align: center;
}
.reset-modal-content #resetCodeInput {
  font-size: 1.4rem;
  letter-spacing: 0.3em;
}
.reset-modal-content button[type="button"] {
  width: 100%;
  background: var(--accent2);
  color: #04231a;
}
.reset-modal-content .nav-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
}
.reset-modal-content .error {
  color: var(--danger);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 10px;
  min-height: 1.2em;
}
