
* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;

  --bg: #080a10;
  --surface: rgba(18, 22, 32, 0.78);
  --surface-hover: rgba(25, 30, 43, 0.94);

  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.18);

  --text: #f5f7fb;
  --muted: #9299aa;

  --accent: #8b5cf6;
  --accent-2: #6366f1;

  --shadow: rgba(0, 0, 0, 0.35);
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;

  color: var(--text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  overflow-x: hidden;

  background: var(--bg);
}

.container {
  width: min(1120px, calc(100% - 40px));

  margin: 0 auto;

  padding: 72px 0 48px;
}

.header {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 24px;

  margin-bottom: 38px;
}

.eyebrow {
  margin: 0 0 10px;

  color: #a78bfa;

  font-size: 0.75rem;
  font-weight: 800;

  letter-spacing: 0.16em;
}

h1 {
  margin: 0;

  font-size: clamp(2.5rem, 6vw, 4.6rem);

  line-height: 0.95;

  letter-spacing: -0.055em;
}

.subtitle {
  margin: 18px 0 0;

  color: var(--muted);

  font-size: 1rem;
}

.games {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fill,
      minmax(245px, 1fr)
    );

  gap: 18px;
}

/*
  The entire game card is now a button.
*/
.game-card {
  position: relative;

  display: flex;
  flex-direction: column;

  min-height: 225px;

  padding: 22px;

  border: 5px solid white;
  border-radius: 20px;

  background: var(--surface);

  backdrop-filter: blur(18px);

  color: var(--text);

  font: inherit;

  text-align: center;

  cursor: pointer;

  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

/*
  Card hover effect.
*/
.game-card:hover {
  transform: translateY(-4px);

  background: var(--surface-hover);

  border-color: rgba(255, 255, 255, 0.3);

  box-shadow:
    0 12px 30px var(--shadow);
}

/*
  Card click effect.
*/
.game-card:active {
  transform: translateY(-1px);
}

/*
  Keyboard accessibility.
*/
.game-card:focus-visible {
  outline: 3px solid var(--accent);

  outline-offset: 4px;
}

/*
  Game preview image.
*/
.game-image {
  display: block;

  width: 100%;
  height: 150px;

  margin-bottom: 18px;

  border-radius: 12px;

  object-fit: cover;
}

/*
  Game title.
*/
.game-card h2 {
  margin: 0;

  font-size: 1.25rem;

  letter-spacing: -0.025em;
}

/*
  Game description.
*/
.game-card p {
  margin: 8px 0 22px;

  color: var(--muted);

  font-size: 0.9rem;

  line-height: 1.5;
}

.empty-state {
  padding: 60px 20px;

  border:
    1px dashed
    var(--border-hover);

  border-radius: 20px;

  text-align: center;

  color: var(--muted);
}

.empty-state h2 {
  margin: 0 0 8px;

  color: var(--text);
}

.empty-state p {
  margin: 0;
}

code {
  padding: 2px 5px;

  border-radius: 5px;

  background:
    rgba(255, 255, 255, 0.07);

  color: #c4b5fd;
}

.footer {
  display: flex;

  justify-content: center;

  gap: 8px;

  padding: 0 20px 28px;

  color: #5f6675;

  font-size: 0.75rem;
}

/*
  Mobile layout.
*/
@media (max-width: 650px) {

  .container {
    width: min(
      100% - 28px,
      1120px
    );

    padding-top: 44px;
  }

  .header {
    align-items: flex-start;

    flex-direction: column;

    margin-bottom: 28px;
  }

  .games {
    grid-template-columns: 1fr;
  }
}
