:root {
  color: #f6f2e8;
  background: #11131a;
  font-family: "DM Sans", system-ui, sans-serif;
  font-synthesis: none;
  --bg: #11131a;
  --surface: #191c25;
  --surface-2: #222631;
  --line: #303541;
  --ink: #f6f2e8;
  --muted: #9da3b2;
  --acid: #d9ff63;
  --acid-ink: #171a12;
  --red: #ff685f;
  --violet: #9d85ff;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% -5%, rgba(157, 133, 255, 0.2), transparent 28rem),
    radial-gradient(circle at -10% 85%, rgba(217, 255, 99, 0.1), transparent 25rem),
    var(--bg);
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(217, 255, 99, 0.45);
  outline-offset: 3px;
}

.app-shell {
  display: flex;
  width: min(100%, 620px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: "Syne", sans-serif;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--acid);
}

.brand-mark::before {
  position: absolute;
  width: 16px;
  height: 16px;
  top: 9px;
  left: 9px;
  border: 3px solid var(--acid-ink);
  border-radius: 50% 50% 45% 45%;
  content: "";
}

.brand-mark::after {
  position: absolute;
  width: 4px;
  height: 4px;
  top: 15px;
  left: 15px;
  border-radius: 50%;
  background: var(--acid-ink);
  box-shadow: 8px 0 var(--acid-ink);
  content: "";
}

.language-switcher {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(25, 28, 37, 0.82);
}

.language-switcher button {
  min-width: 39px;
  height: 33px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.language-switcher button.is-active {
  background: var(--ink);
  color: var(--bg);
}

.screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  animation: screen-in 250ms ease-out;
}

.hero {
  margin: 70px 0 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--acid);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1, h2 {
  font-family: "Syne", sans-serif;
  letter-spacing: -0.055em;
}

.hero h1 {
  max-width: 480px;
  margin-bottom: 14px;
  font-size: clamp(2.8rem, 13vw, 5.1rem);
  line-height: 0.92;
}

.hero-copy {
  max-width: 440px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.settings-card,
.play-card,
.result-card {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(25, 28, 37, 0.9);
  box-shadow: var(--shadow);
}

.setting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 74px;
  padding: 12px 10px 12px 14px;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-of-type { border-bottom: 0; }

.setting-copy { display: grid; gap: 3px; }
.setting-copy strong { font-size: 0.9rem; }
.setting-copy small { color: var(--muted); font-size: 0.7rem; }

.stepper {
  display: grid;
  grid-template-columns: 40px 42px 40px;
  align-items: center;
  text-align: center;
}

.stepper button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}

.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper output { font-family: "Syne", sans-serif; font-size: 1.05rem; }

.primary-button,
.secondary-button,
.danger-button {
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  border-radius: 17px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: var(--acid);
  color: var(--acid-ink);
  box-shadow: 0 12px 35px rgba(217, 255, 99, 0.13);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
}

.danger-button {
  border: 1px solid rgba(255, 104, 95, 0.35);
  background: rgba(255, 104, 95, 0.08);
  color: #ff8b84;
}

.settings-card > .primary-button { margin-top: 8px; }

.location-note {
  margin: 14px 5px 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
  text-align: center;
}

.phase-header {
  margin: 66px 0 28px;
  text-align: center;
}

.phase-header h1 {
  margin-bottom: 9px;
  font-size: clamp(2.1rem, 10vw, 3.4rem);
}

.phase-header p { color: var(--muted); line-height: 1.5; }

.reveal-card {
  position: relative;
  display: flex;
  min-height: 360px;
  padding: 30px 24px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, #20242f, #171a22);
  text-align: center;
  box-shadow: var(--shadow);
}

.reveal-card::before {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -110px;
  top: -110px;
  border: 1px solid rgba(217, 255, 99, 0.15);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 35px rgba(217, 255, 99, 0.025), 0 0 0 70px rgba(217, 255, 99, 0.02);
}

.reveal-content { position: relative; z-index: 1; width: 100%; }
.reveal-icon { display: block; margin-bottom: 20px; font-size: 3rem; }
.reveal-label { color: var(--muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.reveal-value { margin: 8px 0 10px; font-family: "Syne", sans-serif; font-size: clamp(2rem, 10vw, 3.5rem); line-height: 1; letter-spacing: -0.055em; }
.reveal-category { color: var(--acid); font-size: 0.78rem; font-weight: 800; }
.spy-value { color: var(--red); }
.reveal-hint { max-width: 330px; margin: 12px auto 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

.reveal-actions { display: grid; gap: 10px; margin-top: 14px; }

.privacy-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
}

.privacy-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}

.privacy-dots span.is-done { background: var(--acid); }
.privacy-dots span.is-current { background: var(--violet); box-shadow: 0 0 0 4px rgba(157, 133, 255, 0.15); }

.game-screen { justify-content: center; }

.play-card,
.result-card {
  padding: 28px 22px;
  text-align: center;
}

.round-badge {
  display: inline-flex;
  min-height: 30px;
  padding: 0 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.timer {
  margin: 28px 0 8px;
  font-family: "Syne", sans-serif;
  font-size: clamp(4rem, 21vw, 7rem);
  line-height: 1;
  letter-spacing: -0.08em;
  font-variant-numeric: tabular-nums;
}

.timer.is-low { color: var(--red); animation: pulse 1s infinite; }
.timer-copy { margin-bottom: 28px; color: var(--muted); font-size: 0.85rem; }

.play-actions,
.result-actions { display: grid; gap: 10px; }

.result-card { margin: auto 0; }
.result-icon { display: block; margin-bottom: 14px; font-size: 3.5rem; }
.result-card h1 { margin-bottom: 10px; font-size: clamp(2.2rem, 11vw, 3.7rem); }
.result-card > p { color: var(--muted); }

.result-location {
  margin: 26px 0 12px;
  padding: 20px;
  border-radius: 18px;
  background: var(--surface-2);
}

.result-location small,
.spy-list small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-location strong { font-family: "Syne", sans-serif; font-size: 1.55rem; }
.spy-list { margin: 12px 0 26px; padding: 18px; border: 1px solid rgba(255, 104, 95, 0.28); border-radius: 18px; background: rgba(255, 104, 95, 0.06); }
.spy-list strong { color: #ff8b84; font-size: 1.1rem; }

.mini-footer {
  margin-top: 22px;
  color: #666d7b;
  font-size: 0.64rem;
  text-align: center;
}

@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 50% { opacity: 0.62; } }

@media (min-width: 680px) {
  .app-shell { padding-inline: 24px; }
  .hero { margin-top: 95px; }
}

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