/* ============================================================================
 * NEON STACK · LAAFFIC Content SDK v5 Demo
 * 深色霓虹休闲游戏 App：游戏 + 看短剧发金币 + 游戏内道具/复活消耗
 * ==========================================================================*/
:root {
  --ink: #07060C;
  --ink-2: #0B0A14;
  --navy: #121123;
  --navy-2: #1D1B33;
  --pink: #FA165F;
  --pink-l: #FF6A96;
  --purple: #C223C1;
  --violet: #7A3BFF;
  --gold: #FFD24A;
  --gold-l: #FFE58A;
  --gold-d: #C9971F;
  --mint: #3BE8B0;
  --text: #F5F2FF;
  --text-2: #A9A3C4;
  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.06);
  --font-ui: "PingFang SC", "Noto Sans SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font-display: "Songti SC", "Noto Serif SC", "Times New Roman", serif;
  --grad-main: linear-gradient(135deg, #FA165F 0%, #C223C1 58%, #7A3BFF 100%);
  --grad-gold: linear-gradient(180deg, #FFE58A 0%, #FFD24A 48%, #C9971F 100%);
  --ease: cubic-bezier(0.2, 0.9, 0.24, 1);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #050409;
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body { display: flex; justify-content: center; }
[hidden] { display: none !important; }
button { font-family: inherit; color: inherit; cursor: pointer; border: none; background: none; padding: 0; -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; }
.ic { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ============================== App 容器 ============================== */
.app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(194, 35, 193, 0.24), transparent 62%),
    radial-gradient(90% 50% at 0% 20%, rgba(250, 22, 95, 0.16), transparent 60%),
    radial-gradient(100% 60% at 100% 30%, rgba(59, 232, 176, 0.06), transparent 58%),
    linear-gradient(180deg, #0B0A14 0%, #08070F 60%, #050409 100%);
}
.app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 44px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 58%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 58%);
}
.home {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 4px) 12px 0;
}

/* ============================== 顶栏 ============================== */
.appbar { flex: none; height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.app-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.app-logo {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2.5px;
}
.app-logo i { display: block; border-radius: 3px; box-shadow: 0 0 8px rgba(255, 255, 255, 0.16); }
.app-logo i:nth-child(1) { background: #FA165F; }
.app-logo i:nth-child(2) { background: #FFD24A; }
.app-logo i:nth-child(3) { background: #3BE8B0; }
.app-logo i:nth-child(4) { background: #C223C1; }
.app-name { min-width: 0; }
.app-name b { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: 0.05em; line-height: 1.1; }
.app-name span { display: block; margin-top: 2px; font-size: 8px; color: var(--text-2); letter-spacing: 0.04em; }
.app-actions { display: flex; align-items: center; gap: 6px; }
.coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 7px 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 210, 74, 0.32);
  background: linear-gradient(180deg, rgba(255, 210, 74, 0.16), rgba(255, 210, 74, 0.05));
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 228, 140, 0.22);
  font-variant-numeric: tabular-nums;
}
.coin-chip .ic { width: 13px; height: 13px; }
.coin-chip:active { transform: translateY(1px); }
.sound-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-2);
}
.sound-btn .ic { width: 14px; height: 14px; }

/* ============================== 分数 / 等级 / Next ============================== */
.stats { flex: none; height: 54px; display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.stat-score { flex: 1; min-width: 0; line-height: 1; }
.lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.26em;
  color: rgba(169, 163, 196, 0.66);
  margin-bottom: 3px;
}
.stat-score b {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 0.95;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 14px rgba(255, 210, 74, 0.24));
  font-variant-numeric: tabular-nums;
}
.stat-level { text-align: right; padding-bottom: 1px; }
.stat-level b { display: block; font-family: var(--font-mono); font-size: 17px; font-weight: 700; line-height: 1; }
.stat-next {
  width: 74px;
  padding: 4px 7px 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(29, 27, 51, 0.66), rgba(18, 17, 35, 0.32));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.stat-next .lbl { margin-bottom: 0; }
#next { display: block; width: 100%; height: 32px; }

