/* ============================================================
   极光游戏库 · Aurora Game Hub
   设计语言：Aurora Gradient / Glassmorphism / Bento Grid
   ============================================================ */

/* ---------- 1. Design Tokens ---------- */
:root {
  --bg: #06070c;
  --bg-2: #0a0c15;
  --bg-3: #10131f;

  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);
  --surface-3: rgba(255, 255, 255, 0.11);

  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);

  --text: #eaeefb;
  --text-2: #a4aec4;
  --text-3: #6d7689;

  --brand: #7c5cff;
  --brand-2: #22d3ee;
  --brand-3: #ff4d8d;
  --brand-soft: rgba(124, 92, 255, 0.16);

  --ok: #34d399;
  --warn: #fbbf24;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.7);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 0 1px rgba(124, 92, 255, 0.35), 0 18px 50px -18px rgba(124, 92, 255, 0.55);

  --max: 1240px;
  --nav-h: 72px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-2: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f4f6fc;
  --bg-2: #ffffff;
  --bg-3: #eef1f9;

  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.9);
  --surface-3: rgba(15, 20, 40, 0.05);

  --line: rgba(15, 20, 40, 0.09);
  --line-2: rgba(15, 20, 40, 0.16);

  --text: #131829;
  --text-2: #4d566e;
  --text-3: #8189a0;

  --brand-soft: rgba(124, 92, 255, 0.12);

  --shadow-sm: 0 8px 24px -14px rgba(20, 25, 50, 0.28);
  --shadow: 0 26px 60px -28px rgba(20, 25, 50, 0.35);
  --shadow-glow: 0 0 0 1px rgba(124, 92, 255, 0.3), 0 18px 50px -20px rgba(124, 92, 255, 0.4);
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 15px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s var(--ease-2), color 0.4s var(--ease-2);
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; }
ul { list-style: none; }

::selection { background: var(--brand); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(140, 150, 180, 0.28);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(140, 150, 180, 0.5); background-clip: content-box; }

/* ---------- 3. Aurora background ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}

.aurora__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.46;
  will-change: transform;
}

.aurora__blob--1 {
  width: 640px; height: 640px;
  top: -220px; left: -120px;
  background: radial-gradient(circle at 30% 30%, #7c5cff, transparent 68%);
  animation: drift1 26s ease-in-out infinite;
}
.aurora__blob--2 {
  width: 560px; height: 560px;
  top: 8%; right: -160px;
  background: radial-gradient(circle at 60% 40%, #22d3ee, transparent 68%);
  animation: drift2 32s ease-in-out infinite;
}
.aurora__blob--3 {
  width: 520px; height: 520px;
  top: 72%; left: -12%;
  background: radial-gradient(circle at 50% 50%, #ff4d8d, transparent 70%);
  opacity: 0.26;
  animation: drift3 38s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(120px, 90px) scale(1.12); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(-140px, 130px) scale(0.92); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(90px, -110px) scale(1.15); }
}

[data-theme="light"] .aurora__blob { opacity: 0.4; filter: blur(110px); }

/* grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ---------- 4. Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding: 84px 0; position: relative; }
.section--tight { padding: 56px 0; }

/* 紧凑衔接：把相邻板块之间的留白从 84px 收窄到 32px，
   用于把「精选 → 教程/热榜 → 游戏库」三段拉到一起 */
.section--snug { padding-top: 32px; }
.section--snug-bottom { padding-bottom: 32px; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.section-title {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-sub {
  color: var(--text-2);
  font-size: 14.5px;
  margin-top: 10px;
  max-width: 56ch;
}

.grad-text {
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 48%, var(--brand-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 仅供搜索引擎与读屏软件识别，视觉上不可见 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease-2), border-color 0.25s var(--ease-2), opacity 0.2s;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(124, 92, 255, 0.85);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(124, 92, 255, 0.95); }

.btn--ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  backdrop-filter: blur(14px);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line-2); transform: translateY(-2px); }

