/* AI Game — small floating toys, a thin connector, then a split process + card deck.
   Scoped to .game-page; no other page changes. */
.game-page {
  --game-blue: #376c9e;
  --game-ink: #2b465f;
  --game-heading: #24486d;
  --game-muted: #5c7489;
  --game-line: #dae5ef;
  --game-heading-font: Georgia, "Times New Roman", serif;
  min-height: 100svh;
  background: var(--paper);
  color: var(--game-ink);
  font: 14px/1.85 var(--font-body);
}
.game-page:lang(zh) {
  font-family: var(--font-body-zh);
  --game-heading-font: var(--font-heading-zh);
}
.game-page :where(h1, h2, h3, p, figure) { margin: 0; }
.game-page h1 { position: static; width: auto; }
.game-page button { font: inherit; color: inherit; }

.game-nav { position: relative; z-index: 3; background: var(--paper); }
.game-nav button { background: transparent; border: 0; }

.game-flow { position: relative; }
.game-flow__lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.game-line {
  fill: none;
  stroke: #a8bfd9;
  stroke-width: 1;
  stroke-linecap: round;
  opacity: .75;
}
.game-hero,
.game-shots { position: relative; z-index: 1; }

/* Hero */
.game-hero {
  max-width: 1120px;
  margin: auto;
  padding: 64px 32px 0;
  text-align: center;
}
.game-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 10.5px;
  letter-spacing: .22em;
  color: #71879d;
}
.game-kicker i { display: block; width: 28px; height: 1px; background: #a8bfd9; }
.game-hero h1 {
  margin-top: 16px;
  font: 400 clamp(38px, 5.6vw, 64px)/1.05 var(--game-heading-font);
  letter-spacing: -.02em;
  color: var(--game-heading);
  text-wrap: balance;
}
.game-title-zh {
  margin-top: 11px;
  font: 400 14px/1.6 var(--game-heading-font);
  letter-spacing: .3em;
  color: #5f7891;
}
.game-tagline {
  max-width: 34em;
  margin: 16px auto 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: #4c647b;
  text-align: center;
  text-wrap: balance;
}

.game-stage {
  position: relative;
  max-width: 980px;
  height: clamp(250px, 30vw, 330px);
  margin: 28px auto 0;
}
.game-toy {
  position: absolute;
  z-index: 1;
  margin: 0;
  transform-origin: 50% 70%;
}
.game-toy--green {
  left: 21%;
  top: 30px;
  width: min(20vw, 215px);
  --float-y: 10px;
  --float-r: .9deg;
  animation: gameFloatGreen 9.5s ease-in-out infinite;
}
.game-toy--handhelds {
  right: 21%;
  top: 0;
  width: min(24vw, 258px);
  --float-y: 9px;
  --float-r: .7deg;
  animation: gameFloatHands 12.5s ease-in-out infinite;
  animation-delay: -3.8s;
}
.game-toy img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 22px rgba(43, 70, 95, .13)) drop-shadow(0 4px 8px rgba(43, 70, 95, .06));
  transition: transform .45s cubic-bezier(.22, .61, .36, 1), filter .45s ease;
  transform-origin: 50% 75%;
}
@keyframes gameFloatGreen {
  0%, 100% { transform: translateY(0) rotate(calc(var(--float-r) * -1)); }
  50% { transform: translateY(calc(var(--float-y) * -1)) rotate(calc(var(--float-r) * .4)); }
}
@keyframes gameFloatHands {
  0%, 100% { transform: translateY(calc(var(--float-y) * .45)) rotate(var(--float-r)); }
  50% { transform: translateY(calc(var(--float-y) * -.75)) rotate(calc(var(--float-r) * -.5)); }
}
@media (hover: hover) and (pointer: fine) {
  .game-toy img:hover {
    transform: translateY(-8px) scale(1.03);
    filter: drop-shadow(0 22px 26px rgba(43, 70, 95, .16)) drop-shadow(0 6px 10px rgba(43, 70, 95, .08));
  }
}

