/* 霓虹果盘777 — 竖屏霓虹街机老虎机 */
* { box-sizing: border-box; }

:root {
  --gold: #ffd15c;
  --gold-light: #fff6c9;
  --gold-deep: #a86000;
  --red: #ff3a26;
  --red-deep: #8c000d;
  --orange: #ff8a3d;
  --theme: #ff8a3d;
  --ink: #070001;
  --reel-h: clamp(270px, 36dvh, 330px);
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #060001;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior: none;
  color: #fff3d0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 2px solid #ffe39a;
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.mp-icon { flex: 0 0 auto; }

/* ---------- 背景氛围 ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #060001;
  pointer-events: none;
}

.ambient-img {
  position: absolute;
  inset: -14%;
  width: 128%;
  height: 128%;
  object-fit: cover;
  opacity: .78;
  filter: blur(22px) brightness(.34) saturate(1.45) contrast(1.08);
  transform: scale(1.08);
}

.ambient-tint {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 92, 34, .16), rgba(0, 0, 0, 0) 52%),
    radial-gradient(ellipse at 50% 104%, rgba(255, 60, 22, .22), rgba(0, 0, 0, 0) 48%),
    linear-gradient(180deg, rgba(9, 0, 2, .48) 0%, rgba(5, 0, 1, .6) 48%, rgba(12, 0, 2, .78) 100%);
}

.ambient-ray {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: .72;
}

.ray-a {
  width: 78%;
  height: 52%;
  left: -38%;
  top: 8%;
  background: radial-gradient(circle, rgba(255, 34, 30, .5), rgba(0, 0, 0, 0) 66%);
}

.ray-b {
  width: 72%;
  height: 48%;
  right: -36%;
  bottom: 10%;
  background: radial-gradient(circle, rgba(255, 132, 38, .42), rgba(0, 0, 0, 0) 66%);
}

.ray-c {
  width: 60%;
  height: 34%;
  left: 20%;
  bottom: -16%;
  background: radial-gradient(ellipse, rgba(255, 60, 20, .32), rgba(0, 0, 0, 0) 70%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255, 110, 40, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 110, 40, .12) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 8%, transparent 72%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 8%, transparent 72%);
  transform: perspective(400px) rotateX(58deg) translateY(24%) scale(1.8);
  transform-origin: 50% 100%;
}

.sparks {
  position: absolute;
  inset: 0;
  opacity: .52;
  animation: twinkle 5.5s ease-in-out infinite alternate;
  background-image:
    radial-gradient(1.5px 1.5px at 11% 17%, rgba(255, 210, 130, .85), transparent 60%),
    radial-gradient(1px 1px at 83% 11%, rgba(255, 235, 180, .75), transparent 60%),
    radial-gradient(1.5px 1.5px at 92% 34%, rgba(255, 150, 90, .65), transparent 60%),
    radial-gradient(1px 1px at 7% 48%, rgba(255, 210, 150, .65), transparent 60%),
    radial-gradient(1px 1px at 22% 77%, rgba(255, 190, 120, .6), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 72%, rgba(255, 220, 160, .7), transparent 60%),
    radial-gradient(1px 1px at 66% 92%, rgba(255, 170, 90, .55), transparent 60%),
    radial-gradient(1px 1px at 38% 8%, rgba(255, 240, 190, .65), transparent 60%),
    radial-gradient(1px 1px at 55% 60%, rgba(255, 190, 120, .35), transparent 60%),
    radial-gradient(1.5px 1.5px at 3% 88%, rgba(255, 140, 80, .5), transparent 60%);
}

/* ---------- 主体框架 ---------- */
.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ---------- 顶部金币栏 ---------- */
.hud {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 468px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 6px;
}

.coin-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 5px 6px 5px 6px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 22% 0%, rgba(255, 140, 60, .28), transparent 55%),
    linear-gradient(180deg, #4d0a0c 0%, #1c0102 58%, #320405 100%);
  border: 1.5px solid rgba(255, 211, 112, .82);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, .62),
    0 0 24px rgba(255, 105, 30, .22),
    inset 0 1px 0 rgba(255, 255, 255, .2),
    inset 0 -2px 6px rgba(0, 0, 0, .5);
}

