/* ==========================================================================
   弈起玩 · Games — 全站主题
   深色暖调，bento 卡片风格（参考 today.ai 的现代极简气质）
   ========================================================================== */

:root {
  --bg: #0a0c11;
  --bg-soft: #0e1118;
  --surface: #141824;
  --surface-2: #1a1f2e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9e7e2;
  --text-dim: #a7adbb;
  --text-faint: #677083;
  --accent: #f5b04a;
  --accent-2: #f0713d;
  --gradient: linear-gradient(135deg, #f5b04a 0%, #f0713d 100%);
  --gradient-soft: linear-gradient(135deg, rgba(245, 176, 74, 0.14), rgba(240, 113, 61, 0.14));
  --green: #4ade80;
  --radius: 18px;
  --shadow-card: 0 18px 50px -18px rgba(0, 0, 0, 0.65);
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: rgba(245, 176, 74, 0.3); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: rgba(10, 12, 17, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.nav-brand .mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  color: #1a1005;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(240, 113, 61, 0.35);
}

.nav-brand small {
  color: var(--text-faint);
  font-weight: 500;
  font-size: 12px;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s, opacity 0.2s;
  user-select: none;
}

.btn:hover { transform: translateY(-1px); border-color: var(--border-strong); background: #202636; }

.btn:active { transform: translateY(0); }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--gradient);
  border: none;
  color: #1a1005;
  box-shadow: 0 8px 24px -8px rgba(240, 113, 61, 0.55);
}

.btn-primary:hover { background: var(--gradient); box-shadow: 0 12px 30px -8px rgba(240, 113, 61, 0.7); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 96px 24px 72px;
  text-align: center;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  width: 520px;
  height: 520px;
  background: rgba(245, 176, 74, 0.13);
  top: -220px;
  left: 50%;
  transform: translateX(-70%);
}

.hero::after {
  width: 420px;
  height: 420px;
  background: rgba(240, 113, 61, 0.1);
  bottom: -200px;
  right: 8%;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: rgba(245, 176, 74, 0.09);
  border: 1px solid rgba(245, 176, 74, 0.22);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 72px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.hero h1 .grad {
  background: linear-gradient(120deg, #ffd98a 10%, #f5b04a 45%, #f0713d 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.sub {
  max-width: 560px;
  margin: 22px auto 0;
  font-size: 17px;
  color: var(--text-dim);
}

.hero .cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-lg { padding: 14px 30px; font-size: 15.5px; border-radius: 14px; }

/* 统计条 */
.stats {
  max-width: 860px;
  margin: 64px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* ---------- 关于板块卡片 ---------- */
.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.about-card .about-icon { font-size: 24px; }

.about-card b {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.about-card span {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .about-cards { grid-template-columns: 1fr; gap: 12px; }
  .about-card { padding: 20px 18px; }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 12px;
}

.stat b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(120deg, #ffd98a, #f0713d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat span { font-size: 12.5px; color: var(--text-faint); }

/* ---------- 区块标题 ---------- */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 90px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 26px;
}

.section-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }

.section-head p { color: var(--text-faint); font-size: 14px; }

/* ---------- Bento 游戏卡片 ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 16px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1.2), border-color 0.25s, box-shadow 0.25s;
  animation: fadeUp 0.6s both;
}

.game-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 176, 74, 0.4);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(245, 176, 74, 0.12), 0 24px 60px -20px rgba(240, 113, 61, 0.25);
}

.game-card .icon { width: 52px; height: 52px; color: var(--accent); }

.game-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 4px; }

.game-card p { font-size: 13px; color: var(--text-dim); line-height: 1.55; }

.game-card .arrow {
  position: absolute;
  right: 20px;
  bottom: 18px;
  font-size: 14px;
  color: var(--text-faint);
  transition: transform 0.25s, color 0.25s;
}

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

.badge {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge-live {
  color: #0c240f;
  background: linear-gradient(120deg, #7ce8a2, #34d374);
  box-shadow: 0 4px 14px rgba(52, 211, 116, 0.35);
}

.badge-soon {
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

/* 主打卡片（五子棋） */
.game-card.feature {
  grid-column: span 2;
  grid-row: span 2;
  background:
    radial-gradient(120% 90% at 88% 12%, rgba(245, 176, 74, 0.14) 0%, transparent 55%),
    linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
}

.game-card.feature h3 { font-size: 30px; }

.game-card.feature p { font-size: 14.5px; max-width: 300px; }

.game-card.feature .preview {
  position: absolute;
  right: -18px;
  bottom: -14px;
  width: 62%;
  max-width: 380px;
  opacity: 0.95;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1.2);
}

.game-card.feature:hover .preview { transform: scale(1.04) rotate(-1.2deg); }

/* 未上线卡片 */
.game-card.soon { filter: saturate(0.55); }

.game-card.soon:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }

.game-card.soon .icon { color: var(--text-dim); }

/* 占位虚线卡 */
.game-card.ghost {
  grid-column: span 2;
  border: 1.5px dashed var(--border-strong);
  background: transparent;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-faint);
}

.game-card.ghost:hover { border-color: rgba(245, 176, 74, 0.35); color: var(--text-dim); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 44px 24px 30px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-inner .about { max-width: 320px; }

.footer-inner .about p { color: var(--text-faint); font-size: 13px; margin-top: 10px; }

.footer-col h4 {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  font-weight: 600;
}

.footer-col a {
  display: block;
  color: var(--text-faint);
  text-decoration: none;
  font-size: 13.5px;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.copyright {
  max-width: 1180px;
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- 动画 & 响应式 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 无障碍/SEO 辅助 ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 游戏页底部相关推荐 ---------- */
.related-games {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.rg-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 46px;
}

.related-games h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }

.rg-lead {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
  margin-top: 8px;
  max-width: 640px;
}

.rg-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.rg-links a {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}

.rg-links a:hover {
  color: var(--text);
  border-color: rgba(245, 176, 74, 0.4);
  transform: translateY(-1px);
}

.rg-links a.rg-all {
  background: var(--gradient-soft);
  border-color: rgba(245, 176, 74, 0.35);
  color: var(--accent);
}

@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 190px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 64px; }
}

@media (max-width: 600px) {
  .nav { padding: 0 16px; }
  .nav-links a:not(.btn) { display: none; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .game-card, .game-card.feature, .game-card.ghost { grid-column: span 1; grid-row: auto; min-height: 170px; }
  .game-card.feature .preview { display: none; }
  .game-card .arrow { position: static; align-self: flex-end; margin-top: 10px; }
  .section { padding: 24px 16px 60px; }
}
