/* ============================================================
   GAME·UX LAB — 游戏引导 Demo 实验室 · 画廊样式
   ============================================================ */

:root {
  --bg:        #06060d;
  --bg-2:      #0b0b17;
  --text:      #f5f5fa;
  --text-2:    rgba(232, 234, 250, .64);
  --text-3:    rgba(232, 234, 250, .38);
  --line:      rgba(255, 255, 255, .08);
  --glass:     rgba(255, 255, 255, .035);
  --v1:        #7c6cff;
  --c1:        #22d3ee;
  --f1:        #e879f9;
  --radius:    20px;
  --font-en:   "Outfit", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font:      var(--font-en), "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(124, 108, 255, .10), transparent 60%),
    radial-gradient(900px 500px at 10% 15%, rgba(34, 211, 238, .06), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(124, 108, 255, .45); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

/* ------------------------------------------------------------
   背景层:星空 / 极光 / 透视网格 / 噪点
   ------------------------------------------------------------ */
#stars {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.aurora {
  position: fixed;
  width: 55vmax; height: 55vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  z-index: 0; pointer-events: none;
  mix-blend-mode: screen;
  will-change: transform;
}
.a1 { top: -22vmax; left: -12vmax; background: radial-gradient(circle at 35% 35%, rgba(124,108,255,.55), transparent 62%); animation: drift1 26s ease-in-out infinite alternate; }
.a2 { bottom: -28vmax; right: -14vmax; background: radial-gradient(circle at 60% 60%, rgba(34,211,238,.38), transparent 62%); animation: drift2 32s ease-in-out infinite alternate; }
.a3 { top: 26%; left: 58%; width: 28vmax; height: 28vmax; opacity: .3; background: radial-gradient(circle at 50% 50%, rgba(232,121,249,.22), transparent 65%); animation: drift3 22s ease-in-out infinite alternate; }

@keyframes drift1 { to { transform: translate(9vmax, 7vmax)  scale(1.15); } }
@keyframes drift2 { to { transform: translate(-8vmax, -6vmax) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-10vmax, 6vmax) scale(1.25); } }

.grid-floor {
  position: fixed; left: -20%; right: -20%; bottom: -6%;
  height: 46vh;
  background:
    linear-gradient(rgba(124,108,255,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,108,255,.16) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(600px) rotateX(62deg);
  transform-origin: center top;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 42%, transparent 92%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 42%, transparent 92%);
  opacity: .35;
  z-index: 0; pointer-events: none;
}

.noise {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------
   Hero:一行彩色动画标题(逐字渐变 + 弹跳)
   ------------------------------------------------------------ */
main { position: relative; z-index: 1; }

.hero {
  max-width: 980px; margin: 0 auto;
  padding: 40px 20px 30px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}

/* 列表分层:标题区与游戏列表之间的分隔 */
.list-head {
  max-width: 1240px; margin: 0 auto; padding: 0 28px 16px;
  display: flex; align-items: center; gap: 16px;
  animation: fadeUp .8s .3s both;
}
.lh-label {
  font-size: 14px; font-weight: 800; letter-spacing: .28em;
  color: var(--text-2); white-space: nowrap;
}
.lh-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,124,255,.45) 30%, rgba(56,217,245,.35) 70%, transparent);
}
.lh-count {
  font-family: var(--font-en); font-size: 12px; font-weight: 700;
  color: var(--text-3); white-space: nowrap;
}
.title {
  font-weight: 800; line-height: 1.18; letter-spacing: .03em;
  font-size: clamp(22px, 3.6vw, 44px);
  background: linear-gradient(92deg, #a5b4fc 5%, #e879f9 42%, #22d3ee 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 26px rgba(124, 108, 255, .35));
  animation: fadeUp .8s .1s both, shimmer 7s linear infinite;
}
.sub {
  margin: 14px auto 0; max-width: 640px;
  font-size: 15px; line-height: 1.8; color: var(--text-2);
  animation: fadeUp .8s .28s both;
}
.stats[hidden] { display: none; }
.stats {
  display: inline-flex; align-items: center; gap: 34px;
  margin-top: 32px; padding: 16px 34px;
  border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  backdrop-filter: blur(10px);
  animation: fadeUp .8s .36s both;
}
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 88px; }
.stat b { font-family: var(--font-en); font-size: 30px; font-weight: 800; background: linear-gradient(120deg, #fff, #b9bcf0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 12.5px; color: var(--text-3); letter-spacing: .06em; }
.stat-div { width: 1px; height: 40px; background: var(--line); }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-top: 24px; animation: fadeUp .8s .44s both; }
.hero-cta[hidden], .hero-cta [hidden] { display: none; }

.btn-primary {
  font-family: var(--font); font-size: 15px; font-weight: 700; color: #fff;
  padding: 14px 30px; border-radius: 14px; cursor: pointer; border: none;
  background: linear-gradient(135deg, #7c6cff, #b44df0 60%, #e879f9);
  box-shadow: 0 10px 32px -8px rgba(124,108,255,.65), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px -10px rgba(124,108,255,.85), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-primary:active { transform: translateY(0) scale(.98); }

.btn-ghost {
  display: inline-flex; align-items: center;
  font-size: 15px; font-weight: 600; color: var(--text-2); text-decoration: none;
  padding: 14px 26px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--glass);
  transition: .25s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.2); transform: translateY(-2px); }

/* ------------------------------------------------------------
   过滤栏(仅多分类时显示)—— 悬浮圆角玻璃条
   ------------------------------------------------------------ */
.filterbar {
  position: sticky; top: 12px; z-index: 40;
  max-width: 1184px;               /* 与卡片左右留白对齐(1240 - 2×28) */
  margin: 4px auto 22px; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 14, 26, .52);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 12px 34px -20px rgba(0, 0, 0, .65);
}
.filterbar[hidden] { display: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--font); font-size: 13px; font-weight: 600;
  color: var(--text-2); background: transparent;
  border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 16px; cursor: pointer; transition: .25s;
  display: inline-flex; align-items: center; gap: 7px;
}
.chip small { font-family: var(--font-en); font-weight: 700; font-size: 11px; color: var(--text-3); }
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.25); }
.chip.on {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #7c6cff, #b44df0);
  box-shadow: 0 6px 20px -6px rgba(124,108,255,.7);
}
.chip.on small { color: rgba(255,255,255,.75); }

