:root {
  --bg: #020711;
  --panel: rgba(5, 14, 24, .91);
  --panel-strong: rgba(6, 17, 29, .96);
  --card: rgba(7, 18, 30, .84);
  --gold: #ffd46f;
  --gold-2: #d89531;
  --gold-soft: rgba(255, 212, 111, .24);
  --text: #fff0c8;
  --muted: rgba(255, 240, 200, .66);
  --line: rgba(255, 212, 111, .28);
  --line-strong: rgba(255, 212, 111, .48);
  --green: #7ee0a3;
  --danger: #e15b55;
  --shadow: rgba(0, 0, 0, .42);
  --font-title: Literata, Georgia, serif;
  --font-ui: Manrope, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  overflow: hidden;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .62; filter: saturate(.72); }

.screen {
  display: none;
  min-height: 100svh;
}
.screen.is-active { display: block; }
body[data-view="game"] { overflow: hidden; }
body[data-view="auth"] { overflow: auto; }

.button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 18px;
  color: var(--text);
  background: rgba(4, 12, 22, .72);
  font-weight: 950;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, filter .16s ease;
}
.button:hover:not(:disabled), .button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: 0 16px 34px rgba(255, 212, 111, .16);
}
.button-gold {
  color: #1d1206;
  border-color: rgba(255, 230, 151, .76);
  background: linear-gradient(180deg, #ffe492, var(--gold-2));
  box-shadow: 0 18px 34px rgba(217, 150, 48, .24), inset 0 1px 0 rgba(255, 255, 255, .24);
}
.button-ghost {
  background: rgba(3, 10, 18, .72);
}

label {
  display: grid;
  gap: 8px;
  color: rgba(255, 240, 200, .78);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: .055em;
  text-transform: uppercase;
}
input {
  width: 100%;
  min-height: 56px;
  border: 1px solid rgba(255, 212, 111, .38);
  border-radius: 15px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(0, 8, 15, .58);
  outline: none;
  font-size: 16px;
  font-weight: 800;
}
input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 212, 111, .13), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.status-note {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  color: var(--text);
  background: rgba(3, 10, 18, .94);
  box-shadow: 0 18px 42px var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .18s ease;
  font-weight: 950;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