.coin-pill::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255, 245, 190, .12);
  pointer-events: none;
}

.coin-ico {
  flex: 0 0 auto;
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 36% 28%, #fff8c4, #ffce45 46%, #c27b00 82%, #6a3500);
  box-shadow:
    0 0 0 1.5px rgba(255, 235, 165, .9),
    0 0 14px rgba(255, 178, 50, .6),
    inset 0 1px 2px rgba(255, 255, 255, .85);
}

.coin-ico img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(1.1);
  filter: saturate(1.12) contrast(1.02);
}

.coin-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 82px;
}

.coin-label {
  font-size: 8px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 2.4px;
  color: #ffb65e;
  text-shadow: 0 0 8px rgba(255, 140, 30, .55);
}

.coin-num {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .2px;
  color: #ffecb0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(255, 176, 44, .55), 0 2px 0 rgba(70, 10, 0, .8);
}

.icon-btn {
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  color: #ffe6a0;
  transition: transform .12s ease, filter .12s ease;
}

.icon-btn:active {
  transform: scale(.9);
  filter: brightness(1.15);
}

.plus-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  margin-left: 2px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 24%, #ff9860, #e5191f 56%, #8a0008);
  border: 1.4px solid #ffd36c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    0 2px 7px rgba(0, 0, 0, .5),
    0 0 12px rgba(255, 70, 30, .4);
}

.plus-btn .mp-icon {
  width: 20px;
  height: 20px;
  color: #fff6cf;
  filter: drop-shadow(0 1px 1px rgba(90, 0, 0, .8));
}

.help-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, #552f10, #1d0a02 72%);
  border: 1.5px solid rgba(255, 210, 112, .7);
  box-shadow:
    0 5px 14px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 0 16px rgba(255, 150, 40, .2);
}

.help-btn .mp-icon {
  width: 24px;
  height: 24px;
  color: #ffd06a;
  filter: drop-shadow(0 0 6px rgba(255, 150, 40, .45));
}

/* ---------- 舞台与机柜 ---------- */
.stage {
  position: relative;
  z-index: 5;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 26px 6px 14px;
}

.machine {
  position: relative;
  width: 100%;
  max-width: 430px;
}

.machine-inner {
  position: relative;
  isolation: isolate;
  padding: 10px;
  border-radius: 28px;
  border: 1.7px solid #ffd374;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 118, 42, .32), transparent 46%),
    linear-gradient(180deg, #74100c 0%, #3a0506 5%, #1b0102 34%, #0f0001 68%, #3d0506 100%);
  box-shadow:
    0 0 0 3px rgba(108, 16, 9, .95),
    0 0 0 5px rgba(255, 178, 66, .34),
    0 0 34px rgba(255, 60, 24, .5),
    0 20px 48px rgba(0, 0, 0, .76),
    inset 0 0 36px rgba(255, 70, 20, .22),
    inset 0 1px 0 rgba(255, 246, 200, .4);
}

.machine-inner::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  border-radius: 48px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 74, 22, .38), rgba(255, 30, 20, .08) 48%, transparent 72%);
  filter: blur(16px);
  animation: frameGlow 3.6s ease-in-out infinite;
}

.machine-inner::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 24px;
  border: 1px solid rgba(255, 224, 150, .16);
  pointer-events: none;
}

/* 顶部跑马灯 */
.marquee {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  margin: 0 6px 9px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2b0203, #070000 62%, #1a0101);
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, .9),
    0 1px 0 rgba(255, 205, 105, .18),
    0 0 0 1px rgba(255, 190, 80, .22);
}