.search {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 9px 14px; min-width: 260px;
  background: var(--glass); transition: border-color .25s;
  color: var(--text-3);
}
.search:focus-within { border-color: rgba(124,108,255,.55); box-shadow: 0 0 0 3px rgba(124,108,255,.15); }
.search svg { width: 15px; height: 15px; flex: none; }
.search input {
  flex: 1; background: none; border: none; outline: none;
  font-family: var(--font); font-size: 13.5px; color: var(--text);
}
.search input::placeholder { color: var(--text-3); }
.search kbd {
  font-family: var(--font-en); font-size: 11px; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px;
}

/* ------------------------------------------------------------
   卡片网格:Featured 门面大卡 + Compact 扫读卡两级层级
   ------------------------------------------------------------ */
.grid { max-width: 1240px; margin: 0 auto; padding: 8px 28px 40px; }
.grid-featured { display: grid; gap: 22px; grid-template-columns: repeat(2, 1fr); }
.grid-compact  { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }

/* 分节头(>12 个时按分类分节) */
.grid .list-head { padding: 24px 0 12px; margin: 0; }

/* 紧凑卡:信息瘦身,密度优先 */
.card.sm .card-body { padding: 12px 14px 14px; }
.card.sm .card-title-row h3 {
  font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card.sm .card-desc {
  margin-top: 5px; font-size: 12.5px; line-height: 1.55;
  -webkit-line-clamp: 1; min-height: 20px;
}
.card.sm .card-cat { font-size: 10px; padding: 3px 9px; }
.card.sm .card-en, .card.sm .card-tags, .card.sm .card-foot { display: none; }
.hover-arrow {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; color: #fff;
  background: var(--acA); border: 1px solid rgba(255, 255, 255, .3);
  opacity: 0; transform: translate(5px, 5px) scale(.75);
  transition: .25s cubic-bezier(.22, 1, .36, 1); pointer-events: none;
}
.card.sm:hover .hover-arrow { opacity: 1; transform: none; }

.card {
  --ac: #7c6cff; --acA: rgba(124,108,255,.35);
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  overflow: hidden; cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .35s cubic-bezier(.22,1,.36,1), border-color .35s, box-shadow .35s;
  animation: cardIn .7s cubic-bezier(.22,1,.36,1) both;
  animation-delay: calc(min(var(--i, 0), 8) * 70ms);   /* 封顶:几十卡时尾卡不迟到 */
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--acA);
  box-shadow: 0 24px 60px -22px var(--ac), 0 0 0 1px var(--acA), inset 0 1px 0 rgba(255,255,255,.08);
}
.card::after { /* 鼠标跟随高光 */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--acA), transparent 55%);
  transition: opacity .35s;
}
.card:hover::after { opacity: .5; }