/* Tiny water-toy decorations: inline SVG fish, CSS rings and bubbles. */
.game-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.game-deco > * {
  position: absolute;
  display: block;
  animation: gameDecoFloat var(--dur, 6s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.game-deco__fish {
  left: 12.5%;
  top: 46%;
  width: 40px;
  height: 30px;
  opacity: .9;
  transform: rotate(-2deg);
  --dy: 4px;
  --dur: 7s;
  --delay: -1s;
}
.game-deco__fish svg { display: block; width: 100%; height: auto; }
.game-deco__ring {
  border-radius: 50%;
  box-sizing: border-box;
}
.game-deco__ring--yellow {
  left: 13%;
  top: 10%;
  width: 26px;
  height: 20px;
  border: 3px solid rgba(232, 190, 91, .5);
  transform: rotate(-18deg);
  --dy: 3px;
  --dur: 8s;
  --delay: -2.5s;
}
.game-deco__ring--pink {
  right: 12%;
  top: 56%;
  width: 24px;
  height: 18px;
  border: 3px solid rgba(224, 135, 169, .45);
  transform: rotate(14deg);
  --dy: 4px;
  --dur: 6.5s;
  --delay: -4s;
}
.game-deco__bubble {
  border: 1px solid rgba(120, 170, 205, .55);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .92), rgba(190, 220, 238, .16) 60%, rgba(190, 220, 238, .03));
  opacity: .8;
}
.game-deco__bubble--a { left: 3%; top: 30%; width: 10px; height: 10px; --dy: 4px; --dur: 6s; --delay: -1.5s; }
.game-deco__bubble--b { left: 27%; top: 4%; width: 6px; height: 6px; --dy: 3px; --dur: 5s; --delay: -2s; }
.game-deco__bubble--c { right: 2%; top: 35%; width: 14px; height: 14px; --dy: 5px; --dur: 7s; --delay: -3.5s; }
.game-deco__bubble--d { right: 6%; top: 78%; width: 8px; height: 8px; --dy: 3px; --dur: 6.5s; --delay: -.8s; }
.game-deco__bubble--e { left: 11%; top: 80%; width: 16px; height: 16px; --dy: 4px; --dur: 7.5s; --delay: -5s; }

@keyframes gameDecoFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 calc(var(--dy, 4px) * -1); }
}

/* Section heading: the connector ends on its top edge. */
.game-shots {
  max-width: 1120px;
  margin: 54px auto 0;
  padding: 0 32px 100px;
}
.game-section-head {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto 52px;
  padding: 2px 0;
  background: var(--paper);
  text-align: center;
}
.game-section-head h2 {
  font: 400 clamp(28px, 3.2vw, 40px)/1.15 var(--game-heading-font);
  color: var(--game-heading);
  text-wrap: balance;
}
.game-section-sub {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--game-muted);
  text-align: center;
}

/* Split layout */
.game-split {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  max-width: 1056px;
  margin: 0 auto;
}

/* Left: vertical process */
.game-process { max-width: 400px; min-width: 0; }
.game-process__label {
  margin: 0 0 24px 30px;
  font-size: 10.5px;
  letter-spacing: .2em;
  color: #7d91a6;
}
.game-process__steps {
  position: relative;
  margin: 0;
  padding: 0 0 0 30px;
  border-left: 1px solid #d6e3ee;
  list-style: none;
}
.game-process__steps li {
  position: relative;
  padding-bottom: 26px;
}
.game-process__steps li:last-child { padding-bottom: 0; }
.game-process__steps li::before {
  content: "";
  position: absolute;
  top: 5px;
  left: -33px;
  width: 5px;
  height: 5px;
  border: 1px solid #a8bfd9;
  border-radius: 50%;
  background: var(--paper);
}
.game-step__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.game-step__num {
  flex: 0 0 auto;
  font: italic 11px/1.4 Georgia, serif;
  color: #7d91a6;
}
.game-step__head h3 {
  font: 500 17px/1.45 var(--game-heading-font);
  color: #294d75;
}
.game-process__steps small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .06em;
  color: #7d91a6;
}
.game-process__steps p {
  max-width: 330px;
  margin-top: 9px;
  font-size: 13.5px;
  line-height: 1.85;
  color: #4c647b;
}

/* Right: three switchable cards */
.game-deck {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 520px;
  margin: 0 auto;
  isolation: isolate;
}
.game-card {
  --x: 0px;
  --y: 0px;
  --r: 0deg;
  --s: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 0;
  border: 1px solid #d9e4ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 34px -28px rgba(43, 70, 95, .4), 0 2px 4px rgba(43, 70, 95, .04);
  cursor: pointer;
  transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--s));
  transition: transform .55s cubic-bezier(.22, .61, .36, 1), box-shadow .35s ease;
  text-align: left;
  z-index: 1;
}
.game-card--play { width: 210px; }
.game-card--dev { width: 310px; }
.game-card--icon { width: 200px; }
.game-card__media {
  display: block;
  overflow: hidden;
  border-radius: 9px;
  background: #f7fafd;
}
.game-card__media img { display: block; width: 100%; height: auto; }
.game-card__caption {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 4px 12px;
}
.game-card__caption strong { font: 500 12.5px/1.45 var(--game-heading-font); color: #294d75; }
.game-card__caption small { font-size: 10px; line-height: 1.5; letter-spacing: .03em; color: #7d91a6; }

.game-card[aria-pressed="true"] {
  z-index: 3;
  box-shadow: 0 26px 46px -30px rgba(43, 70, 95, .48), 0 3px 7px rgba(43, 70, 95, .05);
}
.game-deck[data-active="play"] .game-card--dev { --x: -175px; --y: 24px; --r: -3.5deg; --s: .9; z-index: 2; }
.game-deck[data-active="play"] .game-card--icon { --x: 190px; --y: 30px; --r: 3.5deg; --s: .88; z-index: 1; }
.game-deck[data-active="dev"] .game-card--play { --x: -160px; --y: 8px; --r: -3deg; --s: .9; z-index: 2; }
.game-deck[data-active="dev"] .game-card--icon { --x: 170px; --y: 16px; --r: 3deg; --s: .88; z-index: 1; }
.game-deck[data-active="icon"] .game-card--play { --x: -160px; --y: 6px; --r: -3deg; --s: .9; z-index: 2; }
.game-deck[data-active="icon"] .game-card--dev { --x: 160px; --y: 14px; --r: 3deg; --s: .86; z-index: 1; }

@media (hover: hover) and (pointer: fine) {
  .game-card:hover {
    box-shadow: 0 24px 42px -28px rgba(43, 70, 95, .48), 0 3px 7px rgba(43, 70, 95, .05);
  }
}
.game-page a:focus-visible,
.game-page button:focus-visible {
  outline: 1px solid #6689b0;
  outline-offset: 5px;
}

/* Buttons */
.game-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 54px;
}
.game-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid #c9dcec;
  border-radius: 999px;
  background: #fff;
  color: #2c5578;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 22px -16px rgba(43, 70, 95, .35);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.game-action--primary {
  border-color: var(--game-blue);
  background: var(--game-blue);
  color: #fff;
  box-shadow: 0 14px 26px -16px rgba(55, 108, 158, .75);
}
.game-action:hover { transform: translateY(-2px); }

