:root {
  color-scheme: light;
  --bg: #eef3ef;
  --ink: #202720;
  --muted: #5d665f;
  --line: rgba(32, 39, 32, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 36px 22px;
  background:
    radial-gradient(circle at 12% 18%, rgba(46, 125, 112, 0.16), transparent 32%),
    radial-gradient(circle at 88% 12%, rgba(198, 76, 62, 0.12), transparent 30%),
    linear-gradient(135deg, #f8faf5, var(--bg));
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.home-shell {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.site-nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  justify-content: flex-start;
  padding: 0 0 12px;
}

.back-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(47, 127, 115, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #2f7f73;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(32, 39, 32, 0.12);
  backdrop-filter: blur(12px);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.back-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 127, 115, 0.34);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 18px 38px rgba(32, 39, 32, 0.16);
}

.back-pill span:first-child {
  font-size: 18px;
  line-height: 1;
}

.hero {
  padding: 20px 0 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #2f7f73;
  font-size: 15px;
  font-weight: 800;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 8vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.game-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  box-shadow: 0 18px 40px rgba(32, 39, 32, 0.12);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.08)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.13) 0 12px, transparent 12px 24px);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 52px rgba(32, 39, 32, 0.18);
}

.game-card > * {
  position: relative;
  z-index: 1;
}

.game-mark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
}

.game-card strong {
  font-size: 24px;
}

.game-card small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  line-height: 1.5;
}

.card-2048 { background: linear-gradient(135deg, #9b8f7d, #2f7f73); }
.card-tetris { background: linear-gradient(135deg, #335c81, #d87b3d); }
.card-snake { background: linear-gradient(135deg, #2f7f73, #8b6f47); }
.card-link { background: linear-gradient(135deg, #7b5aa6, #c64c3e); }
.card-flat { background: linear-gradient(135deg, #27374d, #d2a24c); }

@media (max-width: 900px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav {
    top: 8px;
  }
}

@media (max-width: 560px) {
  body {
    padding: 24px 16px;
  }

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

  .game-card {
    min-height: 190px;
  }

  .site-nav {
    top: 8px;
    padding: 0 0 8px;
  }

  .back-pill {
    width: 100%;
    justify-content: center;
  }
}