.card-media { position: relative; aspect-ratio: 16 / 9.6; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(60% 90% at 50% 110%, var(--acA), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent);
}
/* 封面图(真实游戏截图) */
.card-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform .6s cubic-bezier(.22,1,.36,1), filter .6s;
}
.card:hover .card-img { transform: scale(1.055); filter: saturate(1.15) brightness(1.06); }
.card-media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,6,13,.05) 40%, rgba(6,6,13,.55));
}
.card-media .card-cat, .card-media .card-no { z-index: 2; }
.card-no {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  font-family: var(--font-en); font-size: 12px; font-weight: 700; letter-spacing: .12em;
  color: var(--text-3);
}
.card-cat {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  color: #fff; background: var(--acA);
  border: 1px solid rgba(255,255,255,.18);
  padding: 4px 10px; border-radius: 99px;
  backdrop-filter: blur(6px);
}

.card-body { padding: 20px 22px 18px; }
.card-title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-title-row h3 { font-size: 18.5px; font-weight: 700; letter-spacing: .01em; }
.card-en { font-family: var(--font-en); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.card-desc {
  margin-top: 10px; font-size: 13.5px; line-height: 1.75; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 47px;
}
.card-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.card-tags span {
  font-size: 11.5px; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px;
  transition: .25s;
}
.card:hover .card-tags span { color: var(--text-2); border-color: rgba(255,255,255,.16); }

.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px 20px;
}
.card-run {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--ac);
  opacity: .85; transition: .25s;
}
.card-run .arr { transition: transform .25s; display: inline-block; }
.card:hover .card-run { opacity: 1; }
.card:hover .card-run .arr { transform: translateX(4px); }

.empty {
  max-width: 1240px; margin: 0 auto 80px; padding: 80px 28px; text-align: center;
  color: var(--text-3); font-size: 14.5px;
}
.empty-icon { font-size: 44px; margin-bottom: 14px; filter: grayscale(.3); }

/* ------------------------------------------------------------
   卡片动效舞台(6 种引导模式的抽象化示意)
   ------------------------------------------------------------ */
.stage { position: absolute; inset: 0; display: grid; place-items: center; }

/* — tap:目标 + 扩散涟漪 + 点击手指 — */
.s-tap .tap-target {
  width: 64px; height: 64px; border-radius: 18px; z-index: 1;
  display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 10px 30px -8px var(--acA), inset 0 1px 0 rgba(255,255,255,.2);
  animation: targetPulse 2.4s ease-in-out infinite;
}
.s-tap .ripple {
  position: absolute; width: 64px; height: 64px; border-radius: 18px;
  border: 1.5px solid var(--ac);
  animation: ripple 2.4s cubic-bezier(.22,1,.36,1) infinite;
}
.s-tap .ripple.r2 { animation-delay: 1.2s; }
.s-tap .tap-finger { position: absolute; font-size: 24px; top: 18%; animation: fingerTap 1.2s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }

/* — bubble:NPC + 打字气泡 — */
.s-bubble { gap: 14px; grid-auto-flow: column; }
.s-bubble .npc {
  width: 58px; height: 58px; border-radius: 50%; font-size: 26px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 8px 26px -6px var(--acA);
  animation: floaty 3s ease-in-out infinite;
}
.s-bubble .chat {
  position: relative; padding: 12px 16px; border-radius: 14px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(4px);
  display: flex; gap: 5px; align-items: center;
}
.s-bubble .chat::before {
  content: ""; position: absolute; left: -5px; top: 50%;
  width: 10px; height: 10px; transform: translateY(-50%) rotate(45deg);
  background: rgba(255,255,255,.08); border-left: 1px solid rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.16);
}
.s-bubble .chat i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ac);
  animation: typing 1.2s ease-in-out infinite;
}
.s-bubble .chat i:nth-child(2) { animation-delay: .15s; }
.s-bubble .chat i:nth-child(3) { animation-delay: .3s; }

