/* ── reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:        #0d0d0f;
  --surface:   #18181c;
  --border:    #2a2a32;
  --accent:    #7c3aed;
  --accent-hi: #a855f7;
  --text:      #e8e8f0;
  --muted:     #6b6b80;
  --radius:    12px;
  --font-mono: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  --font-sans: "Inter", system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem;
}

/* ── header ── */
header {
  text-align: center;
  padding: 4rem 0 2.5rem;
}

.logo {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1;
}

.logo span {
  color: var(--accent-hi);
}

.tagline {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ── games grid ── */
main {
  width: 100%;
  max-width: 960px;
  flex: 1;
  padding-bottom: 4rem;
}

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

/* ── game card ── */
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.25);
}

.game-thumb {
  background: var(--border);
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.game-info {
  padding: 1rem 1.25rem 1.25rem;
}

.game-info h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.game-info p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── empty state ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 0;
  color: var(--muted);
}

.empty-state span {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.empty-state p {
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

/* ── footer ── */
footer {
  padding: 1.5rem 0 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

footer a {
  color: var(--accent-hi);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* ── game pages (shared) ── */
.game-page-header {
  width: 100%;
  max-width: 960px;
  padding: 1.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  transition: color 0.15s, border-color 0.15s;
}

.back-link:hover {
  color: var(--text);
  border-color: var(--accent);
}