.bulb-line {
  flex: 1;
  height: 10px;
  background:
    radial-gradient(circle at 5px 5px, #fff1b8 0 1.8px, rgba(255, 160, 50, .62) 2.4px, transparent 3.6px) 0 0 / 12px 10px repeat-x;
  filter: drop-shadow(0 0 5px rgba(255, 140, 30, .85));
  opacity: .72;
  animation: bulbs 2.8s steps(2) infinite;
}

.marquee-badge {
  flex: 0 0 auto;
  padding: 2px 8px 0;
  font-family: "Arial Black", Impact, "Helvetica Neue", sans-serif;
  font-size: 19px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fffcd8 0%, #ffd45c 46%, #ff8a1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 2px 0 rgba(100, 24, 0, .95))
    drop-shadow(0 0 9px rgba(255, 170, 50, .7));
}

/* ---------- 滚轮窗 ---------- */
.reels-wrap {
  position: relative;
  padding: 5px;
  border-radius: 20px;
  background: linear-gradient(180deg, #1d0202, #060000);
  box-shadow:
    inset 0 0 20px #000,
    0 0 0 1px rgba(255, 207, 100, .5),
    0 0 0 4px rgba(82, 11, 7, .9),
    0 0 24px rgba(255, 90, 30, .26);
}

.reels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  height: var(--reel-h);
  padding: 4px;
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 205, 110, .55), rgba(120, 28, 5, .85) 10%, rgba(62, 9, 3, .8) 90%, rgba(255, 175, 65, .45));
  box-shadow: inset 0 0 16px rgba(0, 0, 0, .92);
}

.reel {
  position: relative;
  overflow: hidden;
  border-radius: 9px;
  background:
    radial-gradient(ellipse at 50% 42%, #320407 0%, #160002 48%, #0d0001 100%);
  box-shadow:
    inset 0 18px 26px rgba(0, 0, 0, .82),
    inset 0 -18px 26px rgba(0, 0, 0, .86),
    inset 1px 0 0 rgba(255, 180, 80, .1),
    inset -1px 0 0 rgba(0, 0, 0, .9);
}

.strip {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  will-change: transform;
}

.cell {
  position: relative;
  height: var(--cell-h, 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 2px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 105, 40, .14), transparent 68%);
}

.cell + .cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 195, 105, .16), transparent);
}

/* 从 GPT Image 成品图裁出的符号 */
.sym {
  width: 104%;
  height: 104%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 0 6px rgba(255, 120, 40, .22)) drop-shadow(0 5px 5px rgba(0, 0, 0, .48)) saturate(1.08) contrast(1.03);
  transition: filter .2s ease;
}

/* 上下两行只做滚轮氛围，暗化后不参与中奖线 */
.strip > .cell:first-child .sym,
.strip > .cell:last-child .sym {
  opacity: .44;
  filter: brightness(.68) saturate(.86) blur(.3px);
}

.sym-cherry { background-image: url("images/gen/sym_cherry.png"); }
.sym-lemon  { background-image: url("images/gen/sym_lemon.png"); }
.sym-grape  { background-image: url("images/gen/sym_grape.png"); }
.sym-bell   { background-image: url("images/gen/sym_bell.png"); }
.sym-star   { background-image: url("images/gen/sym_star.png"); }
.sym-bar    { background-image: url("images/gen/sym_bar.png"); }
.sym-seven  { background-image: url("images/gen/sym_777.png"); }
.sym-777    { background-image: url("images/gen/sym_777.png"); }

/* 中奖高亮 */
.cell.win {
  z-index: 3;
  background: radial-gradient(circle at 50% 50%, rgba(255, 210, 95, .3), rgba(255, 90, 20, .1) 62%, transparent 80%);
}

.cell.win .sym {
  animation: winBob .85s ease-in-out infinite;
  filter:
    drop-shadow(0 0 13px rgba(255, 200, 75, .95))
    drop-shadow(0 0 28px rgba(255, 115, 20, .7))
    brightness(1.12);
}

