/* 游戏试验场 · 明亮扁平样式（无外部字体/图片依赖） */

:root {
  --bg: #f7f4ea;
  --paper: #fffdf8;
  --ink: #20242b;
  --muted: #66707b;
  --line: #ded8c8;
  --focus: #2f6bff;
  --radius: 26px;
  --max: 1180px;
  --shadow: #e7e0d0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, #ffeab8 0, transparent 30%),
    radial-gradient(circle at 92% 4%, #d3e9e1 0, transparent 26%),
    radial-gradient(rgba(32, 36, 43, 0.07) 1px, transparent 1px);
  background-size: auto, auto, 22px 22px;
  background-attachment: fixed;
}

::selection {
  background: #f5c451;
  color: var(--ink);
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus {
  top: 16px;
}

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

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: #f5c451;
  font-size: 18px;
  box-shadow: 3px 3px 0 var(--shadow);
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-meta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c8bfab;
}

/* ---------- main / hero ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.hero {
  padding: 76px 0 46px;
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.tagline {
  margin: 22px 0 0;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-desc {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.8;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 2px 2px 0 #ece6d8;
  font-size: 12px;
  font-weight: 600;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.category-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 13px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--shadow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.category-nav a:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--shadow);
}

/* ---------- category sections ---------- */

.game-section {
  scroll-margin-top: 88px;
}

.game-section + .game-section {
  margin-top: 64px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.section-copy .eyebrow {
  margin-bottom: 6px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.section-sub {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.section-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- game grid ---------- */

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.game-card {
  --accent: #d99a1f;
  --soft: #fbf0cf;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.game-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 var(--soft);
}

.game-card:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.game-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 18px;
  background: var(--soft);
  font-size: 28px;
  line-height: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.game-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.game-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.game-desc {
  flex: 1;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.72;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f3efe4;
  color: #5a6470;
  font-size: 11px;
  font-weight: 600;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--accent);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--soft);
}

.btn:hover {
  transform: translate(-1px, -1px);
}

.btn-primary:hover {
  box-shadow: 5px 5px 0 var(--accent);
}

.btn-secondary:hover {
  background: var(--soft);
  box-shadow: 5px 5px 0 var(--soft);
}

/* ---------- note / footer ---------- */

.note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 56px;
  padding: 32px 36px;
  border: 2px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 6px 6px 0 #ebe5d7;
}

.note-copy h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.note-copy p:last-child {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

.note-mark {
  flex: 0 0 auto;
  color: #d99a1f;
  font-size: 64px;
  line-height: 1;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 24px 44px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

/* ---------- 404 ---------- */

.notfound {
  max-width: 760px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 72px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.notfound h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.notfound p {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.notfound .btn {
  margin-top: 28px;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .header-inner {
    min-height: 62px;
    padding: 10px 18px;
  }

  main {
    padding: 0 18px 56px;
  }

  .hero {
    padding: 52px 0 34px;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.4rem);
  }

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

  .game-card {
    padding: 20px;
  }

  .note {
    margin-top: 40px;
    padding: 24px;
  }

  .note-mark {
    display: none;
  }

  .site-footer {
    flex-direction: column;
    padding: 20px 18px 36px;
  }
}

@media (max-width: 460px) {
  .header-meta {
    font-size: 11px;
    padding: 7px 10px;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .game-actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
