/* 锈了儿门户 / 游戏馆 — 对齐现站暗色青绿，布局参考豆包稿 */

.home-page {
  --home-accent: var(--accent, #3fd0c8);
  --home-text: var(--text, #e6f0ee);
  --home-muted: var(--muted, #8b9e9a);
  --home-panel: rgba(20, 28, 27, 0.78);
  --home-border: var(--border, #243836);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background-color: #070b0a;
  color: var(--home-text);
}

/* 氛围层：渐变光斑 + 细网格 + 底纹，避免大片纯黑空 */
.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(980px 560px at 82% 12%, rgba(63, 208, 200, 0.28), transparent 58%),
    radial-gradient(720px 520px at 6% 8%, rgba(63, 208, 200, 0.16), transparent 55%),
    radial-gradient(640px 420px at 50% 100%, rgba(36, 90, 86, 0.35), transparent 60%),
    linear-gradient(165deg, #121c1b 0%, #0c1413 38%, #080e0d 72%, #060908 100%);
}

.home-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(63, 208, 200, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 208, 200, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 1px 1px, rgba(200, 240, 235, 0.08) 1px, transparent 0);
  background-size: 48px 48px, 48px 48px, 16px 16px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 85%);
}

.home-page .toolbar {
  flex-shrink: 0;
  position: relative;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: rgba(10, 15, 14, 0.82);
  border-bottom: 1px solid rgba(36, 56, 54, 0.8);
}

.home-page .toolbar a.btn,
.home-page .toolbar-brand-link,
.home-nav-link {
  text-decoration: none;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 6px 14px;
  margin-left: 8px;
}

.home-nav-link {
  color: var(--home-muted);
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.home-nav-link:hover,
.home-nav-link.is-active {
  color: #e8f7f5;
  background: rgba(63, 208, 200, 0.12);
}

.home-shell {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px 24px 24px;
  box-sizing: border-box;
  min-height: 0;
  overflow-y: auto;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 28px 36px;
  align-items: start;
}

.home-hero {
  position: relative;
  padding: 36px 16px 20px;
  min-height: 320px;
  border-radius: 20px;
  overflow: hidden;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  background:
    linear-gradient(105deg, rgba(8, 14, 13, 0.55) 0%, rgba(8, 14, 13, 0.72) 42%, rgba(8, 14, 13, 0.92) 100%),
    url("/static/demo/showcase/01-workflow.jpg") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(63, 208, 200, 0.12);
}

.home-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(500px 280px at 70% 40%, rgba(63, 208, 200, 0.18), transparent 70%);
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.home-brand {
  margin: 0 0 12px;
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: #f2fffd;
  text-shadow: 0 0 40px rgba(63, 208, 200, 0.25);
}

.home-tagline {
  margin: 0 0 10px;
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 550;
  color: #c8ebe7;
}

.home-lead {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--home-muted);
  max-width: 34em;
}

.home-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.home-cta:hover {
  transform: translateY(-1px);
}

.home-cta-primary {
  background: linear-gradient(145deg, #3fd0c8, #2a9a94);
  color: #06201e;
  box-shadow: 0 8px 24px rgba(63, 208, 200, 0.22);
}

.home-cta-ghost {
  background: transparent;
  color: #d7f5f1;
  border-color: rgba(63, 208, 200, 0.45);
}

.home-cta-ghost:hover {
  border-color: #7de0d6;
  background: rgba(63, 208, 200, 0.1);
}

.home-section-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: #d5ebe7;
}

.home-preview3d {
  margin-top: 24px;
  padding: 0 4px;
}

.home-preview3d-promo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  gap: 18px 22px;
  align-items: center;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(63, 208, 200, 0.28);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  background:
    radial-gradient(420px 180px at 12% 50%, rgba(63, 208, 200, 0.16), transparent 70%),
    linear-gradient(145deg, rgba(26, 44, 42, 0.95), rgba(12, 20, 19, 0.9));
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(63, 208, 200, 0.1);
  transition: border-color 0.15s ease, transform 0.12s ease, background 0.15s ease;
}

.home-preview3d-promo:hover {
  border-color: rgba(63, 208, 200, 0.55);
  transform: translateY(-1px);
  background:
    radial-gradient(420px 180px at 12% 50%, rgba(63, 208, 200, 0.22), transparent 70%),
    linear-gradient(145deg, rgba(30, 52, 50, 0.98), rgba(14, 24, 23, 0.92));
}

.home-preview3d-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  perspective: 420px;
}

