/* ── Variables ── */
:root {
  --bg:        #0b1120;
  --surface:   #131e30;
  --border:    #1e2f47;
  --accent:    #22c55e;
  --accent-dk: #16a34a;
  --gold:      #facc15;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --font-head: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: 640px;
  padding: 2rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
}

/* ── Header ── */
header {
  text-align: center;
}

h1 {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 10vw, 4.5rem);
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1;
}

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 300;
  margin-top: 0.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Controls ── */
.controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.2s;
}

input::placeholder { color: var(--muted); }
input:focus { border-color: var(--accent); }

.btn-row {
  display: flex;
  gap: 0.75rem;
}

button {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

button:hover  { background: var(--accent-dk); }
button:active { transform: scale(0.97); }

/* ── Wheel ── */
.wheel-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.wheel-container {
  position: relative;
  display: inline-block;
  width: min(500px, 90vw);
  height: min(500px, 90vw);
}

canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(0,0,0,0.6), 0 0 0 2px var(--border);
  display: block;
}

.pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 22px solid var(--gold);
  z-index: 10;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* ── Current / Result ── */
.current {
  text-align: center;
}

.label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

#currentGame {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 5vw, 2rem);
  letter-spacing: 0.04em;
  color: var(--gold);
  min-height: 2rem;
}

#result {
  font-family: var(--font-head);
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  letter-spacing: 0.06em;
  text-align: center;
  min-height: 2rem;
}

.result-label { color: var(--accent); }
.result-game  {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.result-game:hover { opacity: 0.8; }

/* ── Footer ── */
footer {
  margin-top: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

footer p {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

footer a {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

footer a:hover { color: var(--accent-dk); text-decoration: underline; }