/* TABLE MASTER 25 — Account Verification website
   Palette mirrors the Android app theme (ui/theme/Theme.kt) so the branded page
   looks like part of the game: DeepSpace background, SpaceCard surfaces,
   ElectricCyan / ArcadeBlue accents, MintEmerald success, CoralFlame errors. */

:root {
  --deep-space: #0b1026;
  --space-card: #151e3f;
  --space-elevated: #1e2952;
  --space-line: #2a3768;
  --electric-cyan: #4cc9f0;
  --arcade-blue: #4361ee;
  --neon-violet: #7209b7;
  --mint-emerald: #06d6a0;
  --solar-gold: #ffd166;
  --coral-flame: #ff6b6b;
  --text: #f3f6ff;
  --text-muted: #b9c4e8;
  --text-dim: #8b97c4;
  --on-accent: #051329;
  --radius: 20px;
  --radius-sm: 12px;
  --max-width: 34rem;
  --font: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(120% 90% at 50% 0%, #16204a 0%, var(--deep-space) 55%, #070b1c 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: clamp(1rem, 4vw, 2.5rem) 1rem 2rem;
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
}

/* Subtle arcade starfield */
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(1.5px 1.5px at 20% 30%, rgba(255, 255, 255, 0.5) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 15%, rgba(76, 201, 240, 0.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 45% 70%, rgba(255, 209, 102, 0.35) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 85% 60%, rgba(255, 255, 255, 0.35) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 10% 80%, rgba(6, 214, 160, 0.3) 50%, transparent 51%);
  background-size: 340px 340px, 260px 260px, 420px 420px, 300px 300px, 380px 380px;
  opacity: 0.7;
  z-index: 0;
}

.brand,
.stage,
.foot {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand__logo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 18%;
  box-shadow: 0 8px 24px rgba(11, 16, 38, 0.65), 0 0 0 2px rgba(76, 201, 240, 0.25);
  background: var(--deep-space);
  flex: 0 0 auto;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-size: clamp(1.25rem, 5.5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: 0.09em;
  background: linear-gradient(92deg, var(--electric-cyan), #a8e6ff 40%, var(--solar-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand__tag {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.card {
  background: linear-gradient(180deg, rgba(30, 41, 82, 0.92) 0%, rgba(21, 30, 63, 0.96) 100%);
  border: 1px solid var(--space-line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 5vw, 2rem);
  box-shadow: 0 24px 60px rgba(4, 7, 20, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.card[aria-busy="true"] {
  min-height: 12rem;
}

.status {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
}

.status__icon {
  width: 4.75rem;
  height: 4.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(6, 214, 160, 0.12);
  border: 2px solid rgba(6, 214, 160, 0.45);
  color: var(--mint-emerald);
  flex: 0 0 auto;
}

.status__icon--error {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.45);
  color: var(--coral-flame);
}

.status__icon--info {
  background: rgba(76, 201, 240, 0.12);
  border-color: rgba(76, 201, 240, 0.4);
  color: var(--electric-cyan);
}

.status__icon--busy {
  background: rgba(67, 97, 238, 0.12);
  border-color: rgba(67, 97, 238, 0.4);
  color: var(--electric-cyan);
}

.status__icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.card__heading {
  margin: 0;
  font-size: clamp(1.15rem, 5vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.045em;
  color: var(--text);
}

.card__heading--success {
  color: var(--mint-emerald);
}

.card__heading--error {
  color: var(--coral-flame);
}

.card__message {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.card__detail {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.notice {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
}

.notice p {
  margin: 0;
}

.notice--info {
  background: rgba(76, 201, 240, 0.1);
  border-color: rgba(76, 201, 240, 0.35);
  color: #d8f4ff;
}

.notice--success {
  background: rgba(6, 214, 160, 0.1);
  border-color: rgba(6, 214, 160, 0.35);
  color: #d3fff1;
}

.notice--error {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ffe0e0;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.35rem;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
  width: 100%;
}

.btn--primary {
  background: linear-gradient(135deg, var(--electric-cyan) 0%, var(--arcade-blue) 100%);
  color: var(--on-accent);
  box-shadow: 0 10px 26px rgba(67, 97, 238, 0.35);
}

.btn--success {
  background: linear-gradient(135deg, var(--mint-emerald) 0%, #0aa87e 100%);
  color: #00211a;
  box-shadow: 0 10px 26px rgba(6, 214, 160, 0.28);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--space-line);
}

.btn:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 3px solid var(--solar-gold);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  margin-top: 0.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.field__label {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.field__control {
  position: relative;
  display: flex;
  align-items: center;
}

.field input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--space-line);
  background: rgba(11, 16, 38, 0.75);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.field input::placeholder {
  color: var(--text-dim);
}

.field input:focus {
  outline: none;
  border-color: var(--electric-cyan);
  box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.22);
}

.field--password input {
  padding-right: 3.25rem;
}

.toggle {
  position: absolute;
  right: 0.4rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}

.toggle:hover {
  color: var(--electric-cyan);
  background: rgba(76, 201, 240, 0.1);
}

.toggle:focus-visible {
  outline: 2px solid var(--solar-gold);
  outline-offset: 1px;
}

.field__error {
  color: var(--coral-flame);
  font-size: 0.82rem;
  min-height: 1.1em;
}

.hint {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin: 0;
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  width: 100%;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--space-line);
}

.steps {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: grid;
  gap: 0.35rem;
  text-align: left;
}

.boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 10rem;
  text-align: center;
}

.boot__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.spinner {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 3px solid rgba(76, 201, 240, 0.2);
  border-top-color: var(--electric-cyan);
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.foot {
  text-align: center;
  display: grid;
  gap: 0.25rem;
}

.foot__line {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.foot__line--muted {
  color: rgba(139, 151, 196, 0.75);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .actions--row {
    flex-direction: row;
  }

  .actions--row .btn {
    width: auto;
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Preview mode banner (?demo=…) — never shown to real players. */
.demo {
  width: 100%;
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--space-line);
}

.demo__note {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--solar-gold);
  text-align: center;
}

.demo__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.demo__link {
  width: auto;
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: capitalize;
  border-radius: 999px;
}

.demo__link[aria-current="page"] {
  border-color: var(--electric-cyan);
  color: var(--electric-cyan);
}