@media (max-width: 1100px) {
  .game-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    max-width: 720px;
  }
  .game-process { width: 100%; max-width: 520px; margin: 0 auto; }
  .game-deck { margin: 0 auto; }
}

@media (max-width: 700px) {
  .game-hero { padding: 40px 24px 0; }
  .game-hero h1 { font-size: 38px; }
  .game-tagline { font-size: 14px; }
  .game-stage { height: clamp(220px, 56vw, 380px); margin-top: 18px; }
  .game-toy--green {
    left: 2%;
    top: 20px;
    width: min(38vw, 270px);
    --float-y: 6px;
    --float-r: .6deg;
    animation-duration: 13s;
  }
  .game-toy--handhelds {
    right: 1%;
    top: 0;
    width: min(46vw, 320px);
    --float-y: 5px;
    --float-r: .5deg;
    animation-duration: 16s;
  }
  .game-deco__fish,
  .game-deco__ring,
  .game-deco__bubble--a,
  .game-deco__bubble--c,
  .game-deco__bubble--d,
  .game-deco__bubble--e { display: none; }
  .game-deco__bubble--b { left: 27%; top: 3%; width: 7px; height: 7px; }
  .game-shots { margin-top: 42px; padding: 0 24px 80px; }
  .game-section-head { margin-bottom: 38px; }
  .game-split { gap: 36px; }
  .game-process { max-width: 460px; }
  .game-deck { max-width: 440px; height: 400px; }
  .game-card { padding: 8px 8px 0; border-radius: 12px; }
  .game-card--play { width: 150px; }
  .game-card--dev { width: 210px; }
  .game-card--icon { width: 150px; }
  .game-card__caption { padding: 8px 3px 9px; }
  .game-card__caption strong { font-size: 11px; }
  .game-card__caption small { font-size: 9.5px; }
  .game-deck[data-active="play"] .game-card--dev { --x: -86px; --y: 12px; }
  .game-deck[data-active="play"] .game-card--icon { --x: 86px; --y: 16px; }
  .game-deck[data-active="dev"] .game-card--play { --x: -88px; --y: 4px; }
  .game-deck[data-active="dev"] .game-card--icon { --x: 90px; --y: 10px; }
  .game-deck[data-active="icon"] .game-card--play { --x: -88px; --y: 0; }
  .game-deck[data-active="icon"] .game-card--dev { --x: 86px; --y: 8px; }
  .game-deck[data-active="play"] .game-card--icon .game-card__caption,
  .game-deck[data-active="dev"] .game-card--icon .game-card__caption,
  .game-deck[data-active="icon"] .game-card--dev .game-card__caption {
    align-items: flex-end;
    text-align: right;
  }
  .game-actions { margin-top: 42px; }
}

@media (max-width: 380px) {
  .game-deck { max-width: 340px; height: 370px; }
  .game-card--play { width: 140px; }
  .game-card--dev { width: 190px; }
  .game-card--icon { width: 130px; }
  .game-deck[data-active="play"] .game-card--dev { --x: -70px; --y: 10px; }
  .game-deck[data-active="play"] .game-card--icon { --x: 70px; --y: 14px; }
  .game-deck[data-active="dev"] .game-card--play { --x: -70px; --y: 4px; }
  .game-deck[data-active="dev"] .game-card--icon { --x: 72px; --y: 8px; }
  .game-deck[data-active="icon"] .game-card--play { --x: -70px; --y: 0; }
  .game-deck[data-active="icon"] .game-card--dev { --x: 70px; --y: 6px; }
}

@media (max-width: 520px) {
  .game-actions { flex-direction: column; align-items: stretch; }
  .game-action { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .game-toy { animation: none; }
  .game-deco > * { animation: none; }
  .game-toy img,
  .game-card,
  .game-action { transition: none; }
  .game-toy img:hover,
  .game-action:hover { transform: none; }
}