.btn--bd {
  background: linear-gradient(100deg, #2b6ef6, #00a4ff);
  color: #fff;
  box-shadow: 0 12px 30px -14px rgba(0, 130, 255, 0.9);
}
.btn--bd:hover { transform: translateY(-2px); box-shadow: 0 18px 42px -14px rgba(0, 140, 255, 1); }

.btn--sm { padding: 8px 14px; font-size: 13px; }
.btn--block { width: 100%; }

.btn--icon { padding: 0; width: 40px; height: 40px; border-radius: 50%; }

/* ---------- 6. Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  transition: background 0.3s var(--ease-2), border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--line);
}
@supports not (background: color-mix(in srgb, red, blue)) {
  .nav.is-stuck { background: rgba(8, 10, 18, 0.88); }
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.nav__title {
  margin: 0 auto;
  text-align: center;
  font-size: 84px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #7c5cff, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav__hero {
  text-align: center;
  width: 100%;
}

.nav__subtitle {
  margin: 12px 0 0;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #7c5cff, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.logo__mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 19px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 26px -10px rgba(124, 92, 255, 0.9);
  animation: logoPulse 5s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 10px 26px -10px rgba(124, 92, 255, 0.9); }
  50% { box-shadow: 0 10px 34px -8px rgba(34, 211, 238, 0.95); }
}
.logo__txt small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-3);
  text-transform: uppercase;
  line-height: 1;
  margin-top: 3px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 14px;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--text); background: var(--surface); }

.nav__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  width: 220px;
  transition: width 0.3s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.nav-search:focus-within {
  width: 280px;
  border-color: var(--line-2);
  box-shadow: var(--shadow-glow);
}
.nav-search svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6; }
.nav-search input {
  border: none;
  background: none;
  outline: none;
  color: var(--text);
  width: 100%;
  font-size: 13.5px;
}
.nav-search input::placeholder { color: var(--text-3); }
.nav-search kbd {
  font-family: inherit;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  color: var(--text-3);
  flex-shrink: 0;
}

.nav__burger { display: none; }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  padding: 78px 0 92px;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 9px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 22px;
}
.hero__badge b {
  color: var(--text);
  font-weight: 600;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero__title {
  font-size: clamp(38px, 6vw, 70px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.hero__desc {
  font-size: 16px;
  color: var(--text-2);
  max-width: 50ch;
  margin-bottom: 30px;
}

.hero__search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(20px);
  max-width: 560px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s;
}
.hero__search:focus-within { box-shadow: var(--shadow-glow); }
.hero__search svg { width: 19px; height: 19px; opacity: 0.55; flex-shrink: 0; }
.hero__search input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  min-width: 0;
}
.hero__search input::placeholder { color: var(--text-3); }

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  align-items: center;
}
.hero__tags span { font-size: 12.5px; color: var(--text-3); }
.chip-mini {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text-2);
  transition: all 0.22s var(--ease-2);
}
.chip-mini:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-2px); }

.hero__stats {
  display: flex;
  gap: 36px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.stat__num {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(120deg, var(--text), var(--text-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* hero visual */
.hero__visual {
  position: relative;
  height: 460px;
  perspective: 1400px;
}

.float-card {
  position: absolute;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  will-change: transform;
}
.float-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  position: relative;
}
.float-card__title { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; color: #fff; }
.float-card__meta { font-size: 11.5px; color: rgba(255, 255, 255, 0.72); margin-top: 3px; }
.float-card__glyph {
  position: absolute;
  top: 12px; right: 14px;
  font-size: 34px;
  opacity: 0.95;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.fc-1 {
  width: 268px; height: 176px;
  top: 6%; left: 4%;
  transform: rotate(-7deg) translateZ(0);
  animation: float1 7s ease-in-out infinite;
  z-index: 3;
}
.fc-2 {
  width: 240px; height: 158px;
  top: 36%; right: 0;
  transform: rotate(6deg);
  animation: float2 8.5s ease-in-out infinite;
  z-index: 4;
}
.fc-3 {
  width: 220px; height: 144px;
  bottom: 2%; left: 16%;
  transform: rotate(-3deg);
  animation: float3 9.5s ease-in-out infinite;
  z-index: 2;
}
@keyframes float1 {
  0%, 100% { transform: rotate(-7deg) translateY(0); }
  50% { transform: rotate(-5deg) translateY(-16px); }
}
@keyframes float2 {
  0%, 100% { transform: rotate(6deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-22px); }
}
@keyframes float3 {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-5deg) translateY(-13px); }
}
.hero__visual:hover .float-card { box-shadow: var(--shadow-glow); }