/* ============================== 道具条 ============================== */
.powerbar { flex: none; height: 36px; display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.power {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px 0 5px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  transition: opacity 0.15s, background 0.15s, transform 0.08s;
}
.power:active { transform: scale(0.97); }
.power:disabled { opacity: 0.42; }
.power__ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.power__ic .ic { width: 12px; height: 12px; }
.power__ic--pink { color: var(--pink-l); background: rgba(250, 22, 95, 0.12); }
.power__ic--mint { color: var(--mint); background: rgba(59, 232, 176, 0.1); }
.power__name { font-size: 9.5px; color: var(--text-2); }
.power__price { display: inline-flex; align-items: center; gap: 2px; font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--gold); }
.power__price .ic { width: 10px; height: 10px; }
.power-hint { margin-left: auto; font-size: 8.5px; color: var(--pink-l); white-space: nowrap; }
.slow-pill {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(59, 232, 176, 0.38);
  background: rgba(59, 232, 176, 0.08);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}
.slow-pill b { font-weight: 700; }

/* ============================== 棋盘 ============================== */
.stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 4px 0; }
.board-wrap {
  position: relative;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(180deg, #1D1B33 0%, #151329 42%, #0C0B16 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow:
    0 0 0 1px rgba(250, 22, 95, 0.15),
    0 20px 50px rgba(0, 0, 0, 0.62),
    0 0 54px rgba(194, 35, 193, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
#board {
  display: block;
  border-radius: 12px;
  background: #06050B;
  box-shadow: inset 0 0 42px rgba(194, 35, 193, 0.1), inset 0 2px 12px rgba(0, 0, 0, 0.9);
  touch-action: none;
}
.board-layer {
  position: absolute;
  inset: 6px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 12px;
  background: radial-gradient(70% 55% at 50% 42%, rgba(194, 35, 193, 0.16), rgba(6, 5, 11, 0.86));
}
.start-title { font-size: 11px; color: var(--text-2); letter-spacing: 0.08em; }
.revive-banner {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  width: calc(100% - 28px);
  padding: 11px 13px;
  border-radius: 14px;
  border: 1px solid rgba(59, 232, 176, 0.5);
  background: rgba(8, 24, 20, 0.94);
  box-shadow: 0 0 34px rgba(59, 232, 176, 0.22), inset 0 1px 0 rgba(59, 232, 176, 0.22);
  backdrop-filter: blur(8px);
}
.revive-banner .ic { width: 22px; height: 22px; color: var(--mint); }
.revive-banner b { display: block; font-size: 12.5px; color: var(--mint); letter-spacing: 0.08em; }
.revive-banner span { display: block; margin-top: 2px; font-size: 9px; color: rgba(214, 255, 240, 0.66); }
.revive-banner.is-show { animation: pop 0.4s var(--ease); }

/* ============================== 触控键 ============================== */
.pads { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.pad {
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(35, 32, 61, 0.96), rgba(18, 17, 35, 0.96));
  color: var(--text);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.06s ease;
  touch-action: none;
}
.pad .ic { width: 16px; height: 16px; }
.pad.is-down, .pad:active { transform: translateY(2px); box-shadow: 0 0 0 rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.pad--hard { color: var(--gold); border-color: rgba(255, 210, 74, 0.4); }

/* ============================== 底部主按钮 ============================== */
.actions { flex: none; margin-top: 8px; }
.btn-watch {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 16px;
  background: var(--grad-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 0 #8E0B39, 0 12px 26px rgba(250, 22, 95, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
  text-align: left;
  transition: transform 0.08s ease, opacity 0.15s;
}
.btn-watch:active { transform: translateY(2px); box-shadow: 0 2px 0 #8E0B39, 0 8px 18px rgba(250, 22, 95, 0.28); }
.btn-watch.is-limited, .btn-watch:disabled { filter: grayscale(0.55); opacity: 0.55; }
.btn-watch__ic {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-watch__ic .ic { width: 13px; height: 13px; fill: #fff; stroke: none; }
.btn-watch__text { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0.01em; line-height: 1.2; }
.btn-watch__text b { font-family: var(--font-mono); font-size: 14px; color: #FFE58A; margin-left: 1px; }
.btn-watch__text small { display: block; margin-top: 2px; font-size: 8.5px; font-weight: 400; color: rgba(255, 255, 255, 0.74); }
.home-safe { flex: none; height: calc(env(safe-area-inset-bottom) + 8px); }

/* ============================== 通用按钮 ============================== */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--grad-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 4px 0 #8E0B39, 0 10px 22px rgba(250, 22, 95, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 #8E0B39, 0 6px 14px rgba(250, 22, 95, 0.24); }
.btn-primary--sm { width: auto; min-height: 38px; padding: 8px 14px; font-size: 12px; }
.btn-primary--stack { flex-direction: column; gap: 2px; min-height: 52px; }
.btn-primary--stack span { font-size: 13.5px; font-weight: 700; }
.btn-primary--stack small { font-size: 8.5px; font-weight: 400; opacity: 0.72; }
.btn-gold {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 210, 74, 0.44);
  background: linear-gradient(180deg, rgba(255, 210, 74, 0.13), rgba(255, 210, 74, 0.035));
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 228, 140, 0.18);
}
.btn-gold b { font-family: var(--font-mono); font-size: 14px; }
.btn-gold:active { transform: translateY(2px); }
.btn-gold.is-disabled, .btn-gold:disabled { opacity: 0.48; filter: grayscale(0.4); }
.btn-ghost {
  flex: 1;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}
.btn-ghost small { font-size: 8.5px; color: var(--text-2); margin-left: 4px; }
.btn-ghost:active { transform: translateY(2px); }
.btn-text { flex: 1; min-height: 38px; font-size: 11px; color: var(--text-2); text-align: center; }
.btn-text:active { color: var(--text); }
.btn-danger {
  flex: 1;
  min-height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(250, 22, 95, 0.5);
  background: rgba(250, 22, 95, 0.15);
  color: #FF9AB4;
  font-size: 12.5px;
  font-weight: 600;
}
.round-btn {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
}
.round-btn .ic { width: 15px; height: 15px; }

/* ============================== 全屏播放器 ============================== */
.player { position: fixed; inset: 0; z-index: 60; background: #000; overflow: hidden; }
#video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.player-shade { position: absolute; left: 0; right: 0; pointer-events: none; }
.player-shade--top { top: 0; height: 180px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent); }
.player-shade--bottom { bottom: 0; height: 260px; background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 8%, rgba(0, 0, 0, 0.46) 55%, transparent); }
.player-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 14px 0;
}
.player-title { flex: 1; min-width: 0; }
.player-title strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.player-title span {
  display: block;
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(233, 196, 106, 0.8);
}
.player-pill {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--grad-gold);
  color: #1A1305;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 0 16px rgba(255, 210, 74, 0.3);
}
.player-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 0 18px calc(env(safe-area-inset-bottom) + 24px);
}
.player-goal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 11px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 210, 74, 0.38);
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(6px);
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 600;
}
.player-goal .ic { width: 13px; height: 13px; }
.player-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.player-rail { height: 100%; }
.player-rail i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad-gold);
  box-shadow: 0 0 12px rgba(255, 210, 74, 0.6);
  transition: width 0.16s linear;
}
.player-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
}
.earn {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(60% 42% at 50% 42%, rgba(7, 6, 12, 0.4), rgba(4, 3, 8, 0.92));
  backdrop-filter: blur(2px);
}
.earn-card {
  width: 100%;
  max-width: 300px;
  padding: 24px 20px 20px;
  border-radius: 24px;
  text-align: center;
  border: 1px solid rgba(233, 196, 106, 0.34);
  background: linear-gradient(180deg, rgba(22, 19, 13, 0.96), rgba(7, 6, 12, 0.98));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(233, 196, 106, 0.24);
  animation: modalIn 0.36s var(--ease);
}
.earn-coin {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #1A1305;
  background: var(--grad-gold);
  box-shadow: 0 0 30px rgba(255, 210, 74, 0.35);
}
.earn-coin .ic { width: 26px; height: 26px; stroke-width: 1.8; }
.earn-kicker { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.24em; color: rgba(233, 196, 106, 0.72); }
.earn-num {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 20px rgba(255, 210, 74, 0.3));
}
.earn-balance { margin: 8px 0 16px; font-family: var(--font-mono); font-size: 9px; color: rgba(169, 163, 196, 0.62); }