.home-preview3d-orbit {
  position: relative;
  width: 88px;
  height: 88px;
  transform-style: preserve-3d;
  animation: home-preview3d-spin 12s linear infinite;
}

.home-preview3d-cube {
  position: absolute;
  inset: 22px;
  border: 1.5px solid rgba(125, 232, 224, 0.85);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(63, 208, 200, 0.28), rgba(20, 40, 38, 0.35));
  box-shadow:
    0 0 24px rgba(63, 208, 200, 0.25),
    inset 0 0 18px rgba(63, 208, 200, 0.12);
  transform: rotateX(28deg) rotateY(-32deg);
  animation: home-preview3d-pulse 2.8s ease-in-out infinite;
}

.home-preview3d-ring {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(63, 208, 200, 0.35);
  border-radius: 50%;
  border-top-color: transparent;
  border-left-color: rgba(125, 232, 224, 0.7);
  transform: rotateX(68deg);
}

.home-preview3d-dot {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: #7de8e0;
  box-shadow: 0 0 12px rgba(125, 232, 224, 0.8);
  animation: home-preview3d-orbit-dot 3.6s linear infinite;
}

@keyframes home-preview3d-spin {
  to {
    transform: rotateY(360deg);
  }
}

@keyframes home-preview3d-pulse {
  0%,
  100% {
    box-shadow:
      0 0 18px rgba(63, 208, 200, 0.2),
      inset 0 0 14px rgba(63, 208, 200, 0.1);
  }
  50% {
    box-shadow:
      0 0 32px rgba(63, 208, 200, 0.4),
      inset 0 0 22px rgba(63, 208, 200, 0.18);
  }
}

@keyframes home-preview3d-orbit-dot {
  from {
    transform: rotate(0deg) translateY(38px) rotate(0deg);
  }
  to {
    transform: rotate(360deg) translateY(38px) rotate(-360deg);
  }
}

.home-preview3d-copy {
  min-width: 0;
}

.home-preview3d-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-accent);
}

.home-preview3d-title {
  margin: 0 0 8px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f0fffc;
}

.home-preview3d-desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--home-muted);
  max-width: 38em;
}

.home-preview3d-cta {
  pointer-events: none;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

@media (max-width: 560px) {
  .home-preview3d-promo {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 20px 16px;
  }

  .home-preview3d-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .home-preview3d-cta {
    margin: 0 auto;
  }
}

.home-tools {
  margin-top: 28px;
  padding: 4px 4px 0;
}

.home-tool-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-tool-card {
  display: block;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(63, 208, 200, 0.16);
  background: linear-gradient(160deg, rgba(28, 44, 42, 0.9), rgba(16, 24, 23, 0.85));
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.home-tool-card:hover {
  border-color: rgba(63, 208, 200, 0.45);
  background: rgba(63, 208, 200, 0.08);
  transform: translateY(-1px);
}

.home-tool-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 650;
  color: #eaf8f6;
}

.home-tool-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--home-muted);
}

.home-games {
  position: relative;
  padding: 18px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(63, 208, 200, 0.22);
  background:
    linear-gradient(165deg, rgba(24, 42, 40, 0.92), rgba(12, 20, 19, 0.88));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(63, 208, 200, 0.08);
  overflow: hidden;
}

.home-games::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -100px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 208, 200, 0.32), rgba(63, 208, 200, 0.06) 55%, transparent 70%);
  pointer-events: none;
}

.home-games::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  left: -80px;
  bottom: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 120, 112, 0.22), transparent 70%);
  pointer-events: none;
}

.home-games-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.home-games-head a {
  font-size: 12px;
  color: #7de0d6;
  text-decoration: none;
}

.home-games-head a:hover {
  text-decoration: underline;
}