.cell.win::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 9px;
  border: 1.5px solid rgba(255, 228, 145, .95);
  box-shadow: inset 0 0 20px rgba(255, 180, 60, .38), 0 0 18px rgba(255, 150, 30, .7);
  animation: cellPulse 1s ease-in-out infinite;
  pointer-events: none;
}

.cell.scatter .sym {
  animation: winBob .7s ease-in-out infinite;
  filter:
    drop-shadow(0 0 15px rgba(255, 235, 125, .98))
    drop-shadow(0 0 30px rgba(255, 180, 50, .75))
    brightness(1.14);
}

/* 玻璃反光 */
.reel-glass {
  position: absolute;
  inset: 9px;
  z-index: 3;
  border-radius: 13px;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0 19.5%, rgba(255, 216, 132, .22) 19.8%, transparent 20.3%, transparent 79.7%, rgba(255, 216, 132, .22) 80.1%, transparent 80.4%),
    linear-gradient(180deg, rgba(0, 0, 0, .56) 0%, rgba(0, 0, 0, .28) 17%, transparent 21%, transparent 79%, rgba(0, 0, 0, .28) 83%, rgba(0, 0, 0, .56) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, .18) 0%, rgba(255, 255, 255, .02) 16%, transparent 34%, transparent 82%, rgba(255, 230, 170, .06) 100%);
  box-shadow:
    inset 0 0 26px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 245, 200, .22);
}

/* 中奖线 */
.paylines {
  position: absolute;
  inset: 9px;
  z-index: 6;
  pointer-events: none;
}

.payline {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, #ffeeb2 8%, #ffbe3a 50%, #ffeeb2 92%, transparent);
  box-shadow: 0 0 8px #ffb01e, 0 0 20px rgba(255, 120, 20, .9);
  transform-origin: left center;
  animation: paylineIn .42s cubic-bezier(.2, .9, .3, 1) both;
}

.payline.fire {
  background: linear-gradient(90deg, transparent, #ffd0ae 8%, #ff5030 50%, #ffd0ae 92%, transparent);
  box-shadow: 0 0 9px #ff5a2a, 0 0 22px rgba(255, 40, 20, .85);
}

.payline::before,
.payline::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff3c0;
  box-shadow: 0 0 10px #ffc94f;
  transform: translateY(-50%);
}

.payline::before { left: -1px; }
.payline::after { right: -1px; }

/* 中奖横幅 */
.win-banner {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 30px;
  border-radius: 15px;
  border-top: 1.5px solid #ffe39a;
  border-bottom: 1.5px solid #ffe39a;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 120, 40, .3), transparent 60%),
    linear-gradient(180deg, rgba(40, 4, 2, .98), rgba(12, 0, 0, .98));
  box-shadow: 0 0 30px rgba(255, 110, 30, .6), inset 0 0 24px rgba(255, 80, 20, .3);
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.7);
  pointer-events: none;
}

.win-banner.show {
  animation: bannerPop 2s cubic-bezier(.2, .9, .3, 1) both;
}

.wb-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #ffbf5f;
  text-shadow: 0 0 8px rgba(255, 150, 40, .6);
}

.wb-amount {
  font-family: "Arial Black", Impact, "Helvetica Neue", sans-serif;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, #fffbd0 0%, #ffd35a 55%, #ff9c17 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(90, 25, 0, .9)) drop-shadow(0 0 12px rgba(255, 180, 50, .6));
}

.win-banner.big .wb-amount { font-size: 39px; }