/* ---------- 8. Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  padding: 16px 0;
  overflow: hidden;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  gap: 46px;
  width: max-content;
  animation: scrollX 34s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-2);
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee__item i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
@keyframes scrollX {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 9. Bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 178px;
  gap: 18px;
}

.bento__item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.45s var(--ease), border-color 0.3s, box-shadow 0.45s var(--ease);
}
.bento__item:hover {
  transform: translateY(-5px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}
.bento__item--hero { grid-column: span 2; grid-row: span 2; }

.bento__body {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}
.bento__item--hero .bento__body { padding: 28px; }

.bento__badge {
  position: absolute;
  top: 18px; left: 18px;
  z-index: 3;
  pointer-events: none;   /* 纯装饰，别挡住卡片链接覆盖层 */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(6, 7, 12, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.bento__glyph {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%) scale(1);
  font-size: 74px;
  z-index: 2;
  opacity: 0.92;
  transition: transform 0.5s var(--ease);
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.5));
}
.bento__item:hover .bento__glyph { transform: translateY(-50%) scale(1.12) rotate(-6deg); }
.bento__item--hero .bento__glyph { font-size: 128px; right: 26px; opacity: 0.95; }

.bento__title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}
.bento__item--hero .bento__title { font-size: 30px; }
.bento__tag {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 30ch;
}
.bento__item--hero .bento__tag { font-size: 14px; }
.bento__row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  flex-wrap: wrap;
}
.bento__row span {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 7, 12, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}
.bento__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(4, 5, 10, 0.05) 0%, rgba(4, 5, 10, 0.72) 62%, rgba(4, 5, 10, 0.92) 100%);
}
.bento__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 0.7s var(--ease);
}
.bento__item:hover .bento__art { transform: scale(1.07); }

/* 游戏库顶部热门搜索标签 */
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: -10px 0 20px;
}
.quick-tags > span { font-size: 12.5px; color: var(--text-3); }

/* ---------- 10. Filters ---------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.25s var(--ease-2);
  white-space: nowrap;
}
.pill:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-2px); }
.pill.is-active {
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 26px -12px rgba(124, 92, 255, 0.9);
}

.select-wrap { position: relative; }
.select-wrap svg {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  pointer-events: none;
  opacity: 0.6;
}
select {
  appearance: none;
  padding: 9px 34px 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  cursor: pointer;
  backdrop-filter: blur(14px);
}
select:focus { border-color: var(--line-2); }
select option { background: var(--bg-3); color: var(--text); }

/* ---------- 11. Game grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-7px);
  border-color: var(--line-2);
  box-shadow: var(--shadow);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%),
    rgba(124, 92, 255, 0.18), transparent 62%);
}
.card:hover::after { opacity: 1; }

.card__art {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.card__art-inner {
  position: absolute;
  inset: 0;
  transition: transform 0.7s var(--ease);
}
.card:hover .card__art-inner { transform: scale(1.09); }

/* 真实封面（data.js 的 cover 字段：从「游戏展示图片」自选的一张截图）。
   放在 art-inner 里面，跟着它一起缩放；铺满整格。
   底层渐变保留兜底 —— 图片加载失败时卡片仍是渐变底，不会露白。 */
.card__cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__glyph {
  position: relative;
  z-index: 2;
  font-size: 58px;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.5));
  transition: transform 0.55s var(--ease);
}
.card:hover .card__glyph { transform: scale(1.14) translateY(-4px) rotate(-5deg); }

.card__art-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 34%, rgba(5, 6, 12, 0.66) 100%);
}