.home-game-featured {
  position: relative;
  z-index: 1;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(63, 208, 200, 0.2);
  text-decoration: none;
  color: inherit;
  margin-bottom: 12px;
}

.home-game-featured-mount {
  position: relative;
  z-index: 1;
  margin-bottom: 12px;
}

/* —— 轮播 —— */
.game-carousel {
  position: relative;
  user-select: none;
}

.game-carousel-hit {
  display: block;
  text-decoration: none;
  color: inherit;
}

.game-carousel-frame {
  position: relative;
  overflow: hidden;
}

.game-carousel-track {
  position: absolute;
  inset: 0;
}

.game-carousel.is-card .game-carousel-frame {
  aspect-ratio: 4 / 3;
  width: 100%;
}

.game-carousel.is-card .game-carousel-track {
  position: absolute;
  inset: 0;
}

.game-carousel.is-phone {
  width: min(340px, 100%);
  margin: 0 auto;
}

.game-carousel.is-phone .game-carousel-frame {
  width: 100%;
  margin: 0;
  aspect-ratio: 9 / 19.5;
  min-height: 520px;
}

.game-carousel.is-phone .game-carousel-btn.prev {
  left: 8px;
}

.game-carousel.is-phone .game-carousel-btn.next {
  right: 8px;
}

.home-game-featured-mount .game-carousel.is-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(63, 208, 200, 0.2);
}

.game-carousel.is-phone .game-carousel-track {
  position: absolute;
  inset: 0;
}

.game-carousel.is-phone .game-phone-frame {
  display: block;
  position: relative;
}

/* 文档流撑开高度；真正展示用绝对定位幻灯片 */
.game-carousel-sizer {
  display: block;
  width: 100%;
  height: auto;
  visibility: hidden;
  pointer-events: none;
}

.game-carousel.is-card .game-carousel-sizer {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.game-carousel.is-phone .game-carousel-sizer {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.game-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.game-carousel.is-phone .game-carousel-slide {
  object-fit: contain;
  object-position: center center;
  background: #0a100f;
}

.game-carousel.is-card .game-carousel-slide {
  object-fit: cover;
  object-position: center center;
}

.game-carousel-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.game-carousel.is-card .game-carousel-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 14px;
  background: linear-gradient(180deg, transparent, rgba(6, 12, 11, 0.82));
  pointer-events: none;
}

.game-carousel.is-card .game-carousel-caption h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: #f0fffc;
}

.game-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(63, 208, 200, 0.35);
  background: rgba(8, 14, 13, 0.65);
  color: #e8f7f5;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.game-carousel:hover .game-carousel-btn,
.game-carousel:focus-within .game-carousel-btn {
  opacity: 1;
}

.game-carousel-btn:hover {
  background: rgba(63, 208, 200, 0.28);
}

.game-carousel-btn.prev {
  left: 8px;
}

.game-carousel-btn.next {
  right: 8px;
}

.game-carousel.is-phone .game-carousel-btn.prev {
  left: calc(50% - min(140px, 50%) + 6px);
}

.game-carousel.is-phone .game-carousel-btn.next {
  right: calc(50% - min(140px, 50%) + 6px);
}

.game-carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.game-carousel.is-card .game-carousel-dots {
  bottom: 52px;
}