/* 免费旋转侧标 */
.free-tab {
  position: absolute;
  right: -34px;
  top: 21%;
  z-index: 9;
  width: 34px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  border: 1.2px solid rgba(255, 208, 100, .6);
  background: linear-gradient(180deg, #520a08, #1a0000);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .58), 0 0 12px rgba(255, 80, 30, .2);
  opacity: .76;
  transition: opacity .25s ease, box-shadow .25s ease, transform .25s ease;
}

.free-star {
  width: 14px;
  height: 14px;
  color: #ffd35a;
  filter: drop-shadow(0 0 5px rgba(255, 170, 40, .8));
}

.free-tab-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 8px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffd88a;
}

.free-tab-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 205, 95, .55);
  background: #090000;
  color: #ffdf8e;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.free-tab.active {
  opacity: 1;
  border-color: #ffe29a;
  background: linear-gradient(180deg, #ff5b2e, #a9000c 70%, #5c0006);
  box-shadow: 0 0 18px rgba(255, 80, 30, .85), 0 4px 16px rgba(0, 0, 0, .5);
  animation: freePulse 1.8s ease-in-out infinite;
}

.free-tab.active .free-tab-num {
  background: #2a0000;
  color: #fff0b8;
}

/* WIN 显示条 */
.meter {
  height: 48px;
  margin-top: 9px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 12% 50%, rgba(255, 110, 30, .14), transparent 50%),
    linear-gradient(180deg, #250304, #0b0001 58%, #1d0203);
  box-shadow:
    inset 0 2px 9px rgba(0, 0, 0, .92),
    0 0 0 1px rgba(255, 198, 90, .32),
    0 2px 7px rgba(0, 0, 0, .45);
  transition: box-shadow .25s ease;
}

.meter.lit {
  box-shadow:
    inset 0 2px 9px rgba(0, 0, 0, .8),
    0 0 0 1px rgba(255, 220, 130, .85),
    0 0 20px rgba(255, 160, 40, .5);
}

.meter-label {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffb95a;
  text-shadow: 0 0 8px rgba(255, 140, 30, .5);
}

.meter-value {
  flex: 1;
  min-width: 0;
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  color: #ffe9a8;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255, 170, 40, .55);
  overflow: hidden;
  text-overflow: ellipsis;
}

.meter-mult {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 99px;
  border: 1px solid rgba(255, 205, 95, .38);
  background: rgba(255, 110, 30, .12);
  color: #ffd88a;
  font-size: 11px;
  font-weight: 800;
  transition: background .25s ease, box-shadow .25s ease;
}

.meter-mult.hot {
  background: rgba(255, 130, 30, .3);
  box-shadow: 0 0 12px rgba(255, 160, 40, .6);
}

/* ---------- 底部操作区 ---------- */
.controls {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 468px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
}

.bet-box {
  position: relative;
  height: 74px;
  padding: 0 9px 0 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 20px;
  border: 1.6px solid rgba(255, 211, 112, .72);
  background:
    radial-gradient(ellipse at 8% 0%, rgba(255, 130, 50, .2), transparent 48%),
    linear-gradient(180deg, #4a0909 0%, #1d0102 58%, #320405 100%);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .15),
    0 0 20px rgba(255, 90, 30, .18);
}

.bet-box::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 16px;
  border: 1px solid rgba(255, 235, 170, .1);
  pointer-events: none;
}

.bet-readout {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.bet-label {
  font-size: 8px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 2.6px;
  color: #ffb45a;
  text-shadow: 0 0 8px rgba(255, 140, 30, .45);
}

.bet-value {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.05;
  color: #fff0c0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(255, 170, 40, .5), 0 2px 0 rgba(80, 10, 0, .6);
}

.bet-levels {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.bet-levels i {
  display: block;
  width: 12px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 200, 100, .18);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, .4);
  transition: background .18s ease, box-shadow .18s ease;
}