.card__badges {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 3;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: calc(100% - 24px);   /* 收藏按钮去掉后不用再给它让位 */
  pointer-events: none;   /* 纯装饰，别挡住卡片链接覆盖层 */
}
.tag-badge {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(6, 7, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(8px);
}
.tag-badge--hot {
  background: linear-gradient(100deg, #ff4d8d, #ff8a3d);
  border-color: transparent;
}
.tag-badge--new {
  background: linear-gradient(100deg, #22d3ee, #34d399);
  border-color: transparent;
  color: #04202a;
}

.card__fav {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 4;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(6, 7, 12, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 15px;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.card__fav:hover { transform: scale(1.14); background: rgba(6, 7, 12, 0.75); }
.card__fav.is-on { color: #ff4d8d; }

/* ---------- 卡片整块可点：透明链接覆盖层 ----------
   用真实的 <a> 铺满卡片，好处是「中键 / Ctrl+点击 / 右键在新标签页打开」
   和浏览器的链接预览都能正常工作（纯 JS 跳转做不到这些）。
   z-index 3 低于收藏按钮的 4，所以点心形不会触发跳转。 */
.card__link,
.bento__link,
.rank__link {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  text-decoration: none;
  font-size: 0;
}
.card__link:focus-visible,
.bento__link:focus-visible,
.rank__link:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
}

.card__rating {
  position: absolute;
  bottom: 12px; right: 12px;
  z-index: 3;
  pointer-events: none;   /* 纯装饰，别挡住卡片链接覆盖层 */
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(6, 7, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 700;
  color: #ffd76e;
}

.card__body {
  padding: 16px 17px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  /* 2026-10-16：卡片只剩「游戏名 + 英文名」，整体居中 */
  text-align: center;
  justify-content: center;
}
.card__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.card__title-en {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: -5px;
}
.card__desc {
  font-size: 13px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}
.card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: auto;
  padding-top: 4px;
  flex-wrap: wrap;
}
.card__meta i {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}

/* ---------- 12. Rank list ---------- */
.rank {
  display: grid;
  gap: 10px;
}
.rank__row {
  position: relative;      /* 给链接覆盖层做定位参照 */
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.28s var(--ease-2);
  cursor: pointer;
}
.rank__row:hover {
  background: var(--surface-2);
  border-color: var(--line-2);
  transform: translateX(5px);
}
.rank__no {
  font-size: 17px;
  font-weight: 900;
  font-style: italic;
  width: 30px;
  text-align: center;
  color: var(--text-3);
  flex-shrink: 0;
}
.rank__row:nth-child(1) .rank__no { color: #ffd76e; }
.rank__row:nth-child(2) .rank__no { color: #cbd5e1; }
.rank__row:nth-child(3) .rank__no { color: #e2a06a; }
.rank__thumb {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
}
.rank__info { flex: 1; min-width: 0; }
.rank__name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank__sub { font-size: 11.5px; color: var(--text-3); }
.rank__val {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-2);
  flex-shrink: 0;
}

/* ---------- 13. Split section ---------- */
.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: stretch;   /* 两栏等高，底部严格对齐 */
}
.split > * {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* 两栏内容天然高度不同（左栏含步骤卡片，右栏含榜单）。
   让左栏的步骤卡片「纵向吃满」多余高度，右栏的榜单行均匀铺满，
   于是两栏底边始终对齐，且不会留出难看的空档。 */
.split .steps { flex: 1; margin-bottom: 20px; align-content: stretch; }
.split .rank { flex: 1; align-content: space-between; }

/* 步骤卡片被拉高后，把「标题 + 说明」整块沉到卡片底部，图标留在顶部，
   中间让出来的空间正好透出右上角的装饰数字（01 / 02 / 03） */
.split .step {
  display: flex;
  flex-direction: column;
}
.split .step__title { margin-top: auto; }

/* ---------- 13b. 页码分页 ---------- */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 38px;
}
.pager:empty { display: none; }

.page-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 13px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease-2),
    border-color 0.25s var(--ease-2), color 0.25s var(--ease-2), box-shadow 0.25s var(--ease);
}
.page-btn:hover:not(:disabled):not(.is-active) {
  color: var(--text);
  border-color: var(--line-2);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.page-btn.is-active {
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 28px -12px rgba(124, 92, 255, 0.95);
  cursor: default;
}
.page-btn:disabled { opacity: 0.32; cursor: not-allowed; }
.page-dots {
  color: var(--text-3);
  padding: 0 4px;
  font-weight: 700;
  user-select: none;
}
.page-info {
  margin-left: 10px;
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- 14. Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 26px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(14px);
  transition: transform 0.35s var(--ease), border-color 0.3s;
  overflow: hidden;
  text-align: center;          /* 卡片文字居中 */
}
.step:hover { transform: translateY(-5px); border-color: var(--line-2); }
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 12px; right: 18px;
  font-size: 52px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  opacity: 0.7;
}
.step__icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 21px;
  background: linear-gradient(135deg, var(--brand-soft), transparent);
  border: 1px solid var(--line-2);
  margin-bottom: 16px;
  margin-inline: auto;         /* 跟着文字一起居中 */
}
/* 三张卡片居中。
   这里刻意用 !important，同时在 index.html 的 .step 上再写一次行内 style，
   双保险 —— 行内样式跟着 HTML 走，就算 style.css 被浏览器缓存成旧版，
   文字也照样是居中的。（用户之前反复看到「没居中」，根因就是缓存。） */
.step { text-align: center !important; }
.step__title { font-size: 16px; font-weight: 700; margin-bottom: 7px; text-align: center !important; }
.step__desc { font-size: 13.5px; color: var(--text-2); text-align: center !important; }

/* ---------- 15. FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq__item {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s;
}
.faq__item[open] { border-color: var(--line-2); background: var(--surface-2); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: var(--text-3);
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a {
  padding: 0 20px 19px;
  font-size: 13.5px;
  color: var(--text-2);
}

/* ---------- 16. Notice ---------- */
.notice {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: linear-gradient(120deg, var(--brand-soft), transparent 70%);
  font-size: 13.5px;
  color: var(--text-2);
  align-items: flex-start;
}
.notice b { color: var(--text); }
.notice__icon { font-size: 20px; line-height: 1.2; flex-shrink: 0; }

/* ---------- 17. Empty state ---------- */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line-2);
  color: var(--text-2);
}
.empty__icon { font-size: 46px; margin-bottom: 14px; opacity: 0.7; }
.empty__title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }

