* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79c0ff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text) !important;
}

main { flex: 1; max-width: 1000px; margin: 0 auto; padding: 2rem; width: 100%; }

.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero p { color: var(--text-muted); font-size: 1.1rem; }

.controls {
  padding: 0 0 1rem;
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.filter-bar label {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.filter-bar select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.filter-bar select:hover {
  border-color: var(--accent);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
  color: var(--text) !important;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.game-icon { font-size: 3rem; margin-bottom: 1rem; }
.game-card h2 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.game-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Game detail pages */
.game-detail { max-width: 700px; margin: 0 auto; }
.game-detail .back { display: inline-block; margin-bottom: 2rem; }
.game-detail h1 { font-size: 2rem; margin-bottom: 1rem; }
.game-detail .meta { color: var(--text-muted); margin-bottom: 1.5rem; }
.game-detail .description { line-height: 1.7; }

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
