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

:root {
  --bg: #0d0d1a;
  --surface: #1a1a2e;
  --accent: #e94560;
  --accent2: #0f3460;
  --text: #eaeaea;
  --muted: #888;
  --radius: 12px;
  --gap: 1.5rem;
}

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

/* Header */
header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background: linear-gradient(180deg, var(--accent2) 0%, transparent 100%);
}

header h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -1px;
  color: #fff;
  text-shadow: 0 0 30px var(--accent);
}

header h1 span {
  color: var(--accent);
}

.tagline {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Grid */
main {
  flex: 1;
  padding: var(--gap);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

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

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

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px #00000060, 0 0 0 1px var(--accent);
}

.game-card__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--accent2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.game-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card__thumb .emoji-fallback {
  font-size: 3.5rem;
  line-height: 1;
}

.game-card__body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.game-card__title {
  font-size: 1.1rem;
  font-weight: 700;
}

.game-card__desc {
  font-size: 0.85rem;
  color: var(--muted);
  flex: 1;
}

.game-card__tag {
  display: inline-block;
  font-size: 0.7rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid #ffffff08;
}