.game-carousel-dot {
  pointer-events: auto;
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.game-carousel-dot.is-active {
  background: #3fd0c8;
  box-shadow: 0 0 0 2px rgba(63, 208, 200, 0.25);
}

.game-carousel.is-phone .home-game-tag {
  z-index: 2;
}

@media (max-width: 720px) {
  .game-carousel-btn {
    opacity: 0.85;
  }
}

.home-game-cover {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(160deg, rgba(20, 48, 46, 0.35), rgba(8, 14, 13, 0.85)),
    radial-gradient(circle at 30% 30%, #3fd0c8 0%, transparent 45%),
    linear-gradient(135deg, #1a3a38, #0e1c1b 60%, #152828);
  background-size: cover;
  background-position: center center;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  box-sizing: border-box;
  position: relative;
}

.home-game-cover.has-photo {
  background-color: #0e1c1b;
}

.home-game-cover.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(6, 12, 11, 0.82));
  pointer-events: none;
}

.home-game-cover.has-photo > * {
  position: relative;
  z-index: 1;
}

.home-game-cover.is-voxel {
  background:
    linear-gradient(180deg, transparent 40%, rgba(6, 12, 11, 0.78)),
    repeating-linear-gradient(
      45deg,
      #245a56 0 10px,
      #1d4a47 10px 20px
    );
}

.home-game-cover.is-pixel {
  background:
    linear-gradient(180deg, transparent 45%, rgba(6, 12, 11, 0.8)),
    linear-gradient(135deg, #2a4050, #152028 55%, #1e3340);
}

.home-game-cover.is-tower {
  background:
    linear-gradient(180deg, transparent 40%, rgba(6, 12, 11, 0.82)),
    radial-gradient(circle at 70% 20%, rgba(255, 180, 90, 0.35), transparent 40%),
    linear-gradient(160deg, #2b3a2e, #121a16);
}

.home-game-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(6, 20, 18, 0.72);
  border: 1px solid rgba(63, 208, 200, 0.35);
  color: #c8f2ee;
}

.home-game-featured h3,
.home-game-mini h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: #f0fffc;
}

.home-game-featured .home-game-meta,
.home-game-mini .home-game-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: #a9c7c2;
}

.home-game-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.home-game-mini {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--home-border);
  text-decoration: none;
  color: inherit;
  background: rgba(10, 15, 14, 0.5);
}

.home-game-mini .home-game-cover {
  aspect-ratio: 1;
  padding: 10px;
}

.home-game-mini h3 {
  font-size: 13px;
}

.home-footer {
  margin-top: auto;
  flex-shrink: 0;
  padding: 18px 0 8px;
  border-top: 1px solid var(--home-border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: var(--home-muted);
}

.home-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  align-items: center;
}

.home-footer-legal {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 8px;
  color: var(--home-muted);
  line-height: 1.45;
  white-space: nowrap;
}

.home-footer-sep {
  opacity: 0.7;
  user-select: none;
}

.home-footer a {
  color: var(--home-muted);
  text-decoration: none;
}

.home-footer a:hover {
  color: #c8f2ee;
}

/* 游戏馆列表 */
.games-page .home-shell {
  max-width: 1080px;
}

.games-hero {
  margin-bottom: 22px;
}

.games-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
}

.games-hero p {
  margin: 0;
  color: var(--home-muted);
  font-size: 14px;
}

.games-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.games-filter {
  appearance: none;
  border: 1px solid var(--home-border);
  background: transparent;
  color: var(--home-muted);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.games-filter.is-active,
.games-filter:hover {
  color: #e8f7f5;
  border-color: rgba(63, 208, 200, 0.45);
  background: rgba(63, 208, 200, 0.1);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.games-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--home-border);
  background: rgba(20, 28, 27, 0.7);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.games-card:hover {
  border-color: rgba(63, 208, 200, 0.4);
  transform: translateY(-2px);
}

.games-card .home-game-cover {
  aspect-ratio: 16 / 10;
  border-radius: 0;
  background-position: center center;
  background-size: cover;
}

.games-card .home-game-cover.has-photo {
  background-position: center center;
}

.games-card-body {
  padding: 12px 14px 14px;
}

.games-card-body h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 650;
}

.games-card-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--home-muted);
}

/* 详情页 */
.game-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
  gap: 24px;
  align-items: start;
}

.game-detail-layout.is-phone {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 28px 32px;
  align-items: start;
}

.game-phone-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 8px 4px 4px;
  min-height: 540px;
}

.game-detail-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--home-border);
  min-height: 320px;
}

.game-detail-hero .home-game-cover {
  min-height: 320px;
  aspect-ratio: auto;
  align-items: flex-end;
}