/* ============================== GAME OVER ============================== */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
  background: rgba(4, 3, 9, 0.74);
  backdrop-filter: blur(9px);
  animation: fadeIn 0.22s ease;
}
.over-card {
  position: relative;
  width: 100%;
  max-width: 352px;
  padding: 20px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(33, 30, 57, 0.98) 0%, rgba(13, 11, 23, 0.99) 52%, rgba(8, 7, 14, 0.99) 100%);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: modalIn 0.32s var(--ease);
}
.over-glow { position: absolute; top: -80px; left: 50%; width: 260px; height: 180px; transform: translateX(-50%); background: radial-gradient(circle, rgba(250, 22, 95, 0.26), transparent 66%); pointer-events: none; }
.over-kicker { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.4em; color: var(--pink-l); text-shadow: 0 0 16px rgba(250, 22, 95, 0.5); }
.over-score {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 22px rgba(255, 210, 74, 0.28));
  font-variant-numeric: tabular-nums;
}
.over-best { margin-top: 5px; text-align: center; font-size: 9.5px; color: var(--text-2); }
.over-stats { display: flex; margin-top: 14px; padding: 9px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.over-stats div { flex: 1; text-align: center; border-left: 1px solid var(--line-soft); }
.over-stats div:first-child { border-left: none; }
.over-stats span { display: block; font-size: 8px; color: rgba(169, 163, 196, 0.7); letter-spacing: 0.1em; }
.over-stats b { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.over-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.over-actions .btn-text { min-height: 34px; }
.over-note { margin: 4px 0 0; text-align: center; font-size: 8.5px; color: rgba(169, 163, 196, 0.66); }

/* ============================== 退出确认 ============================== */
.modal-layer--confirm { z-index: 95; }
.confirm-card {
  width: 100%;
  max-width: 294px;
  padding: 22px 20px 18px;
  border-radius: 22px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(33, 30, 57, 0.98), rgba(9, 8, 16, 0.99));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
  animation: modalIn 0.3s var(--ease);
}
.confirm-ic {
  width: 44px; height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--pink-l);
  background: rgba(250, 22, 95, 0.12);
  border: 1px solid rgba(250, 22, 95, 0.35);
}
.confirm-ic .ic { width: 19px; height: 19px; }
.confirm-card h3 { margin: 0; font-size: 17px; font-weight: 700; }
.confirm-card p { margin: 7px 0 0; font-size: 11px; line-height: 1.6; color: var(--text-2); }
.confirm-actions { display: flex; gap: 8px; margin-top: 17px; }

