/* ================= 基础 ================= */
:root {
  --night-1: #0b1026;
  --night-2: #1b2347;
  --night-3: #2c3a6b;
  --neon-pink: #ff5d8f;
  --neon-yellow: #ffd166;
  --neon-green: #7ef29d;
  --paper: #fff7e6;
  --ink: #2b2118;
  --money: #ffd166;
  --duck-skin: #e8b87f;
  --goose-fake: #b8d96a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans SC', sans-serif;
  background: #05070f;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  color: var(--paper);
  overflow: hidden;
}

#game {
  position: relative;
  width: min(960px, 100vw);
  height: min(640px, 100vh);
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 0 80px rgba(255, 93, 143, 0.15), 0 30px 60px rgba(0,0,0,.6);
}

.hidden { display: none !important; }

/* ================= 城市夜景背景 ================= */
#sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 55%, #3d2c52 78%, #6b3a4e 100%);
}

#stars {
  position: absolute; inset: 0 0 40% 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 12%, #ffffffaa 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 58% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 18%, #ffffff99 50%, transparent 51%),
    radial-gradient(2px 2px at 88% 8%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 38%, #ffffff88 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 65% 6%, #fff 50%, transparent 51%);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .5; } to { opacity: 1; } }

.skyline {
  position: absolute; left: -5%; right: -5%; height: 46%; bottom: 14%;
  --b: #131a38;
  background:
    linear-gradient(var(--b), var(--b)) 0% 100% / 9% 62%,
    linear-gradient(var(--b), var(--b)) 11% 100% / 7% 84%,
    linear-gradient(var(--b), var(--b)) 21% 100% / 10% 55%,
    linear-gradient(var(--b), var(--b)) 33% 100% / 6% 92%,
    linear-gradient(var(--b), var(--b)) 42% 100% / 9% 68%,
    linear-gradient(var(--b), var(--b)) 54% 100% / 8% 78%,
    linear-gradient(var(--b), var(--b)) 65% 100% / 11% 58%,
    linear-gradient(var(--b), var(--b)) 79% 100% / 7% 88%,
    linear-gradient(var(--b), var(--b)) 91% 100% / 9% 64%,
    linear-gradient(var(--b), var(--b)) 100% 100% / 8% 74%;
  background-repeat: no-repeat;
}
.skyline-near {
  --b: #1d2750;
  bottom: 14%; height: 34%;
  background:
    linear-gradient(var(--b), var(--b)) 4% 100% / 12% 70%,
    linear-gradient(var(--b), var(--b)) 19% 100% / 8% 95%,
    linear-gradient(var(--b), var(--b)) 30% 100% / 13% 60%,
    linear-gradient(var(--b), var(--b)) 47% 100% / 9% 82%,
    linear-gradient(var(--b), var(--b)) 60% 100% / 12% 66%,
    linear-gradient(var(--b), var(--b)) 76% 100% / 8% 90%,
    linear-gradient(var(--b), var(--b)) 90% 100% / 13% 72%;
  background-repeat: no-repeat;
}
.skyline-near::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(4px 5px at 8% 62%, rgba(255,209,102,.8) 50%, transparent 51%),
    radial-gradient(4px 5px at 11% 74%, rgba(255,209,102,.6) 50%, transparent 51%),
    radial-gradient(4px 5px at 22% 38%, rgba(255,209,102,.8) 50%, transparent 51%),
    radial-gradient(4px 5px at 24% 56%, rgba(255,209,102,.5) 50%, transparent 51%),
    radial-gradient(4px 5px at 34% 70%, rgba(255,209,102,.7) 50%, transparent 51%),
    radial-gradient(4px 5px at 50% 44%, rgba(255,209,102,.8) 50%, transparent 51%),
    radial-gradient(4px 5px at 52% 64%, rgba(255,209,102,.5) 50%, transparent 51%),
    radial-gradient(4px 5px at 64% 58%, rgba(255,209,102,.7) 50%, transparent 51%),
    radial-gradient(4px 5px at 78% 30%, rgba(255,209,102,.8) 50%, transparent 51%),
    radial-gradient(4px 5px at 80% 52%, rgba(255,209,102,.6) 50%, transparent 51%),
    radial-gradient(4px 5px at 93% 60%, rgba(255,209,102,.7) 50%, transparent 51%);
}

#ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 14.5%;
  background: linear-gradient(180deg, #3a3144 0%, #241e2d 100%);
  border-top: 3px solid #574a66;
}
#ground::before {
  content: "";
  position: absolute; top: 46%; left: 0; right: 0; height: 4px;
  background: repeating-linear-gradient(90deg, var(--neon-yellow) 0 40px, transparent 40px 80px);
  opacity: .55;
}

/* ================= 场景容器 ================= */
.scene {
  position: absolute; inset: 0;
  display: none;
  z-index: 5;
}
.scene.active { display: block; animation: sceneIn .6s ease both; }
@keyframes sceneIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.scene-label {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 20px;
  background: rgba(0,0,0,.45);
  padding: 8px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,209,102,.4);
  letter-spacing: 2px;
  white-space: nowrap;
  z-index: 8;
}

/* ================= 计分板 ================= */
#scoreboard {
  position: absolute; top: 16px; left: 16px; z-index: 50;
  background: linear-gradient(160deg, #2b2118, #161009);
  border: 3px solid var(--money);
  border-radius: 14px;
  padding: 12px 18px;
  min-width: 190px;
  box-shadow: 0 6px 24px rgba(0,0,0,.5), inset 0 0 18px rgba(255,209,102,.08);
}
.board-title {
  font-size: 13px; letter-spacing: 4px; color: #c9a45c; font-weight: 500;
}
.board-money {
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 34px; color: var(--money);
  text-shadow: 0 0 14px rgba(255,209,102,.5);
  line-height: 1.2;
}
.board-money.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.18); } }
.board-sub { font-size: 12px; color: #b9a98c; }
.board-cost { opacity: .7; }
.board-stats {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed rgba(255,209,102,.25);
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 11px; color: #a89878;
}
.board-stats b { color: var(--money); font-weight: 900; }
.board-achievements {
  margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px;
}
.ach-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: rgba(158, 43, 43, .35);
  border: 1px solid rgba(255, 209, 102, .35);
  color: #ffd166; letter-spacing: 1px;
}

/* ================= 通用按钮 ================= */
.btn {
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 19px;
  letter-spacing: 3px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffe29a, var(--neon-yellow));
  border: none;
  border-bottom: 4px solid #c2922a;
  border-radius: 12px;
  padding: 12px 34px;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(1px); border-bottom-width: 2px; }
.btn-big { font-size: 26px; padding: 16px 52px; }

