/* Dark, responsive game gallery */
:root {
  --bg: #14121a;
  --bg-2: #1c1a24;
  --card: #232030;
  --card-hover: #2b2839;
  --text: #f2f0f7;
  --muted: #a9a4bd;
  --accent: #f19320;
  --accent-2: #d36f8f;
  --border: #322e40;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(241,147,32,0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  text-align: center;
  padding: 56px 20px 28px;
  max-width: 1200px; margin: 0 auto;
}
.site-title {
  margin: 0; font-size: clamp(28px, 5vw, 46px); font-weight: 800; letter-spacing: -0.02em;
}
.logo-emoji { filter: drop-shadow(0 4px 10px rgba(241,147,32,0.4)); }
.site-subtitle { margin: 12px 0 0; color: var(--muted); font-size: clamp(14px, 2.4vw, 18px); }

main { max-width: 1200px; margin: 0 auto; padding: 8px 20px 40px; }

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

.card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  will-change: transform;
}
.card:hover, .card:focus-visible {
  transform: translateY(-6px);
  background: var(--card-hover);
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(0,0,0,0.45), 0 0 0 1px rgba(241,147,32,0.25);
  outline: none;
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #2a2740, #201d2e);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb-fallback {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  font-size: 64px; font-weight: 800; color: var(--accent);
  background: linear-gradient(135deg, #2a2740, #201d2e);
}
.card-thumb.no-thumb .card-thumb-fallback { display: flex; }

.card-play {
  position: absolute; right: 12px; bottom: 12px;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #241800; font-size: 16px;
  transform: translateY(8px) scale(0.9); opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
  box-shadow: 0 6px 16px rgba(241,147,32,0.5);
}
.card:hover .card-play, .card:focus-visible .card-play { transform: translateY(0) scale(1); opacity: 1; }

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.card-title { margin: 0; font-size: 20px; font-weight: 700; }
.card-desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  color: var(--accent-2); background: rgba(211,111,143,0.12);
  border: 1px solid rgba(211,111,143,0.3); border-radius: 999px; padding: 3px 9px;
}

.empty-state, .error-state { text-align: center; color: var(--muted); padding: 60px 20px; }
.error-state { color: #e56d6d; }
.empty-state code { background: var(--bg-2); padding: 2px 6px; border-radius: 6px; }

.site-footer { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 20px 40px; }

@media (max-width: 520px) {
  .site-header { padding-top: 36px; }
  .game-grid { grid-template-columns: 1fr; gap: 16px; }
}