.bet-levels i.on {
  background: linear-gradient(90deg, #ffb23a, #ffe9a8);
  box-shadow: 0 0 6px rgba(255, 170, 40, .8);
}

.bet-buttons {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bet-btn {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid #ffcf6b;
  background:
    radial-gradient(circle at 34% 24%, #ff9a64, #e5191f 54%, #8e000c);
  color: #ffe9b0;
  cursor: pointer;
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, .38),
    inset 0 -3px 7px rgba(80, 0, 0, .62),
    0 3px 9px rgba(0, 0, 0, .48),
    0 0 12px rgba(255, 70, 30, .22);
  transition: transform .1s ease, filter .1s ease;
}

.bet-btn .mp-icon {
  width: 23px;
  height: 23px;
  filter: drop-shadow(0 1px 1px rgba(90, 0, 0, .8));
}

.bet-btn:active {
  transform: scale(.9);
  filter: brightness(1.15);
}

.bet-btn:disabled {
  cursor: default;
}

.bet-box.locked {
  border-color: rgba(255, 206, 105, .4);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .1),
    0 0 16px rgba(255, 150, 40, .22);
}

.bet-box.locked .bet-btn {
  opacity: .36;
  filter: saturate(.45) brightness(.8);
}

.bet-box.locked .bet-value,
.bet-box.locked .bet-label {
  color: #ffd88a;
}

.spin-btn {
  position: relative;
  width: 100%;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  border: 2.2px solid #ffd56b;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, .38), transparent 46%),
    linear-gradient(180deg, #ff8a4c 0%, #f21c24 32%, #c10015 64%, #7f000b 100%);
  color: #fff6cf;
  font-family: "Arial Black", Impact, "Helvetica Neue", sans-serif;
  font-size: 31px;
  font-weight: 900;
  letter-spacing: 3px;
  text-shadow: 0 2px 0 #8b0000, 0 0 16px rgba(255, 220, 120, .9);
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 10px 26px rgba(255, 40, 20, .38),
    0 0 30px rgba(255, 80, 20, .28),
    inset 0 2px 3px rgba(255, 255, 255, .55),
    inset 0 -7px 14px rgba(70, 0, 0, .68),
    0 0 0 3px rgba(82, 8, 4, .92);
  transition: transform .1s ease, filter .1s ease;
}

.spin-btn::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 180, .65), transparent);
  pointer-events: none;
}

.spin-ico {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
  color: #fff1b6;
  filter: drop-shadow(0 0 7px rgba(255, 220, 120, .8));
}

.spin-btn .spin-text {
  position: relative;
  z-index: 2;
}

.spin-btn:active {
  transform: translateY(1px) scale(.975);
  filter: brightness(1.1);
}

.spin-btn:disabled {
  cursor: default;
}

.spin-shine {
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -45%;
  z-index: 1;
  width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .4), transparent);
  transform: skewX(-18deg);
  animation: shine 3.4s ease-in-out infinite;
  pointer-events: none;
}

.spin-btn.spinning {
  filter: saturate(.85) brightness(.85);
}

.spin-btn.spinning .spin-text {
  animation: spinTextPulse .6s ease-in-out infinite;
}