/* 手机小游戏：竖屏完整展示，避免横裁切 */
.game-phone-frame {
  position: relative;
  width: min(340px, 100%);
  margin: 0;
  border-radius: 28px;
  overflow: hidden;
  border: 2px solid rgba(63, 208, 200, 0.35);
  background: #0a100f;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.45),
    0 0 0 6px rgba(20, 32, 30, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.game-phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.game-carousel .game-phone-frame .game-carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.game-carousel .game-phone-frame .game-carousel-sizer {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.game-phone-frame .home-game-tag {
  bottom: 12px;
  top: auto;
  left: 50%;
  transform: translateX(-50%);
}

.game-detail-main {
  min-width: 0;
}

.game-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.game-shots.is-phone {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.game-shots.is-phone figure {
  flex: 0 0 auto;
  width: min(160px, 42vw);
  scroll-snap-align: start;
  border-radius: 16px;
}

.game-shots.is-phone img {
  width: 100%;
  height: auto;
  display: block;
}

.game-shots figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--home-border);
  background: #0e1c1b;
}

.game-shots img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

@media (max-width: 960px) {
  .game-detail-layout.is-phone {
    grid-template-columns: 1fr;
  }

  .game-phone-stage {
    justify-content: center;
  }

  .game-phone-frame {
    width: min(300px, 78vw);
  }
}

@media (max-width: 560px) {
  .game-shots:not(.is-phone) {
    grid-template-columns: 1fr;
  }
}

.game-detail-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 34px);
}

.game-detail-copy .home-tagline {
  margin-bottom: 14px;
}

.game-detail-copy p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #c5d8d4;
}

.game-detail-side {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(63, 208, 200, 0.2);
  background: rgba(14, 22, 21, 0.8);
}

.game-detail-side h2 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 650;
}

.game-qr-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.game-qr-slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed rgba(63, 208, 200, 0.3);
  background: rgba(0, 0, 0, 0.2);
}

.game-qr-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 10px;
  background:
    repeating-conic-gradient(#1a2e2c 0% 25%, #0f1a19 0% 50%) 50% / 12px 12px;
  flex-shrink: 0;
}

.game-qr-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  flex-shrink: 0;
  display: block;
}

.game-qr-img.game-qr-cover {
  object-fit: cover;
  object-position: top center;
  background: #0a1211;
}

.game-qr-zoom {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: zoom-in;
  flex-shrink: 0;
  border-radius: 10px;
  line-height: 0;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.game-qr-zoom:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 2px rgba(63, 208, 200, 0.45);
}

.game-qr-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.game-qr-lightbox[hidden] {
  display: none !important;
}

body.game-qr-lightbox-open {
  overflow: hidden;
}

.game-qr-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: pointer;
}

.game-qr-lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(420px, 92vw);
  padding: 20px 20px 16px;
  border-radius: 16px;
  background: #121a19;
  border: 1px solid rgba(63, 208, 200, 0.28);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.game-qr-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  appearance: none;
  border: 1px solid rgba(63, 208, 200, 0.3);
  background: rgba(0, 0, 0, 0.35);
  color: #d7f5f1;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.game-qr-lightbox-img {
  display: block;
  width: min(320px, 78vw);
  height: auto;
  margin: 8px auto 0;
  border-radius: 12px;
  background: #fff;
}

.game-qr-lightbox-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--home-muted, #8b9e9a);
}

.game-qr-slot strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.game-qr-slot span {
  font-size: 12px;
  color: var(--home-muted);
}

.game-download-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.game-download-btn {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.game-detail-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--home-muted);
  line-height: 1.55;
}

.game-demo-wrap {
  margin-top: 18px;
}

.game-demo-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 650;
  color: #d5ebe7;
  letter-spacing: 0.04em;
}

.game-demo-video {
  display: block;
  width: 100%;
  max-height: min(480px, 56vh);
  border-radius: 14px;
  border: 1px solid rgba(63, 208, 200, 0.22);
  background: #0a100f;
  object-fit: contain;
}

.game-missing {
  padding: 48px 16px;
  text-align: center;
  color: var(--home-muted);
}

@media (max-width: 960px) {
  .home-grid,
  .game-detail-layout {
    grid-template-columns: 1fr;
  }

  .home-tool-list {
    grid-template-columns: 1fr 1fr;
  }

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

  .home-nav {
    display: none;
  }
}

@media (max-width: 560px) {
  .home-tool-list,
  .games-grid,
  .home-game-grid {
    grid-template-columns: 1fr;
  }

  .home-shell {
    padding: 20px 16px 32px;
  }
}
