:root {
  --sky-top: #8fd0f0;
  --sky-bot: #cdeeff;
  --grass: #6aa84f;
  --grass-dark: #4e7d39;
  --dirt: #8b5a2b;
  --ink: #2b2118;
  --panel: #fffdf6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bot) 70%, var(--sky-bot) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- 背景装饰 ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.sun {
  position: absolute;
  top: 24px;
  left: 28px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff6b0, #ffd75e 60%, #f5b93c);
  box-shadow: 0 0 40px rgba(255, 219, 100, 0.85);
}

.cloud {
  position: absolute;
  height: 26px;
  background: #fff;
  border-radius: 20px;
  opacity: 0.9;
  animation: drift linear infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.cloud::before { width: 34px; height: 34px; top: -16px; left: 14px; }
.cloud::after  { width: 24px; height: 24px; top: -11px; left: 46px; }

.c1 { width: 90px; top: 12%; left: -120px; animation-duration: 46s; }
.c2 { width: 120px; top: 26%; left: -160px; animation-duration: 62s; animation-delay: -18s; }
.c3 { width: 70px; top: 8%; left: -100px; animation-duration: 54s; animation-delay: -34s; }

@keyframes drift {
  to { transform: translateX(calc(100vw + 220px)); }
}

.hill {
  position: absolute;
  bottom: 74px;
  border-radius: 50% 50% 0 0;
  background: #9ad86a;
}

.h1 { left: -6%; width: 62%; height: 190px; opacity: 0.55; }
.h2 { right: -10%; width: 70%; height: 150px; opacity: 0.35; background: #b6e88f; }

.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 18px, transparent 18px 36px),
    linear-gradient(180deg, var(--grass) 0 18px, var(--grass-dark) 18px 26px, var(--dirt) 26px 100%);
}

/* ---------- 标题 ---------- */
.hero {
  text-align: center;
  padding: 46px 20px 26px;
}

.logo img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  border: 3px solid #2b2118;
  box-shadow: 0 4px 0 #2b2118;
  image-rendering: pixelated;
}

.hero h1 {
  margin: 10px 0 6px;
  font-size: clamp(26px, 6vw, 44px);
  letter-spacing: 2px;
  color: #fff;
  text-shadow:
    0 3px 0 #4a7d2e,
    0 6px 14px rgba(31, 61, 20, 0.35);
}

.sub {
  margin: 0;
  font-size: 14px;
  color: #29503f;
  opacity: 0.85;
}

/* ---------- 卡片 ---------- */
.grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 20px 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 620px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1020px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  text-decoration: none;
  color: inherit;
  background: var(--panel);
  border: 4px solid #2b2118;
  border-radius: 16px;
  box-shadow:
    0 6px 0 #2b2118,
    0 12px 24px rgba(20, 40, 60, 0.18);
  transform: translateY(14px);
  opacity: 0;
  animation: pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) forwards;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

@keyframes pop {
  to { transform: translateY(0); opacity: 1; }
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  box-shadow:
    0 10px 0 #2b2118,
    0 20px 34px rgba(20, 40, 60, 0.24);
  outline: none;
}

.card:active {
  transform: translateY(2px);
  box-shadow:
    0 3px 0 #2b2118,
    0 8px 14px rgba(20, 40, 60, 0.2);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  border-radius: 10px 10px 0 0;
  background: var(--accent);
}

.card-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 18%, #fff);
  border: 3px solid #2b2118;
  overflow: hidden;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.card-body h2 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: 1px;
}

.tag {
  display: inline-block;
  margin: 0 0 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #274e1a;
  background: color-mix(in srgb, var(--accent) 28%, #fff);
  border-radius: 999px;
}

.desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #5a5048;
}

.play {
  margin-top: auto;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 800;
  color: #1f4d10;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 2px;
}

/* ---------- 页脚 ---------- */
.foot {
  text-align: center;
  padding: 0 20px 110px;
  font-size: 13px;
  color: #29503f;
}

.foot p { margin: 6px 0; }

.foot .hint {
  font-size: 12px;
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  .card, .cloud { animation: none; }
  .card { transform: none; opacity: 1; }
}
