:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-hover: #ffffff;
  --border: rgba(20, 24, 31, 0.09);
  --border-hover: rgba(20, 24, 31, 0.22);
  --text: #14181f;
  --text-muted: #58606d;
  --text-subtle: #747d8c;
  --badge-bg: rgba(20, 24, 31, 0.06);
  --focus: #2759b4;
  --shadow: 0 1px 2px rgba(20, 24, 31, 0.04);
  --shadow-hover: 0 8px 24px rgba(20, 24, 31, 0.08);
  background: var(--bg);
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #181c22;
    --surface-hover: #1e232b;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    --text: #f3f5f8;
    --text-muted: #a6afbe;
    --text-subtle: #828b9b;
    --badge-bg: rgba(255, 255, 255, 0.08);
    --focus: #83aaff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

main {
  width: min(100% - 3rem, 42rem);
  margin: auto;
  padding: 4.5rem 0 3.5rem;
}

header {
  margin-bottom: 2.75rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.tagline {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.section-label {
  margin: 0 0 1rem;
  color: var(--text-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.game-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.game-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.game-icon {
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 14px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.game-meta {
  min-width: 0;
}

.game-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.7rem;
}

.game-card h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 620;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.tag {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.3;
}

.game-description {
  margin: 0.45rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.arrow {
  color: var(--text-subtle);
  font-size: 1.15rem;
  line-height: 1;
  transition: transform 150ms ease, color 150ms ease;
}

.game-card:hover .arrow {
  color: var(--text);
  transform: translateX(3px);
}

footer {
  width: min(100% - 3rem, 42rem);
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text-subtle);
  font-size: 0.85rem;
}

footer a:hover {
  color: var(--text);
}

@media (max-width: 540px) {
  main {
    padding: 3rem 0 2.5rem;
  }

  .game-card {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 1rem;
    padding: 1.1rem;
  }

  .game-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
  }

  .arrow {
    display: none;
  }

  footer {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-card,
  .arrow {
    transition: none;
  }

  .game-card:hover {
    transform: none;
  }

  .game-card:hover .arrow {
    transform: none;
  }
}