/* ---------- 18. Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s var(--ease-2), visibility 0.32s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 10, 0.72);
  backdrop-filter: blur(12px);
}
.modal__panel {
  position: relative;
  width: min(940px, 100%);
  max-height: min(88vh, 900px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(26px) scale(0.97);
  transition: transform 0.42s var(--ease);
}
.modal.is-open .modal__panel { transform: translateY(0) scale(1); }

.modal__hero {
  position: relative;
  padding: 34px 34px 26px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex-shrink: 0;
}
.modal__hero-art { position: absolute; inset: 0; z-index: 0; }
.modal__hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(4, 5, 10, 0.28) 0%, rgba(6, 7, 12, 0.86) 78%, var(--bg-2) 100%);
}
.modal__hero-content { position: relative; z-index: 2; }
.modal__glyph {
  position: absolute;
  right: 34px; top: 52px;
  z-index: 2;
  font-size: 76px;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.55));
}

.modal__close {
  position: absolute;
  top: 18px; right: 18px;
  z-index: 5;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(6, 7, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 17px;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.modal__close:hover { transform: rotate(90deg) scale(1.08); background: rgba(6, 7, 12, 0.85); }

.modal__title {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1.15;
}
.modal__en {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 7px;
}
.modal__tagline {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 9px;
  max-width: 58ch;
}

.modal__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.modal__chips span {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 12px;
  color: #fff;
}

.modal__tabs {
  display: flex;
  gap: 4px;
  padding: 12px 30px 0;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  overflow-x: auto;
}
.tab {
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.22s, border-color 0.22s;
  white-space: nowrap;
}
.tab:hover { color: var(--text-2); }
.tab.is-active { color: var(--text); border-bottom-color: var(--brand); }

.modal__body {
  padding: 26px 30px 32px;
  overflow-y: auto;
  flex: 1;
}
.panel { display: none; animation: fadeUp 0.4s var(--ease) both; }
.panel.is-active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.prose p { font-size: 14.5px; color: var(--text-2); margin-bottom: 14px; }
.prose p:last-child { margin-bottom: 0; }   /* 末段不留尾巴，避免和下一个区块之间凭空多出 14px */
.prose strong { color: var(--text); font-weight: 600; }

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.feature-list li {
  display: flex;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--text-2);
  align-items: flex-start;
}
.feature-list li::before {
  content: "◆";
  color: var(--brand-2);
  font-size: 10px;
  line-height: 1.9;
  flex-shrink: 0;
}

.tag-cloud { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.tag-cloud span {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--line-2);
  font-size: 12.5px;
  color: var(--text-2);
}

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.shot {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 38px;
  transition: transform 0.35s var(--ease);
}
.shot:hover { transform: scale(1.03); }
/* 真实图片截图（screens 里放的是图片路径而不是 emoji 时）。
   图片铺满整格；左下角那枚「游戏画面 N」标签本来就有半透明底，压在照片上也读得清。 */