/* — arrow:虚线路径 + 弹跳箭头 — */
.s-arrow .pathline { position: absolute; inset: 0; width: 100%; height: 100%; }
.s-arrow .pathline path {
  stroke: var(--ac); stroke-width: 2.5; stroke-dasharray: 2 9; stroke-linecap: round; fill: none;
  animation: march 1.2s linear infinite; filter: drop-shadow(0 0 6px var(--acA));
}
.s-arrow .chev {
  position: absolute; right: 24%; top: 24%;
  color: var(--ac); font-size: 20px;
  filter: drop-shadow(0 4px 10px var(--acA));
  animation: chevBob 1.1s ease-in-out infinite;
}
.s-arrow .goal {
  position: absolute; right: 17%; top: 42%;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
}

/* — slides:轮播卡片切换 — */
.s-slides .window {
  position: relative; width: 118px; height: 74px; border-radius: 12px;
  overflow: hidden; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.04); box-shadow: 0 10px 30px -8px var(--acA);
}
.s-slides .strip { position: absolute; inset: 0; display: flex; width: 300%; animation: slideStrip 4.5s cubic-bezier(.65,0,.35,1) infinite; }
.s-slides .slide {
  flex: 1; display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(150deg, rgba(255,255,255,.1), transparent);
}
.s-slides .bar { position: absolute; left: 10px; right: 10px; bottom: 7px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.s-slides .bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: var(--ac); animation: barFill 4.5s cubic-bezier(.65,0,.35,1) infinite; }

/* — burst:庆祝放射 — */
.s-burst .rays {
  position: absolute; width: 240px; height: 240px; border-radius: 50%;
  background: repeating-conic-gradient(var(--acA) 0 9deg, transparent 9deg 24deg);
  -webkit-mask-image: radial-gradient(circle, transparent 24%, #000 45%, transparent 72%);
          mask-image: radial-gradient(circle, transparent 24%, #000 45%, transparent 72%);
  animation: spin 14s linear infinite;
}
.s-burst .gift {
  font-size: 34px; z-index: 1;
  animation: starPop 2.2s cubic-bezier(.22,1,.36,1) infinite;
  filter: drop-shadow(0 6px 18px var(--acA));
}
.s-burst .confetti-dot { position: absolute; width: 7px; height: 7px; border-radius: 2px; background: var(--ac); opacity: 0; animation: confArc 2.2s ease-out infinite; }
.s-burst .confetti-dot.d1 { left: 32%; top: 46%; animation-delay: .05s; background: #fbbf24; }
.s-burst .confetti-dot.d2 { right: 33%; top: 46%; animation-delay: .15s; background: #22d3ee; }
.s-burst .confetti-dot.d3 { left: 44%; bottom: 26%; animation-delay: .25s; background: #e879f9; }

/* — drag:拖拽小球在两个槽位间巡游 — */
.s-drag { gap: 34px; grid-auto-flow: column; }
.s-drag .slot {
  width: 56px; height: 56px; border-radius: 14px;
  border: 1.5px dashed rgba(255,255,255,.25);
  background: rgba(255,255,255,.04);
  display: grid; place-items: center; font-size: 20px;
}
.s-drag .slot.drop { border-color: var(--ac); border-style: solid; box-shadow: 0 0 24px -4px var(--acA), inset 0 0 14px -6px var(--acA); }
.s-drag .orb {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff, var(--ac) 70%);
  box-shadow: 0 6px 18px -2px var(--acA), 0 0 12px var(--acA);
  animation: orbTravel 2.6s cubic-bezier(.45,0,.35,1) infinite;
}
.s-drag .orb::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid var(--acA); animation: targetPulse 2.6s infinite; }

/* — game:CSS 手绘游戏场景(山峦 / 日轮 / 浮云 / 角色) — */
.s-game .game-scene { position: absolute; inset: 0; overflow: hidden; }
.s-game .gs-sun {
  position: absolute; right: 18%; top: 16%; width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fff7d6, var(--ac) 72%);
  box-shadow: 0 0 36px 6px var(--acA);
  animation: floaty 5s ease-in-out infinite;
}
.s-game .gs-cloud {
  position: absolute; height: 10px; border-radius: 99px; background: rgba(255,255,255,.5);
  filter: blur(1px);
}
.s-game .gs-cloud::before { content: ""; position: absolute; left: 20%; top: -7px; width: 34%; height: 14px; border-radius: 99px; background: inherit; }
.s-game .gs-cloud.c1 { left: 8%; top: 28%; width: 64px; animation: cloudDrift 9s linear infinite; }
.s-game .gs-cloud.c2 { left: 30%; top: 44%; width: 44px; opacity: .6; animation: cloudDrift 13s linear infinite reverse; }
.s-game .gs-mount { position: absolute; bottom: 22%; border-radius: 50% 50% 0 0 / 92% 92% 0 0; }
.s-game .gs-mount.m1 { left: -6%;  width: 62%; height: 74px; background: linear-gradient(180deg, rgba(124,108,255,.55), rgba(20,22,44,.9)); }
.s-game .gs-mount.m2 { right: -8%; width: 52%; height: 96px; background: linear-gradient(180deg, rgba(34,211,238,.4), rgba(16,20,40,.9)); }
.s-game .gs-hill { position: absolute; left: -10%; right: -10%; bottom: -6%; height: 42%; border-radius: 50% 50% 0 0; background: linear-gradient(180deg, rgba(124,108,255,.32), rgba(10,12,24,.95)); }
.s-game .gs-hero {
  position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%);
  font-size: 26px; animation: heroRun 1s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.55));
}
@keyframes cloudDrift { 0% { transform: translateX(-16px); } 50% { transform: translateX(16px); } 100% { transform: translateX(-16px); } }
@keyframes heroRun     { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }

/* ------------------------------------------------------------
   扩展说明 / 页脚
   ------------------------------------------------------------ */
.how { max-width: 860px; margin: 60px auto 40px; padding: 0 28px 30px; text-align: center; }
.how h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: .01em; }
.how > p { margin-top: 14px; color: var(--text-2); font-size: 14.5px; line-height: 1.8; }
.how code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: #a5b4fc; background: rgba(124,108,255,.12); padding: 2px 7px; border-radius: 6px; }
.how pre {
  text-align: left; margin: 26px auto 0; padding: 24px 26px;
  border-radius: 16px; border: 1px solid var(--line);
  background: rgba(4, 5, 12, .7);
  overflow-x: auto;
  box-shadow: 0 20px 60px -30px rgba(0,0,0,.8);
}
.how pre code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.8px; line-height: 1.85; color: #c8caef; background: none; padding: 0; white-space: pre; }
.how-note { margin-top: 18px; font-size: 13px !important; color: var(--text-3) !important; }

.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: rgba(5,5,11,.6); backdrop-filter: blur(10px); }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 26px 28px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-3);
}
.footer code { font-family: ui-monospace, Menlo, monospace; color: var(--text-2); background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 5px; }
.footer-mail { font-size: 13px; color: var(--text-3); text-decoration: none; transition: .25s; }
.footer-mail:hover { color: #a5b4fc; }

/* ------------------------------------------------------------
   运行弹窗 · 手机壳
   ------------------------------------------------------------ */
.modal { position: fixed; inset: 0; z-index: 100; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 3, 8, .72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  animation: fadeIn .3s both;
}
.modal-shell {
  position: relative; height: 100%;
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 16px 10px;
  animation: modalIn .45s cubic-bezier(.22,1,.36,1) both;
}
.modal-head {
  width: min(560px, 94vw);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 12px 12px;
}
.m-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.m-title b { font-size: 17px; font-weight: 800; }
.m-en { font-family: var(--font-en); font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.m-cat { font-size: 11px; font-weight: 700; color: #c9bfff; background: rgba(124,108,255,.16); border: 1px solid rgba(124,108,255,.35); border-radius: 99px; padding: 3px 10px; }
.m-actions { display: flex; gap: 8px; }
.m-actions button, .m-actions a {
  position: relative;
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; text-decoration: none;
  font-size: 15px; color: var(--text-2); cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  transition: .2s;
}
.m-actions button:hover, .m-actions a:hover { color: #fff; background: rgba(255,255,255,.12); transform: translateY(-1px); }

/* 自定义 tooltip(替代原生 title) */
.m-actions button::after, .m-actions a::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 9px); left: 50%;
  transform: translateX(-50%) translateY(-4px) scale(.92);
  transform-origin: top center;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  font-family: var(--font); line-height: 1; white-space: nowrap;
  color: var(--text);
  background: rgba(18, 20, 38, .96);
  border: 1px solid rgba(139, 124, 255, .35);
  border-radius: 8px; padding: 6px 11px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .55), 0 0 14px rgba(139, 124, 255, .15);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s cubic-bezier(.22,1,.36,1);
  z-index: 6;
}
.m-actions button:hover::after, .m-actions a:hover::after {
  opacity: 1; transform: translateX(-50%) translateY(0) scale(1);
}
/* 最右侧按钮的气泡右对齐,避免溢出弹窗 */
#mClose::after { left: auto; right: 0; transform: translateY(-4px) scale(.92); }
#mClose:hover::after { transform: translateY(0) scale(1); }

.phone-box { position: relative; flex: none; }
.phone {
  position: absolute; top: 0; left: 0;
  width: 390px; height: 812px;
  transform-origin: top left;
  border-radius: 52px; padding: 11px;
  background: linear-gradient(160deg, #3a3d52, #14161f 30%, #0a0b12 70%, #2c2e3f);
  box-shadow:
    0 40px 120px -30px rgba(0,0,0,.9),
    0 0 0 1px rgba(255,255,255,.09),
    0 0 80px -30px rgba(124,108,255,.5),
    inset 0 1px 1px rgba(255,255,255,.18);
}
.phone .screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 42px; overflow: hidden; background: #000;
}
.phone iframe { width: 100%; height: 100%; border: none; background: #000; }
.notch {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 112px; height: 28px; border-radius: 99px;
  background: #050509; z-index: 5;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.home-bar {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 5px; border-radius: 99px;
  background: rgba(255,255,255,.32); z-index: 5; pointer-events: none;
}
.modal-caption {
  width: min(560px, 94vw); padding: 12px 6px 8px; text-align: center;
  font-size: 13px; line-height: 1.7; color: var(--text-3);
}

.server-hint {
  width: min(640px, 94vw); margin-bottom: 12px;
  font-size: 13px; line-height: 1.7; color: #fde68a; text-align: center;
  background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .3);
  border-radius: 12px; padding: 10px 16px;
}
.server-hint[hidden] { display: none; }
.server-hint code {
  font-family: ui-monospace, Menlo, monospace; font-size: 12px;
  color: #fcd34d; background: rgba(251,191,36,.12); padding: 2px 7px; border-radius: 6px;
}

/* 横屏壳:撑满宽或高,去刘海/Home 条,窄边框 */
.phone.landscape { border-radius: 26px; padding: 7px; }
.phone.landscape .screen { border-radius: 21px; }
.phone.landscape .notch, .phone.landscape .home-bar { display: none; }
.phone.landscape .screen { background: #000; }
.phone.landscape iframe { background: #000; }

/* ------------------------------------------------------------
   关键帧
   ------------------------------------------------------------ */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardIn   { from { opacity: 0; transform: translateY(30px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes modalIn  { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes shimmer  { to { background-position: 200% 0; } }

@keyframes targetPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@keyframes ripple      { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes fingerTap   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(14px); } }
@keyframes floaty      { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes typing      { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes march       { to { stroke-dashoffset: -22; } }
@keyframes chevBob     { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(9px); } }
@keyframes slideStrip  { 0%, 24% { transform: translateX(0); } 33%, 57% { transform: translateX(-33.33%); } 66%, 90% { transform: translateX(-66.66%); } 100% { transform: translateX(0); } }
@keyframes barFill     { 0% { width: 12%; } 30% { width: 45%; } 63% { width: 78%; } 96%, 100% { width: 100%; } }
@keyframes spin        { to { transform: rotate(360deg); } }
@keyframes starPop     { 0%, 100% { transform: scale(1) rotate(-4deg); } 50% { transform: scale(1.16) rotate(4deg); } }
@keyframes confArc     { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx, 20px), var(--dy, -44px)) scale(1) rotate(220deg); } }
@keyframes orbTravel   { 0% { transform: translate(-52px, -50%); } 12%, 38% { transform: translate(-52px, -50%) scale(1.06); } 50%, 62% { transform: translate(52px, -50%) scale(1.06); } 74%, 88% { transform: translate(52px, -50%); } 100% { transform: translate(-52px, -50%); } }

/* ------------------------------------------------------------
   响应式 & 可访问性
   ------------------------------------------------------------ */
/* 两级网格响应式:桌面 4 列紧凑 / 中屏 3 / 平板手机 2;featured 平板起单列 */
@media (max-width: 1200px) { .grid-compact { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) {
  .grid-compact { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .grid-featured { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero { padding: 28px 16px 20px; }
  .stats { gap: 20px; padding: 14px 22px; }
  .stat { min-width: 64px; }
  .filterbar { top: 0; padding-block: 10px; }
  .search { min-width: 100%; order: -1; }
  .grid { padding-inline: 18px; }
  .grid-compact { gap: 12px; }
  .card.sm .card-title-row h3 { font-size: 14px; }
  .card.sm .card-desc { font-size: 12px; }
  .card.sm .card-body { padding: 10px 12px 12px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .modal-caption { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
