:root {
  --bg: #1d2b3a;
  --bg-2: #253a4f;
  --ink: #f6efe2;
  --muted: #9fb2c4;
  --tile: #f6efe2;
  --tile-ink: #1d2b3a;
  --accent: #e7804a;
  --gold: #f2c14e;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 60% at 50% 0%, var(--bg-2), var(--bg));
  background-color: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 16px 24px;
}

a {
  color: var(--ink);
}

/* ---------- Topp ---------- */
.hero {
  text-align: center;
  padding: 16px 0 8px;
}

.wheel-demo {
  width: 168px;
  height: 168px;
}
.wheel-demo .disc {
  fill: rgba(255, 255, 255, 0.06);
}
.wheel-demo .rope {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linejoin: round;
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: draw 2.4s ease 0.3s infinite;
}
.wheel-demo .tile circle {
  fill: var(--tile);
}
.wheel-demo .tile text {
  font: 800 30px system-ui, sans-serif;
  text-anchor: middle;
  fill: var(--tile-ink);
}

@keyframes draw {
  0% {
    stroke-dashoffset: 360;
  }
  45%,
  80% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wheel-demo .rope {
    animation: none;
    stroke-dashoffset: 0;
  }
}

h1 {
  font-size: 44px;
  margin: 8px 0 4px;
  letter-spacing: 0.02em;
}

.tagline {
  color: var(--muted);
  font-size: 18px;
  margin: 0 auto 24px;
  max-width: 26em;
}

.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(100%, 320px);
  min-height: 56px;
  padding: 10px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}
.button.primary {
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  min-height: 60px;
}
.button small {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
}
.button:hover {
  filter: brightness(1.08);
}
.button[hidden] {
  display: none;
}

.note {
  color: var(--muted);
  font-size: 14px;
  margin-top: 14px;
}

/* ---------- Sektioner ---------- */
section.how,
section.toplist {
  margin-top: 36px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 20px;
}

h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.how ol {
  margin: 0;
  padding-left: 22px;
}
.how li {
  margin: 6px 0;
}

.ranking {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ranking li {
  display: grid;
  grid-template-columns: 34px 1fr auto 64px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
}
.ranking li:nth-child(odd) {
  background: rgba(255, 255, 255, 0.03);
}
.ranking li.muted {
  display: block;
  color: var(--muted);
  background: none;
}
.ranking .rank {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}
.ranking .name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranking .lvl {
  color: var(--muted);
  font-size: 13px;
}
.ranking .pts {
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.more {
  display: inline-block;
  margin-top: 12px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

footer {
  max-width: 560px;
  margin: 24px auto 0;
  padding: 16px 16px max(24px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
footer a {
  color: var(--muted);
}
