:root {
  --bg: #0e0b12;
  --panel: #17121d;
  --text: #ece6f2;
  --muted: #9a8fa8;
  --accent: #d98ab8;
  --accent-hover: #e7a3c9;
  --border: #2b2233;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

main {
  max-width: 34rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--accent);
}

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

/* --- age gate --- */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: var(--bg);
}

.gate-box {
  max-width: 30rem;
  padding: 2rem 1.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}

.gate-box h2 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
}

.gate-box p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: left;
}

.gate-box .actions {
  margin-top: 1.5rem;
}

.gate-box button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: #1a1018;
}

.gate-box button:hover {
  background: var(--accent-hover);
}

.gate-box button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  font-weight: 400;
}

.gate-box button.ghost:hover {
  border-color: var(--muted);
}

/* --- machine --- */

.machine {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

#spin {
  font: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1018;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 0.9rem 3rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease;
}

#spin:hover:not(:disabled) {
  background: var(--accent-hover);
}

#spin:active:not(:disabled) {
  transform: scale(0.98);
}

#spin:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Cooldown: readable rather than greyed out, with a fixed width so the
   countdown does not make the button jump. */
#spin.cooling {
  opacity: 1;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 13rem;
  cursor: not-allowed;
}

.result {
  min-height: 1.6em;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

/* Turnstile renders its iframe in here. It must never sit inside the button. */
#turnstile {
  min-height: 65px;
  display: flex;
  justify-content: center;
}

/* Once verified the widget collapses, leaving just the button. */
#turnstile.done {
  min-height: 0;
  height: 0;
  overflow: hidden;
}

.win {
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  text-align: center;
}

.win-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.25rem;
}

.win-copy {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.win-copy span {
  color: var(--text);
  font-family: var(--mono);
}

#token {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  word-break: break-all;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  color: var(--accent);
}

.actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.button,
.ghost {
  font: inherit;
  font-size: 0.9rem;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.button {
  background: var(--accent);
  color: #1a1018;
  border: none;
  font-weight: 600;
}

.button:hover {
  background: var(--accent-hover);
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.ghost:hover {
  border-color: var(--muted);
}

/* --- faq --- */

.faq {
  margin-top: 2.5rem;
}

.faq h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

details {
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
}

summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+ ";
  color: var(--accent);
}

details[open] summary::before {
  content: "− ";
}

details p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.5rem 0 0;
}

details a {
  color: var(--accent);
}

footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

footer p {
  margin: 0;
}

footer a,
details a {
  color: var(--muted);
}
