:root {
  --bg: #fff8f2;
  --ink: #1d1a17;
  --muted: #6b625a;
  --card: #ffffff;
  --line: #efe4d8;
  --brand: #ff5a36;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130f;
    --ink: #f6efe8;
    --muted: #b3a89c;
    --card: #221c17;
    --line: #362d25;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px, env(safe-area-inset-left));
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.hero { max-width: 960px; margin: 0 auto; padding: 4rem 0 2.5rem; text-align: center; }
.face { display: block; margin: 0 auto 1rem; width: 96px; height: 96px; animation: wobble 3s ease-in-out infinite; }
@keyframes wobble { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-10deg) scale(1.08); } 92% { transform: rotate(8deg); } }
.logo { margin: 0; font-size: clamp(4rem, 16vw, 8rem); line-height: 1; font-weight: 900; letter-spacing: -0.04em; }
.logo span { display: inline-block; animation: hop 2.4s ease-in-out infinite; }
.logo span:nth-child(odd) { color: var(--brand); }
.logo span:nth-child(2) { animation-delay: .12s; }
.logo span:nth-child(3) { animation-delay: .24s; }
.logo span:nth-child(4) { animation-delay: .36s; }
.logo small { font-size: .3em; color: var(--muted); letter-spacing: 0; font-weight: 700; margin-left: .1em; }
@keyframes hop { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-.12em) rotate(-4deg); } }
.tag { color: var(--muted); font-size: 1.15rem; margin: 1.2rem auto 0; max-width: 36em; }

.games {
  max-width: 960px; margin: 0 auto;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}
.game {
  position: relative; display: flex; flex-direction: column; gap: 1rem;
  padding: 1.5rem; border-radius: 22px;
  background: var(--card); border: 1px solid var(--line);
  border-top: 6px solid var(--c);
  color: inherit; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.game:hover, .game:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 30px -12px color-mix(in srgb, var(--c) 55%, transparent); }
.game:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; }
.icon {
  width: 3.5rem; height: 3.5rem; border-radius: 16px; display: grid; place-items: center; font-size: 2rem;
  background: color-mix(in srgb, var(--c) 14%, transparent);
}
.body { flex: 1; }
h2 { margin: 0 0 .35rem; font-size: 1.5rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.body p { margin: 0; color: var(--muted); }
.meta { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.meta li { font-size: .8rem; font-weight: 600; padding: .2rem .6rem; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); }
.cta { font-weight: 800; color: var(--c); }

.badge:empty { display: none; }
.badge { font-size: .75rem; font-weight: 800; padding: .2rem .6rem; border-radius: 99px; background: var(--line); color: var(--muted); }
.badge.soon { background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.badge.live { background: var(--c); color: #fff; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .7; } }

footer { max-width: 960px; margin: 0 auto; padding: 3rem 0 4rem; text-align: center; color: var(--muted); }
footer p { margin: .3rem 0; }
.small { font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  .face, .logo span, .badge.live { animation: none; }
  .game { transition: none; }
}
