/* Shell styling only. Games bring their own look and should never have to
   fight this file — nothing here leaks into /games/<slug>/. */

:root {
  color-scheme: dark;
  --bg: #0a0714;
  --panel: #14102400;
  --ink: #f4f1ff;
  --dim: rgba(244, 241, 255, 0.52);
  --line: rgba(244, 241, 255, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(1100px 520px at 20% -10%, #2a1a4d 0%, transparent 60%),
    radial-gradient(900px 460px at 90% 0%, #4b2a63 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 72px 24px 96px;
  padding-left: calc(24px + env(safe-area-inset-left));
  padding-right: calc(24px + env(safe-area-inset-right));
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

@media (max-width: 600px) {
  .wrap { padding-top: 40px; padding-bottom: 56px; }
  header { margin-bottom: 30px; }
}

header { margin-bottom: 48px; }

h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 7vw, 58px);
  letter-spacing: -0.03em;
  line-height: 1;
}

.tag {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

/* Hover lift only where there's a cursor — on touch it fires on tap and
   leaves the card stuck in the hover state after you navigate back. */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 55%, transparent);
    background: rgba(255, 255, 255, 0.05);
  }
}
.card:active { border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}

.card canvas {
  display: block;
  width: 100%;
  height: 132px;
  background: #140c29;
}

.card .body { padding: 14px 16px 16px; }

.card h2 {
  margin: 0 0 4px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  font-size: 13px;
  color: var(--dim);
}

.card .meta {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.card .play { color: var(--accent); }

.soon {
  border-style: dashed;
  display: grid;
  place-items: center;
  min-height: 232px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
}