/* ================= 标题场景 ================= */
#scene-title { text-align: center; }
.game-title {
  margin-top: 72px;
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 66px;
  letter-spacing: 6px;
  color: var(--neon-pink);
  text-shadow: 0 0 24px rgba(255,93,143,.6), 4px 4px 0 #5e1130;
  animation: neonFlicker 3.2s infinite;
}
.game-title span {
  display: block; font-size: 30px; color: var(--neon-yellow);
  text-shadow: 0 0 16px rgba(255,209,102,.6), 2px 2px 0 #6b4a00;
  margin-top: 6px;
}
@keyframes neonFlicker {
  0%, 92%, 96%, 100% { opacity: 1; }
  94% { opacity: .55; }
}
.game-subtitle { margin-top: 14px; font-weight: 300; letter-spacing: 6px; color: #cdbfe0; }
#scene-title .btn-big { margin-top: 36px; position: relative; z-index: 9; }
.disclaimer {
  position: absolute; bottom: 14px; left: 0; right: 0; z-index: 9;
  font-size: 12px; color: #8d7f9e; letter-spacing: 1px;
}

/* ================= GitHub Star 徽章（右上角常驻） ================= */
.github-star-badge {
  position: absolute; top: 14px; right: 14px; z-index: 70;
  display: flex; align-items: center; gap: 9px;
  max-width: 58px; overflow: hidden;
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #24292f 0%, #0d1117 100%);
  border: 1.5px solid rgba(255, 255, 255, .14);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
  transition: max-width .45s cubic-bezier(.4, 0, .2, 1), box-shadow .25s ease, border-color .25s ease;
}
.github-star-badge:hover {
  max-width: 460px;
  border-color: var(--neon-yellow);
  box-shadow: 0 6px 26px rgba(255, 209, 102, .4);
}
.gsb-octocat {
  width: 22px; height: 22px; flex: none;
  color: #fff;
}
.gsb-star {
  position: absolute; top: 4px; right: 6px;
  font-size: 13px; line-height: 1;
  color: var(--neon-yellow);
  text-shadow: 0 0 8px rgba(255, 209, 102, .9);
  animation: gsbStarPulse 1.6s ease-in-out infinite;
}
@keyframes gsbStarPulse {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.35); opacity: 1; }
}
.gsb-text {
  display: flex; flex-direction: column; gap: 1px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .3s ease .1s;
}
.github-star-badge:hover .gsb-text { opacity: 1; }
.gsb-text b {
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 14px; font-weight: 400; letter-spacing: 1px;
  color: var(--neon-yellow);
}
.gsb-text i {
  font-style: normal;
  font-size: 11px; letter-spacing: .2px;
  color: #aeb6c2;
}
.title-cart {
  position: absolute; bottom: 11%; left: 50%;
  transform: translateX(-50%) scale(1.15);
  animation: floaty 3s ease-in-out infinite;
}
@keyframes floaty { 50% { transform: translateX(-50%) scale(1.15) translateY(-5px); } }

/* ================= 阿姨 + 三轮车（CSS 拼装） ================= */
.cart-rig { position: relative; width: 300px; height: 170px; }