.spin-btn.free {
  border-color: #fff2b0;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, .5), transparent 48%),
    linear-gradient(180deg, #ffc95c 0%, #ff8a1e 32%, #e0300d 64%, #8b0008 100%);
  box-shadow:
    0 10px 26px rgba(255, 130, 30, .45),
    0 0 30px rgba(255, 170, 40, .42),
    inset 0 2px 3px rgba(255, 255, 255, .62),
    inset 0 -7px 14px rgba(90, 20, 0, .62),
    0 0 0 3px rgba(82, 8, 4, .92);
}

.spin-btn.free .spin-text {
  font-size: 20px;
  letter-spacing: 1px;
}

/* ---------- 提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(198px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: calc(100vw - 48px);
  padding: 10px 19px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 100, .62);
  background: rgba(20, 2, 3, .95);
  color: #ffe6ae;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .58), 0 0 18px rgba(255, 120, 30, .28);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 玩法弹层 ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: fadeIn .22s ease both;
}

.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 87vh;
  max-height: 87dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  border-top: 2px solid #ffcf6b;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 90, 30, .18), transparent 55%),
    linear-gradient(180deg, #200305 0%, #0c0001 100%);
  box-shadow: 0 -10px 44px rgba(0, 0, 0, .72), 0 0 32px rgba(255, 90, 30, .22);
  animation: sheetUp .3s cubic-bezier(.2, .9, .3, 1) both;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 12px;
  border-radius: 99px;
  background: rgba(255, 215, 140, .28);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #ffe4a3;
  text-shadow: 0 0 14px rgba(255, 160, 40, .4);
}

.sheet-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 205, 95, .45);
  background: rgba(255, 90, 30, .1);
  color: #ffd88a;
  cursor: pointer;
}

.sheet-close .mp-icon {
  width: 20px;
  height: 20px;
}

.sheet-lede {
  margin: 10px 0 12px;
  color: #d9b9a8;
  font-size: 13px;
  line-height: 1.7;
}

.paytable {
  border-radius: 14px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(255, 190, 100, .14);
}

.pt-row {
  display: grid;
  grid-template-columns: 34px 1fr 42px 42px 42px;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  border-bottom: 1px dashed rgba(255, 180, 100, .13);
}

.pt-row:last-child {
  border-bottom: 0;
}

.pt-row.head {
  min-height: 30px;
}

.pt-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #a97858;
  text-align: center;
}

.pt-head:first-child {
  text-align: left;
}

.pt-sym {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-art {
  display: block;
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6));
}

.pt-name {
  font-size: 12px;
  color: #f0d6c2;
  letter-spacing: .3px;
}

.pt-pay {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  color: #ffd97d;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rule-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0;
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 190, 100, .18);
  background: linear-gradient(180deg, rgba(255, 120, 40, .1), rgba(255, 80, 20, .03));
}

.rule-card .mp-icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: #ffd35a;
}

.rule-card p {
  margin: 0;
  color: #d9bdb0;
  font-size: 12px;
  line-height: 1.65;
}

.rule-card b {
  color: #ffe19a;
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.sound-toggle {
  flex: 0 0 auto;
  height: 48px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  border: 1.2px solid rgba(255, 205, 95, .4);
  background: rgba(255, 255, 255, .04);
  color: #e8cba8;
  font-size: 12px;
  cursor: pointer;
}

.sound-toggle .mp-icon {
  width: 19px;
  height: 19px;
  color: #ffd35a;
}

.continue-btn {
  flex: 1;
  height: 48px;
  border-radius: 999px;
  border: 1.6px solid #ffd56b;
  background: linear-gradient(180deg, #ff8b4a, #e11b23 55%, #9b0010);
  color: #fff4cc;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 1px 0 rgba(100, 0, 0, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 6px 18px rgba(255, 50, 20, .28);
  cursor: pointer;
}

.sheet-close,
.continue-btn,
.sound-toggle {
  transition: transform .1s ease, filter .1s ease;
}

.sheet-close:active,
.continue-btn:active,
.sound-toggle:active {
  transform: scale(.96);
  filter: brightness(1.1);
}

/* ---------- 粒子 / 抖动 ---------- */
.spark-particle {
  position: absolute;
  z-index: 11;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #ffe08a;
  box-shadow: 0 0 8px #ffb028, 0 0 16px rgba(255, 130, 20, .8);
  pointer-events: none;
  animation: sparkFly .9s cubic-bezier(.2, .7, .3, 1) forwards;
}

.machine.shake .machine-inner {
  animation: machineShake .5s cubic-bezier(.36, .07, .19, .97) both;
}

/* ---------- 动效 ---------- */
@keyframes frameGlow {
  0%, 100% { opacity: .72; }
  50% { opacity: 1; }
}

@keyframes twinkle {
  0% { opacity: .32; }
  100% { opacity: .62; }
}

@keyframes bulbs {
  0%, 100% { opacity: .55; }
  50% { opacity: .95; }
}

@keyframes winBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.05); }
}