/* ============================== Toast ============================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 112px);
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100% - 40px);
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(29, 27, 51, 0.97);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  color: var(--text);
  font-size: 11.5px;
  text-align: center;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.toast.is-show { animation: toastIn 0.22s var(--ease); }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: var(--ink); color: var(--text); font-size: 14px; z-index: 999; }

/* ============================== 动画 ============================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { transform: translateY(14px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes pop { 0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0; } 60% { transform: translate(-50%, -50%) scale(1.02); opacity: 1; } 100% { transform: translate(-50%, -50%); opacity: 1; } }

/* ============================== 响应式 ============================== */
@media (max-height: 780px) {
  .appbar { height: 46px; }
  .stats { height: 48px; }
  .stat-score b { font-size: 26px; }
  .powerbar { height: 32px; }
  .power { height: 29px; }
  .pad { height: 32px; }
  .actions { margin-top: 6px; }
  .btn-watch { padding: 8px; }
  .home-safe { height: calc(env(safe-area-inset-bottom) + 6px); }
  .over-score { font-size: 46px; }
  .over-stats { margin-top: 10px; }
  .over-actions { margin-top: 10px; }
}
@media (max-width: 370px) {
  .app-name b { font-size: 13.5px; }
  .app-name span { font-size: 7.5px; }
  .coin-chip { font-size: 12px; padding: 0 6px 0 8px; }
  .sound-btn { width: 28px; height: 28px; }
  .btn-watch__text { font-size: 12px; }
  .toast { bottom: calc(env(safe-area-inset-bottom) + 104px); }
}