.shot--img { background: #0a0c14; }
.shot--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot--img::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 42%;
  background: linear-gradient(to top, rgba(4, 5, 10, 0.62), transparent);
  pointer-events: none;
}
.shot span {
  position: absolute;
  bottom: 8px; left: 10px;
  z-index: 1;                /* 压在 .shot--img::after 那层渐变遮罩之上 */
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(6, 7, 12, 0.5);
  padding: 3px 9px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.spec__col {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.spec__head {
  padding: 12px 17px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.spec__row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 17px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.spec__row:last-child { border-bottom: none; }
.spec__row dt { color: var(--text-3); flex-shrink: 0; }
.spec__row dd { color: var(--text-2); text-align: right; }

.dl-list { display: grid; gap: 12px; }
.dl {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.3s, background 0.3s;
  flex-wrap: wrap;
}
.dl:hover { border-color: var(--line-2); background: var(--surface-2); }
.dl__icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: linear-gradient(135deg, rgba(43, 110, 246, 0.25), rgba(0, 164, 255, 0.12));
  border: 1px solid var(--line-2);
  flex-shrink: 0;
}
.dl__info { flex: 1; min-width: 160px; }
.dl__name { font-size: 14px; font-weight: 600; }
.dl__meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.dl__code {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px 6px 13px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px dashed var(--line-2);
  font-size: 12.5px;
  color: var(--text-2);
  flex-shrink: 0;
}
.dl__code b {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.1em;
  color: var(--text);
  font-size: 13px;
}
.dl__code button {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 11px;
  transition: all 0.22s;
}
.dl__code button:hover { background: var(--brand); color: #fff; border-color: transparent; }

.modal__foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ---------- 19. Toast ---------- */
.toasts {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(12, 14, 22, 0.92);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(16px);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: toastIn 0.4s var(--ease) both;
}
.toast.is-out { animation: toastOut 0.35s var(--ease) forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(-10px) scale(0.96); }
}
[data-theme="light"] .toast { background: rgba(20, 24, 40, 0.94); }

/* ---------- 20. Footer ---------- */
.footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding: 54px 0 30px;
  background: var(--surface);
  backdrop-filter: blur(12px);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer__about { font-size: 13.5px; color: var(--text-2); margin-top: 14px; max-width: 34ch; }
.footer__title { font-size: 13px; font-weight: 700; margin-bottom: 14px; letter-spacing: 0.05em; }
.footer__list { display: grid; gap: 9px; }
.footer__list a { font-size: 13.5px; color: var(--text-2); transition: color 0.2s, transform 0.2s; display: inline-block; }
.footer__list a:hover { color: var(--text); transform: translateX(3px); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--text-3);
  flex-wrap: wrap;
}

/* ---------- 21. Back to top ---------- */
.totop {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 120;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(16px);
  color: var(--text);
  font-size: 17px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all 0.35s var(--ease);
}
.totop.is-on { opacity: 1; visibility: visible; transform: translateY(0); }
.totop:hover { background: linear-gradient(100deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }

/* ---------- 22. Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

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

/* ---------- 23. Responsive ---------- */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__visual { height: 380px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__item--hero { grid-column: span 2; grid-row: span 1; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav-search { width: 150px; }
  .nav-search:focus-within { width: 190px; }
  .nav-search kbd { display: none; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 62px 0; }
  /* 移动端同样保持紧凑衔接（需写在 .section 之后才能覆盖） */
  .section--snug { padding-top: 24px; }
  .section--snug-bottom { padding-bottom: 24px; }
  .hero { padding: 46px 0 66px; }
}

@media (max-width: 620px) {
  .wrap { padding-inline: 17px; }
  .grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: 158px; }
  .bento__item--hero { grid-column: span 1; }
  .bento__glyph { font-size: 56px; }
  .bento__item--hero .bento__glyph { font-size: 76px; }
  .hero__visual { height: 320px; }
  .fc-1 { width: 200px; height: 132px; left: 0; }
  .fc-2 { width: 186px; height: 124px; }
  .fc-3 { width: 168px; height: 112px; left: 10%; }
  .shots { grid-template-columns: 1fr; }
  .modal { padding: 0; }
  .modal__panel { max-height: 100vh; height: 100%; border-radius: 0; border: none; }
  .modal__hero { padding: 26px 20px 20px; }
  .modal__glyph { font-size: 54px; right: 18px; top: 18px; }
  .modal__tabs { padding: 8px 16px 0; }
  .modal__body { padding: 20px 18px 28px; }
  .hero__stats { gap: 24px; }
  .stat__num { font-size: 25px; }
  .nav-search { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .toasts { bottom: 16px; width: calc(100% - 32px); }
  .toast { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
  .hero__title { font-size: 34px; }
  .toolbar { gap: 10px; }
}