@keyframes cellPulse {
  0%, 100% { opacity: .65; }
  50% { opacity: 1; }
}

@keyframes paylineIn {
  0% { transform: scaleX(0); opacity: 0; }
  100% { transform: scaleX(1); opacity: 1; }
}

@keyframes bannerPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.96); }
}

@keyframes freePulse {
  0%, 100% { box-shadow: 0 0 13px rgba(255, 80, 30, .6), 0 4px 14px rgba(0, 0, 0, .5); }
  50% { box-shadow: 0 0 26px rgba(255, 110, 40, .95), 0 0 40px rgba(255, 70, 20, .42), 0 4px 14px rgba(0, 0, 0, .5); }
}

@keyframes shine {
  0%, 58% { left: -45%; }
  82%, 100% { left: 125%; }
}

@keyframes spinTextPulse {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}

@keyframes sparkFly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx, 0px), var(--dy, -60px)) scale(.2); opacity: 0; }
}

@keyframes machineShake {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  15% { transform: translate(-4px, 2px) rotate(-.4deg); }
  30% { transform: translate(4px, -2px) rotate(.4deg); }
  45% { transform: translate(-3px, 1px) rotate(-.25deg); }
  60% { transform: translate(3px, -1px) rotate(.25deg); }
  80% { transform: translate(-1px, 1px) rotate(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheetUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- 适配 ---------- */
@media (max-width: 370px) {
  :root { --reel-h: clamp(258px, 35dvh, 300px); }
  .hud { padding-left: 12px; padding-right: 12px; }
  .coin-pill { height: 50px; gap: 7px; }
  .coin-ico { width: 38px; height: 38px; }
  .coin-num { font-size: 20px; }
  .coin-meta { min-width: 72px; }
  .help-btn { width: 42px; height: 42px; }
  .stage { padding-left: 10px; padding-right: 23px; }
  .controls { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .bet-box { height: 68px; padding-left: 14px; }
  .bet-value { font-size: 21px; }
  .bet-btn { flex-basis: 46px; width: 46px; height: 46px; }
  .spin-btn { height: 72px; font-size: 28px; }
  .spin-btn.free .spin-text { font-size: 18px; }
  .free-tab { right: -31px; width: 31px; }
  .pt-row { grid-template-columns: 30px 1fr 38px 38px 38px; }
}

@media (max-height: 720px) {
  :root { --reel-h: clamp(236px, 35dvh, 280px); }
  .hud { padding-top: calc(8px + env(safe-area-inset-top)); padding-bottom: 4px; }
  .coin-pill { height: 48px; }
  .coin-ico { width: 36px; height: 36px; }
  .coin-num { font-size: 19px; }
  .help-btn { width: 42px; height: 42px; }
  .stage { padding-top: 4px; padding-bottom: 2px; }
  .marquee { height: 30px; margin-bottom: 6px; }
  .marquee-badge { font-size: 17px; }
  .meter { height: 44px; margin-top: 6px; }
  .controls { padding-top: 6px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  .bet-box { height: 62px; }
  .bet-value { font-size: 21px; }
  .bet-btn { flex-basis: 44px; width: 44px; height: 44px; }
  .spin-btn { height: 64px; font-size: 27px; }
  .spin-btn.free .spin-text { font-size: 18px; }
  .toast { bottom: calc(156px + env(safe-area-inset-bottom)); }
}

@media (min-width: 600px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel {
    border-radius: 24px;
    border: 1.5px solid rgba(255, 205, 95, .5);
    padding-bottom: 20px;
  }
  .sheet-handle { display: none; }
}

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

/* 补充状态 */
body.locked { overflow: hidden; }

.reel.settle {
  animation: reelSettle .18s ease-out;
}

@keyframes reelSettle {
  0% { filter: brightness(1.55); }
  100% { filter: brightness(1); }
}
