:root {
  --bg: #0E1830;
  --surface: #16233F;
  --line: #2B3E66;
  --text: #F5F1EA;
  --muted: #A9B4C8;
  --cyan: #8FE3F0;
  --coral: #F28A6B;
  --coral-ink: #2A0F18;
  --radius: 22px;
  --display: 'Fredoka', 'Trebuchet MS', sans-serif;
  --body: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
}

a { color: var(--cyan); }
a:hover { color: #C4F2F8; }

.site-header,
main,
.site-footer {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header { padding-top: 28px; padding-bottom: 8px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
}
.brand em { font-style: normal; color: var(--cyan); }
.brand:hover { color: var(--text); }

.intro { padding: 48px 0 36px; max-width: 640px; }
.intro h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05;
}
.intro p { margin: 0; color: var(--muted); font-size: 19px; }

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 24px;
  padding-bottom: 64px;
}

.game {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.game-art { display: block; background: #0A1122; }
.game-art img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.game-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px 26px;
  flex-grow: 1;
}
.game-body h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 28px; }
.game-body h2 a { color: var(--text); text-decoration: none; }
.game-body h2 a:hover { color: var(--accent, var(--cyan)); }
.game-body p { margin: 0; color: #CBD3E1; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.play {
  align-self: flex-start;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--coral-ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--accent-dark, #8C3D55);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.play:hover { color: var(--coral-ink); transform: translateY(-1px); box-shadow: 0 5px 0 var(--accent-dark, #8C3D55); }
.play:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-dark, #8C3D55); }
.play:focus-visible, .game-body h2 a:focus-visible, .brand:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.game-soon { background: transparent; border: 2px dashed var(--line); }
.soon-art {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  color: var(--line);
}

.site-footer { margin-top: auto; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--surface); }
.site-footer p { margin: 0; color: var(--muted); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .play { transition: none; }
}