.cart-rig .auntie { position: absolute; left: 6px; bottom: 38px; width: 78px; height: 118px; }
.cart-rig .a-hair {
  position: absolute; top: 0; left: 12px; width: 54px; height: 44px;
  background: #3b2a22;
  border-radius: 26px 26px 14px 14px;
}
.cart-rig .a-face {
  position: absolute; top: 12px; left: 19px; width: 40px; height: 34px;
  background: #f3c9a2;
  border-radius: 12px 14px 16px 16px;
}
.cart-rig .a-hair::before, .cart-rig .a-hair::after {
  content: ""; position: absolute; top: 12px; width: 9px; height: 26px;
  background: #3b2a22; border-radius: 0 0 8px 8px;
}
.cart-rig .a-hair::before { left: 2px; }
.cart-rig .a-hair::after { right: 2px; }
.cart-rig .a-face::before, .cart-rig .a-face::after {
  content: ""; position: absolute; top: 13px; width: 5px; height: 5px;
  background: #2b2118; border-radius: 50%;
}
.cart-rig .a-face::before { left: 8px; } .cart-rig .a-face::after { right: 8px; }
.cart-rig .a-smile {
  position: absolute; top: 35px; left: 33px; width: 12px; height: 6px;
  border-bottom: 2.5px solid #a3543a; border-radius: 0 0 10px 10px;
}
.cart-rig .a-body {
  position: absolute; top: 42px; left: 12px; width: 54px; height: 50px;
  background: linear-gradient(180deg, #d8506b, #b13a54);
  border-radius: 16px 16px 8px 8px;
}
.cart-rig .a-apron {
  position: absolute; top: 56px; left: 22px; width: 34px; height: 34px;
  background: #f0e6d2; border-radius: 6px 6px 10px 10px;
}
.cart-rig .a-arm {
  position: absolute; top: 48px; left: 58px; width: 34px; height: 10px;
  background: #d8506b; border-radius: 8px;
  transform-origin: left center; transform: rotate(12deg);
}
.cart-rig .a-leg {
  position: absolute; bottom: -26px; left: 26px; width: 11px; height: 30px;
  background: #4a3d63; border-radius: 6px;
  transform-origin: top center;
}
.cart-rig .a-leg.back { left: 44px; }

.cart-rig.pedaling .a-leg { animation: pedalA 0.55s linear infinite; }
.cart-rig.pedaling .a-leg.back { animation: pedalB 0.55s linear infinite; }
@keyframes pedalA { 0%,100% { transform: rotate(18deg); } 50% { transform: rotate(-18deg); } }
@keyframes pedalB { 0%,100% { transform: rotate(-18deg); } 50% { transform: rotate(18deg); } }

.cart-rig .box {
  position: absolute; right: 14px; bottom: 44px; width: 168px; height: 78px;
  background: linear-gradient(180deg, #8fd3e8, #5fa8c4);
  border: 3px solid #2e5d73;
  border-radius: 8px;
}
.cart-rig .box::before {
  content: "现 烤 鹅 腿";
  position: absolute; inset: 8px 10px auto 10px;
  font-family: 'ZCOOL KuaiLe', cursive;
  text-align: center; font-size: 19px; letter-spacing: 4px;
  color: #173848;
}
.cart-rig .box::after {
  content: "¥16/根";
  position: absolute; left: 0; right: 0; bottom: 6px;
  text-align: center; font-size: 13px; font-weight: 900; color: #9e2b2b;
}
.cart-rig .canopy {
  position: absolute; right: 2px; bottom: 128px; width: 192px; height: 22px;
  background: repeating-linear-gradient(90deg, var(--neon-pink) 0 24px, var(--paper) 24px 48px);
  border-radius: 10px 10px 4px 4px;
  border: 2px solid #87294a;
}
.cart-rig .canopy::before, .cart-rig .canopy::after {
  content: ""; position: absolute; top: 20px; width: 4px; height: 64px; background: #87294a;
}
.cart-rig .canopy::before { left: 10px; } .cart-rig .canopy::after { right: 10px; }
.cart-rig .frame {
  position: absolute; left: 70px; right: 30px; bottom: 34px; height: 8px;
  background: #4d4458; border-radius: 4px;
}
.cart-rig .wheel {
  position: absolute; bottom: 0; width: 42px; height: 42px;
  border: 7px solid #2b2533; border-radius: 50%;
  background: radial-gradient(circle, #8d8499 18%, #574d66 19%);
}
.cart-rig .wheel.w1 { left: 36px; }
.cart-rig .wheel.w2 { right: 96px; }
.cart-rig .wheel.w3 { right: 18px; }
.cart-rig.pedaling .wheel { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= 面包车（进货驮冻腿） ================= */
.van-rig { position: relative; width: 340px; height: 150px; }
.van-rig .van-body {
  position: absolute; left: 0; bottom: 38px; right: 0; height: 88px;
  display: flex; border-radius: 10px 14px 8px 8px;
  border: 3px solid #3d4a5c;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
.van-rig .van-cab {
  position: relative; width: 118px; flex-shrink: 0;
  background: linear-gradient(180deg, #c8d4e4, #8fa3bc);
  border-right: 3px solid #3d4a5c;
}
.van-rig .van-window {
  position: absolute; top: 12px; left: 14px; right: 10px; height: 34px;
  background: linear-gradient(180deg, #a8d8f0, #6ba8c8);
  border: 2px solid #4a6078; border-radius: 6px 10px 4px 4px;
}
.van-rig .van-driver {
  position: absolute; left: 18px; bottom: 4px; width: 58px; height: 72px;
  transform: scale(.72); transform-origin: bottom center;
}
.van-rig .van-driver .a-hair {
  position: absolute; top: 0; left: 8px; width: 40px; height: 32px;
  background: #3b2a22; border-radius: 20px 20px 10px 10px;
}
.van-rig .van-driver .a-face {
  position: absolute; top: 8px; left: 12px; width: 30px; height: 26px;
  background: #f3c9a2; border-radius: 10px 12px 14px 14px;
}
.van-rig .van-driver .a-smile {
  position: absolute; top: 26px; left: 22px; width: 10px; height: 5px;
  border-bottom: 2px solid #a3543a; border-radius: 0 0 8px 8px;
}
.van-rig .van-driver .a-body {
  position: absolute; top: 30px; left: 8px; width: 40px; height: 36px;
  background: linear-gradient(180deg, #d8506b, #b13a54);
  border-radius: 12px 12px 6px 6px;
}
.van-rig .van-cargo {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #e8eef5, #b8c8d8);
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 22px; color: #2e4a62; letter-spacing: 6px;
}
.van-rig .van-cargo-tag {
  font-size: 13px; letter-spacing: 2px; color: #6b8299; margin-top: 2px;
}
.van-rig .van-wheel {
  position: absolute; bottom: 0; width: 48px; height: 48px;
  border: 8px solid #2b2533; border-radius: 50%;
  background: radial-gradient(circle, #8d8499 18%, #574d66 19%);
}
.van-rig .van-wheel.w1 { left: 52px; }
.van-rig .van-wheel.w2 { right: 48px; }
.van-rig.driving .van-wheel { animation: spin 0.6s linear infinite; }
.van-rig.driving .van-body { animation: vanBounce 0.35s ease-in-out infinite; }
@keyframes vanBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
.ride-cart .van-rig { width: 380px; }

/* ================= 菜市场 ================= */
.market-stall {
  position: absolute; top: 90px; left: 50%; transform: translateX(-50%);
  width: 560px;
}
.stall-sign {
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 24px; letter-spacing: 8px; text-align: center;
  background: linear-gradient(180deg, #9e2b2b, #701d1d);
  border: 3px solid #ffd166;
  border-radius: 10px;
  padding: 10px;
  color: var(--neon-yellow);
  text-shadow: 1px 1px 0 #3d0d0d;
}
.freezer {
  margin-top: 18px;
  display: flex; gap: 24px; justify-content: center;
}
.freezer-item {
  width: 240px;
  background: linear-gradient(180deg, #e8f4fa, #bcd9e8);
  border: 3px solid #6da7c2;
  border-radius: 14px;
  padding: 18px 14px 14px;
  text-align: center;
  color: #1d3d4f;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  position: relative;
}
.freezer-item:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 14px 30px rgba(110, 200, 255, .35);
}
.item-name { font-family: 'ZCOOL KuaiLe', cursive; font-size: 22px; margin-top: 10px; }
.item-price { font-size: 18px; font-weight: 900; color: #9e2b2b; margin-top: 2px; }
.item-tag {
  margin-top: 8px; display: inline-block;
  font-size: 12px; padding: 3px 12px; border-radius: 999px; letter-spacing: 2px;
}
.tag-shady { background: #ffe1ea; color: #b13a54; }
.tag-honest { background: #e2f7e6; color: #2e7d44; }

/* 腿部图标 */
.leg-icon {
  width: 86px; height: 56px; margin: 0 auto; position: relative;
}
.leg-icon::before { /* 腿肉 */
  content: ""; position: absolute; left: 0; top: 6px;
  width: 60px; height: 44px;
  background: radial-gradient(ellipse at 35% 40%, #f4d4a4, var(--duck-skin) 70%);
  border-radius: 50% 46% 52% 48%;
  border: 2px solid #c08c4e;
}
.leg-icon::after { /* 骨头 */
  content: ""; position: absolute; right: 0; top: 22px;
  width: 34px; height: 10px;
  background: #fdf6ec;
  border: 2px solid #d8cdb8;
  border-radius: 6px;
}
.goose-leg::before {
  width: 72px; height: 52px; top: 2px;
  background: radial-gradient(ellipse at 35% 40%, #f8e2b8, #eec98a 70%);
}
.leg-icon.cooked::before {
  background: radial-gradient(ellipse at 35% 40%, #d98e4a, #a85a22 70%);
  border-color: #7c3d12;
}
.leg-icon.green::before {
  background: radial-gradient(ellipse at 35% 40%, #cfe88a, var(--goose-fake) 70%);
  border-color: #6f8c33;
}

/* ================= 对话框 ================= */
.dialog-box {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  width: min(640px, 90%);
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  border: 3px solid #d9a441;
  padding: 14px 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.dialog-speaker {
  display: inline-block;
  font-family: 'ZCOOL KuaiLe', cursive;
  background: var(--neon-pink); color: #fff;
  font-size: 14px; letter-spacing: 2px;
  padding: 2px 14px; border-radius: 999px;
  margin-bottom: 6px;
}
.dialog-text { font-size: 16px; line-height: 1.6; }

/* ================= 骑车场景 ================= */
.ride-road {
  position: absolute; bottom: 0; left: 0; right: 0; height: 14.5%;
}
#scene-ride.active ~ #ground::before { animation: roadMove 0.5s linear infinite; }
.ride-cart {
  position: absolute; bottom: 10%; left: -320px;
  transition: none;
}
.ride-cart.go { animation: rideAcross 4.5s ease-in-out forwards; }
@keyframes rideAcross {
  0% { left: -320px; }
  100% { left: calc(100% + 40px); }
}

/* ================= 厨房 ================= */
.kitchen-bench {
  position: absolute; bottom: 41%; left: 0; right: 0; height: 230px;
}
.kitchen-bench::after {
  content: ""; position: absolute; bottom: -20px; left: 8%; right: 8%; height: 26px;
  background: linear-gradient(180deg, #7a5b3e, #543b25);
  border-radius: 8px;
}
.machine {
  position: absolute; left: 16%; bottom: 4px; width: 170px; height: 150px;
  background: linear-gradient(180deg, #aeb6c4, #717a8c);
  border-radius: 14px;
  border: 3px solid #485066;
}
.machine-drum {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 78px;
  background: radial-gradient(circle at 40% 35%, #dfe6f2 18%, #8b94a8 60%);
  border-radius: 50%;
  border: 5px solid #3c4356;
}
.machine.running .machine-drum { animation: drumSpin 0.4s linear infinite; }
@keyframes drumSpin { to { transform: translateX(-50%) rotate(360deg); } }
.machine-label {
  position: absolute; bottom: 10px; width: 100%;
  text-align: center; font-size: 14px; letter-spacing: 3px; color: #1c2233; font-weight: 900;
}
.pot {
  position: absolute; left: 44%; bottom: 4px; width: 150px; height: 120px;
}
.pot-body {
  position: absolute; bottom: 0; width: 100%; height: 86px;
  background: linear-gradient(180deg, #5b4a3a, #3a2d21);
  border-radius: 12px 12px 40px 40px;
  border: 3px solid #241a10;
  text-align: center;
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 22px; letter-spacing: 6px;
  line-height: 86px; color: #d9a441;
}
.pot-steam i {
  position: absolute; bottom: 90px; width: 10px; height: 30px;
  background: rgba(255,255,255,.5); border-radius: 999px;
  animation: steam 1.6s ease-in infinite;
}
.pot-steam i:nth-child(1) { left: 36px; }
.pot-steam i:nth-child(2) { left: 70px; animation-delay: .5s; }
.pot-steam i:nth-child(3) { left: 104px; animation-delay: 1s; }
@keyframes steam {
  0% { transform: translateY(0) scaleX(1); opacity: 0; }
  30% { opacity: .8; }
  100% { transform: translateY(-46px) scaleX(1.8); opacity: 0; }
}
.bench-leg {
  position: absolute; right: 18%; bottom: 16px;
  width: 110px; height: 72px;
  transition: transform .8s cubic-bezier(.34,1.56,.64,1), filter .8s ease;
}
.bench-leg::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 74px; height: 56px;
  background: radial-gradient(ellipse at 35% 40%, #f4d4a4, var(--duck-skin) 70%);
  border-radius: 50% 46% 52% 48%;
  border: 3px solid #c08c4e;
  transition: inherit;
}
.bench-leg::after {
  content: ""; position: absolute; right: 0; top: 28px;
  width: 42px; height: 13px;
  background: #fdf6ec; border: 2px solid #d8cdb8; border-radius: 8px;
}
.bench-leg.swollen { transform: scale(1.45); }
.bench-leg.cooked::before {
  background: radial-gradient(ellipse at 35% 40%, #d98e4a, #a85a22 70%);
  border-color: #7c3d12;
}
.bench-leg.greenish::before {
  background: radial-gradient(ellipse at 35% 40%, #cfe88a, var(--goose-fake) 70%);
  border-color: #6f8c33;
}

.process-panel {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  width: min(620px, 92%);
  background: rgba(10, 14, 32, .88);
  border: 2px solid rgba(255, 209, 102, .45);
  border-radius: 16px;
  padding: 16px 24px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.process-step { font-size: 12px; letter-spacing: 4px; color: #9aa3c7; }
.process-title {
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 24px; color: var(--neon-yellow); margin: 4px 0;
  letter-spacing: 3px;
}
.process-desc { font-size: 14px; color: #d8d2e8; line-height: 1.7; min-height: 44px; }
.progress-track {
  height: 14px; border-radius: 999px; margin: 10px 0 14px;
  background: #1c2240; border: 1px solid #3c4577;
  overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-yellow));
  border-radius: 999px;
  transition: width .25s linear;
}

/* ================= 北大门口 ================= */
.pku-gate {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 14%; width: 460px; height: 300px;
}
.gate-roof {
  position: absolute; top: 0; left: -30px; right: -30px; height: 58px;
  background: linear-gradient(180deg, #8c2f39, #5e1d25);
  border-radius: 16px 16px 6px 6px;
  border-bottom: 8px solid #3c1117;
}
.gate-roof::before, .gate-roof::after {
  content: ""; position: absolute; top: -16px; width: 70px; height: 22px;
  background: #5e1d25; border-radius: 12px 12px 0 0;
}
.gate-roof::before { left: 30px; transform: rotate(-8deg); }
.gate-roof::after { right: 30px; transform: rotate(8deg); }
.gate-plaque {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%);
  font-family: 'ZCOOL KuaiLe', cursive;
  white-space: nowrap;
  font-size: 30px; letter-spacing: 14px; text-indent: 14px;
  color: var(--neon-yellow);
  background: #1c0e10;
  border: 3px solid var(--neon-yellow);
  border-radius: 8px;
  padding: 6px 26px;
  text-shadow: 0 0 12px rgba(255,209,102,.6);
}
.gate-pillar {
  position: absolute; top: 50px; bottom: 0; width: 46px;
  background: linear-gradient(90deg, #a8404c, #7c2833 60%);
  border-radius: 6px 6px 0 0;
}
.gate-pillar.left { left: 28px; } .gate-pillar.right { right: 28px; }

.sell-cart { position: absolute; bottom: 9%; left: 7%; }

/* 学生 */
.student-spot { position: absolute; bottom: 10%; left: 42%; }
.student {
  position: relative; width: 64px; height: 120px;
  animation: walkIn .9s ease both;
}
@keyframes walkIn { from { transform: translateX(220px); opacity: 0; } to { transform: none; opacity: 1; } }
.student.leave { animation: walkOut .9s ease both; }
@keyframes walkOut { to { transform: translateX(260px); opacity: 0; } }
.s-hair { position: absolute; top: 0; left: 12px; width: 40px; height: 26px; background: #222; border-radius: 18px 18px 6px 6px; }
.s-hair.long { height: 58px; border-radius: 18px 18px 14px 14px; }
.s-face { position: absolute; top: 8px; left: 16px; width: 32px; height: 28px; background: #f6d3ae; border-radius: 10px 10px 13px 13px; }
.s-face::before, .s-face::after { content: ""; position: absolute; top: 11px; width: 4px; height: 4px; background: #222; border-radius: 50%; }
.s-face::before { left: 7px; } .s-face::after { right: 7px; }
.s-body { position: absolute; top: 38px; left: 10px; width: 44px; height: 46px; border-radius: 12px 12px 6px 6px; background: var(--s-color, #3f6fb5); }
.s-legs { position: absolute; top: 82px; left: 18px; width: 28px; height: 34px; background: #2e3550; border-radius: 0 0 8px 8px; }
.s-bag { position: absolute; top: 42px; left: 0; width: 12px; height: 30px; background: #e0a23c; border-radius: 6px; }

/* 气泡 */
.bubble {
  position: absolute; z-index: 20;
  max-width: 330px;
  background: var(--paper); color: var(--ink);
  border-radius: 16px;
  padding: 12px 18px;
  font-size: 15px; line-height: 1.6;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: popIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes popIn { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.bubble::after {
  content: ""; position: absolute; bottom: -10px;
  border: 12px solid transparent; border-top-color: var(--paper);
  border-bottom: none;
}
.bubble-student { bottom: 42%; left: 44%; }
.bubble-student::after { left: 28px; }
.bubble-auntie { bottom: 42%; left: 6%; }
.bubble-auntie::after { left: 38px; }
.bubble-think {
  bottom: 46%; left: 5%;
  background: #e8e3f6;
  border: 2px dashed #9a86c9;
  font-style: italic;
  color: #4a3d63;
}
.bubble-think::after { display: none; }
.bubble-think::before {
  content: "○ ｡ ｡";
  position: absolute; bottom: -24px; left: 30px;
  color: #9a86c9; font-size: 16px; letter-spacing: -2px;
}
.bubble .b-name {
  display: block; font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 13px; color: var(--neon-pink); margin-bottom: 2px; letter-spacing: 2px;
}

.btn-sell {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 25;
  background: linear-gradient(180deg, #ff8caf, var(--neon-pink));
  border-bottom-color: #a82e57;
  color: #fff;
}
.btn-sell:disabled { filter: grayscale(.8); cursor: not-allowed; }

/* 飘字 */
.float-layer { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.float-money {
  position: absolute;
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 26px; color: var(--neon-green);
  text-shadow: 0 0 10px rgba(126,242,157,.7), 1px 1px 0 #0a3d1c;
  animation: floatUp 1.2s ease-out forwards;
}
@keyframes floatUp {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(-90px); opacity: 0; }
}

/* ================= 弹窗 ================= */
.modal-mask {
  position: absolute; inset: 0; z-index: 90;
  background: rgba(4, 6, 16, .72);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .25s ease both;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-card {
  width: min(480px, 88%);
  background: var(--paper); color: var(--ink);
  border-radius: 18px;
  border: 4px solid var(--neon-yellow);
  padding: 28px 30px 24px;
  text-align: center;
  animation: popIn .35s cubic-bezier(.34,1.56,.64,1) both;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.modal-title {
  font-family: 'ZCOOL KuaiLe', cursive;
  font-size: 26px; letter-spacing: 4px; color: #9e2b2b;
}
.modal-body { margin: 14px 0 20px; font-size: 16px; line-height: 1.8; }
.modal-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-ghost {
  background: #efe6d2; border-bottom-color: #bba87c; color: #6b5b3e;
}

/* 手机适配 */
@media (max-width: 640px) {
  .game-title { font-size: 44px; }
  .market-stall { width: 92%; }
  .freezer { flex-direction: column; align-items: center; }
  .pku-gate { width: 90%; }
  .gate-plaque { font-size: 22px; letter-spacing: 8px; }
}
