/* ===== 全局 ===== */
@font-face {
  font-family: 'KaiTi';
  src: url('src/assets/fonts/simkai.ttf') format('truetype');
  font-display: swap;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; }
body {
  display: flex; align-items: center; justify-content: center;
  background: #231f20; /* 与舞台同底色，杜绝黑边 */
  font-family: 'KaiTi', 'Kaiti SC', 'STKaiti', 'SimSun', serif;
  -webkit-user-select: none; user-select: none;
  overflow: hidden;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* ===== 舞台：始终铺满整屏（长边对长边、短边对短边） ===== */
.app {
  position: fixed;
  top: 0;
  left: 0;
  container-type: inline-size;
  width: 100vw;
  height: 100vh;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  background: #231f20;
}

/* 竖屏时整体旋转 90°，让网页长边(宽)对应屏幕长边(高)、短边对应短边；内部布局完全不动 */
@media (orientation: portrait) {
  .app {
    width: 100vh;
    height: 100vw;
    width: 100dvh;
    height: 100dvw;
    left: 100vw;
    transform: rotate(90deg);
    transform-origin: top left;
  }
}

/* ===== 背景层 ===== */
.bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  z-index: 0;
}

/* 左上角一束光（轻微光影，动态呼吸） */
.app::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 55%;
  height: 55%;
  background: radial-gradient(circle at 0 0, rgba(255, 246, 214, 0.22), rgba(255, 246, 214, 0) 65%);
  pointer-events: none;
  z-index: 2;
  animation: lightPulse 5s ease-in-out infinite;
}
@keyframes lightPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

/* ===== 1. 顶部标题栏 ===== */
.top-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 10%;
  display: flex; align-items: flex-start;
  gap: 12px; padding: 0.3cqw 0 0 0.7cqw;
  z-index: 10;
}
.title-plaque {
  height: 70%;
  padding: 0 1.35cqw;
  transform: translateX(-0.8cqw);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: rgba(255, 233, 176, 0.85);
  font-size: clamp(18px, 2.4cqw, 34px);
  font-weight: bold; letter-spacing: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
.back-btn {
  height: 58%;
  padding: 0 16px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7); cursor: pointer;
  font-size: clamp(12px, 1.4cqw, 20px);
}
.back-btn:hover { background: rgba(255, 255, 255, 0.08); }
.back-btn--right { margin-left: auto; margin-right: 0.7cqw; }

/* ===== 2. 左侧导航菜单 ===== */
.left-nav {
  position: absolute; left: 0; top: 10%; bottom: 12.5%;
  width: 19%;
  display: flex; flex-direction: column; gap: 3%;
  padding: 2% 3%;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 10;
}
.left-nav::-webkit-scrollbar { display: none; }
.nav-btn {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 609 / 278;
  border: none;
  background: url('src/assets/ui/按钮背景左侧.png') center / 100% 100% no-repeat;
  color: #c3ae6b; cursor: pointer; /* 金黄偏灰 */
  font-size: 2.2cqw; letter-spacing: 0.1cqw; white-space: nowrap; /* 四个字的文字约占按钮宽度 70% */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  transition: filter 0.15s ease, transform 0.15s ease;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.nav-btn:hover { filter: brightness(1.2); transform: scale(1.03); }
.nav-btn.active {
  filter: brightness(1.22) drop-shadow(0 0 0.55cqw rgba(255, 214, 79, 0.9));
  transform: scale(1.04);
}
.nav-btn.active .nav-label { color: #ffe9a8; }
.nav-label { line-height: 1; }
.nav-own { margin-top: 0.3cqw; font-size: 1.3cqw; color: #e8d5b0; /* 白棕色 */ }

/* ===== 3. 中央主视觉：宝箱 ===== */
.center-visual { position: absolute; inset: 0; z-index: 1; }
.chest { position: absolute; inset: 0; }
.chest-left,
.chest-right {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 31.25%;  /* 600 / 1920 */
  height: 100%;   /* 1080 / 1080 */
  z-index: 2;
  opacity: 0;
  transition: transform 1s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.3s ease;
}
.chest-left  { left: 35.425%; } /* 往左一点 */
.chest-right { left: 67.72%; }  /* 往左一点 */
/* 开盒：原图层里的盒子两半往两边移动一点 */
.chest-open .chest-left  { transform: translate(calc(-50% - 15%), -50%); }
.chest-open .chest-right { transform: translate(calc(-50% + 15%), -50%); }
/* 龙旋转完后（开盒阶段）才显示盒子两半并移动 */
.chest-open .chest-left, .chest-open .chest-right {
  opacity: 1;
}
/* 盒子两半开完后就地淡出消失（不再往中间滑回，避免闭合动画） */
.chest-fade .chest-left,
.chest-fade .chest-right {
  opacity: 0;
}
.chest-dragon {
  position: absolute;
  left: 51.5%;   /* 盒子中心 (982.5 / 1920) */
  top: 47.1%;
  transform: translate(-50%, -50%);
  width: 24%;  /* 253 * 2 / 1920 */
  z-index: 1;
}
/* 抽奖旋转：原图层上的龙旋转 */
.chest-rotate .chest-dragon { animation: dragonspin 2.1s linear; }
@keyframes dragonspin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== 中心放射光效（抽取时：光环 + 放射光线 + 粒子 + 外柔光，绕中心多层展开） ===== */
.chest-fx { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

/* 扩散光环（3 层，交错延迟） */
.fx-ring {
  position: absolute; left: 51.5%; top: 47.1%;
  width: 20cqw; height: 20cqw;
  transform: translate(-50%, -50%) scale(0.2);
  border-radius: 50%;
  border: 0.14cqw solid #ffd34d;
  box-shadow: 0 0 1cqw #ffd34d, inset 0 0 0.8cqw rgba(255, 230, 150, 0.8);
  opacity: 0;
}
.fx-ring-2 {
  border-color: #ffb020;
  box-shadow: 0 0 1.2cqw #ffb020, inset 0 0 1cqw rgba(255, 200, 80, 0.6);
}
.fx-ring-3 {
  border-color: #ffa21a;
  box-shadow: 0 0 1.4cqw #ffa21a, inset 0 0 1.1cqw rgba(255, 170, 50, 0.5);
}
.chest-open .fx-ring   { animation: fxRing 1s ease-out forwards; }
.chest-open .fx-ring-2 { animation: fxRing 1s ease-out forwards 0.12s; }
.chest-open .fx-ring-3 { animation: fxRing 1s ease-out forwards 0.24s; }
@keyframes fxRing {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  30%  { opacity: 1; transform: translate(-50%, -50%) scale(0.75); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

/* 中心圆形光核：梯形光在中心汇聚成的圆（直径 = 梯形长度，覆盖内半段） */
.fx-core {
  position: absolute; left: 51.5%; top: 47.1%;
  width: 16cqw; height: 16cqw;
  transform: translate(-50%, -50%) scale(0.3);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 255, 240, 1) 0%,
    rgba(255, 250, 200, 0.98) 22%,
    rgba(255, 236, 120, 0.9) 45%,
    rgba(255, 215, 40, 0.5) 70%,
    rgba(255, 200, 40, 0) 100%);
  mix-blend-mode: screen;
  opacity: 0;
}
.chest-rotate .fx-core { animation: fxCore 1.5s ease-out forwards; }
@keyframes fxCore {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  40%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05); }
}

/* 放射光线（8 根均匀对称的金黄色光束，叠加混合发光，模拟 Unity 级光效） */
.fx-segments { position: absolute; inset: 0; }
.fx-segment {
  position: absolute; left: 51.5%; top: 47.1%;
  width: 16cqw; height: 10cqw;
  transform-origin: 0 50%;
  transform: translateY(-50%) rotate(var(--r));
  mix-blend-mode: screen; /* 光束叠加，重叠处更亮，形成中心热核 */
  opacity: 0;
}
/* 光束主体：金黄渐变，内亮外淡，外端羽化 */
.fx-segment .trap {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(255, 253, 235, 0) 0%,
    rgba(255, 250, 200, 0.98) 10%,
    #fff0a0 32%,
    #ffe55c 52%,
    #ffd700 72%,
    #ffc800 88%,
    rgba(255, 200, 40, 0.1) 100%);
  clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 60%);
  -webkit-mask: linear-gradient(90deg, transparent 0%, transparent 50%, #000 60%, #000 72%, transparent 100%);
          mask: linear-gradient(90deg, transparent 0%, transparent 50%, #000 60%, #000 72%, transparent 100%);
  filter: blur(0.06cqw);
}
.chest-rotate .fx-segment {
  animation: fxSegment 1.5s ease-out forwards;
  animation-delay: calc(var(--i) * 0.03s);
}
@keyframes fxSegment {
  0%   { opacity: 0; transform: translateY(-50%) rotate(var(--r)) scaleX(0.2); }
  40%  { opacity: 1; transform: translateY(-50%) rotate(calc(var(--r) + 18deg)) scaleX(1); }
  100% { opacity: 0; transform: translateY(-50%) rotate(calc(var(--r) + 34deg)) scaleX(1.15); }
}

/* 末尾：中心强光 */
.fx-flash {
  position: absolute; left: 51.5%; top: 47.1%;
  width: 20cqw; height: 20cqw;
  transform: translate(-50%, -50%) scale(0.2);
  /* 中心亮核：小而亮、快速衰减，是一团强光而非实心圆饼 */
  background: radial-gradient(circle,
    rgba(255, 255, 250, 1) 0%,
    rgba(255, 240, 160, 0.9) 14%,
    rgba(255, 220, 90, 0.45) 30%,
    rgba(255, 200, 60, 0) 48%);
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease; /* 去掉 class 时光平滑淡出（含缩放回位），不突兀 */
}
.chest-light .fx-flash { animation: fxFlash 1s ease-out forwards; }
@keyframes fxFlash {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  40%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.5); }
}

/* 末尾：范围大的弱光 */
.fx-outer {
  position: absolute; left: 51.5%; top: 47.1%;
  width: 46cqw; height: 46cqw;
  transform: translate(-50%, -50%) scale(0.3);
  background: radial-gradient(circle at center,
    rgba(255, 235, 140, 0.65) 0%,
    rgba(255, 200, 80, 0.4) 40%,
    rgba(255, 150, 30, 0.2) 70%,
    transparent 100%);
  filter: blur(1cqw);
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease; /* 去掉 class 时光平滑淡出（含缩放回位），不突兀 */
}
.chest-light .fx-outer { animation: fxOuter 1.5s ease-out forwards; }
@keyframes fxOuter {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
  45%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.7); }
}

/* ===== Canvas 光效层 =====
   原来的光效是 3 个同心圆环 + 8 根等分光束 + 实心光核，全部由 CSS 关键帧驱动，
   角度等分、长度相同、时间同步，所以看起来像风扇，很死板。
   现由 lightfx.js 用 Canvas 2D + 加法混合接管：
     · 78 根光束，各自独立的长度/宽度/亮度/闪烁相位/转速
     · 冲击波圆环带角向扰动，不是正圆
     · 汇聚光点 → 爆发火花 → 余烬的多层粒子
     · 热核过曝 + 屏幕震动 + 横向变形光斑
   下面隐藏被取代的 CSS 图层，只留一层很弱的外发光兜底。 */
.fx-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
  mix-blend-mode: screen;
}

.fx-ring,
.fx-segments,
.fx-core,
.fx-flash {
  display: none;
}

.fx-outer {
  background: radial-gradient(circle at center,
    rgba(255, 235, 150, 0.26) 0%,
    rgba(255, 200, 80, 0.14) 42%,
    rgba(255, 150, 30, 0.06) 72%,
    transparent 100%);
  filter: blur(1.2cqw);
}

/* 装饰占位（无对应资源） */
.deco {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed rgba(255, 255, 255, 0.45);
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.04);
  font-size: clamp(10px, 1cqw, 16px); letter-spacing: 2px;
}
.deco-scroll-left  { left: 23%; bottom: 24%; width: 10%; height: 18%; transform: rotate(-12deg); }
.deco-scroll-right { right: 23%; bottom: 24%; width: 10%; height: 18%; transform: rotate(12deg); }
.deco-candle { left: 29%; bottom: 16%; width: 6%; height: 15%; }
.deco-ribbon { left: 50%; top: 11%; width: 42%; height: 7%; transform: translateX(-50%); border-radius: 50% / 100%; }

/* ===== 4. 右侧奖励卡牌（人物 + 边框） ===== */
.right-card {
  position: absolute; right: 8%; top: 25%;
  height: 36%;
  z-index: 5;
}
/* 边框：人物背景.jpg，人物与边框间距 10px */
.card-frame {
  position: relative;
  display: inline-block;
  vertical-align: top;
  height: 100%;
  aspect-ratio: 1349 / 1920;
  padding: 0.26cqw; /* 原 5px，改用容器百分比，随屏幕等比缩放 */
  background-image: url('src/assets/ui/人物背景.jpg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  transform: rotate(5deg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* 金色水流边框流动特效（切换人物时触发，内外两条、1 秒内停止） */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.card-frame::before,
.card-frame::after {
  content: '';
  position: absolute;
  border-radius: 0.3cqw;
  background: conic-gradient(from var(--angle, 0deg),
    transparent 0deg,
    #8b6d2f 40deg,
    #ffd700 80deg,
    #fff6c0 110deg,
    #ffd700 140deg,
    transparent 200deg,
    transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
}

/* 外圈水流：贴边框外侧 */
.card-frame::before {
  inset: -0.22cqw;
  padding: 0.16cqw;
}

/* 内圈水流：贴边框内侧，起点与外圈错开 180° */
.card-frame::after {
  inset: 0.1cqw;
  padding: 0.13cqw;
  background: conic-gradient(from calc(var(--angle, 0deg) + 180deg),
    transparent 0deg,
    #8b6d2f 40deg,
    #ffd700 80deg,
    #fff6c0 110deg,
    #ffd700 140deg,
    transparent 200deg,
    transparent 360deg);
}

.card-frame.flowing::before,
.card-frame.flowing::after {
  animation: frameFlow 0.8s ease-out forwards;
}

@keyframes frameFlow {
  0%   { --angle: 0deg; opacity: 0; }
  8%   { opacity: 1; }
  72%  { opacity: 1; }
  100% { --angle: 720deg; opacity: 0; }
}
.card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.char-name {
  position: absolute; top: 1.2cqw; left: 0.5cqw;
  color: #e8d5b0; /* 白棕色 */
  font-size: 1.5cqw; font-weight: bold;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 0.1cqw;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 3;
}
.card-text {
  position: absolute; right: 0; bottom: 0.6cqw;
  transform: translateX(50%);
  width: auto; height: 8cqw;
}
.card-epic {
  position: absolute; right: 2.5cqw; top: -1.2cqw;
  transform: translateX(50%) rotate(-7deg);
  width: auto; height: 6cqw;
}

/* ===== 5. 底部操作按钮 ===== */
.bottom-bar {
  position: absolute; left: 0; right: 0; bottom: 1.5cqw;
  height: 12.5%;
  display: flex; align-items: flex-end; justify-content: center;
  gap: 6%;
  z-index: 10;
}
.main-btn {
  position: relative;
  width: 24%;
  aspect-ratio: 300 / 86;
  border: none; cursor: pointer;
  background-size: 100% 100%; background-repeat: no-repeat; background-position: center;
  background-color: transparent;
  transition: transform 0.12s ease, filter 0.4s ease;
}
.main-btn:hover:not(.disabled) { transform: scale(1.05); filter: brightness(1.1); }
.main-btn:active:not(.disabled) { transform: scale(0.97); }
.main-btn.disabled { cursor: not-allowed; filter: grayscale(0.4) brightness(0.8); }
.main-btn-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: clamp(18px, 2.2cqw, 32px); font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); letter-spacing: 4px;
}
.main-btn-sub {
  position: absolute; left: 0; right: 0; bottom: 6%;
  text-align: center;
  color: #ffe9b0; font-size: clamp(10px, 1.1cqw, 16px);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.fifty-col {
  width: 24%;
  display: flex; flex-direction: column; align-items: center;
}
.fifty-col .main-btn { width: 100%; }
.skip-label {
  margin-bottom: 0.2cqw;
  color: #e8d5b0; font-size: 1.1cqw;
  display: flex; align-items: center; gap: 0.2cqw;
  cursor: pointer; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.skip-label input {
  width: 1.2cqw; height: 1.2cqw; margin: 0; cursor: pointer;
  background: rgba(128, 128, 128, 0.55); /* 勾选框灰色背景 */
  accent-color: #808080;
}

/* ===== 6. 右下角功能按钮（占位） ===== */
.corner-btns {
  position: absolute; right: 2%; bottom: 5%;
  display: flex; gap: 12px;
  z-index: 95; /* 高于特惠/背包等面板，打开面板时右下角按钮仍可点击 */
}
.round-btn {
  position: relative;
  width: 4.5cqw; /* 用百分比随屏幕缩放，比原来稍大 */
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  cursor: pointer;
}
.round-btn:hover { filter: brightness(1.15); }
.corner-label {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  margin-top: 0.3cqw;
  white-space: nowrap;
  font-size: 1.2cqw;
  color: #e8d5b0; /* 白棕色，同上 */
  letter-spacing: 0.05cqw;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
/* 特惠按钮：按原图比例（2272×1792 横向标签）显示，不裁圆、不拉伸 */
#btn-deal {
  width: 5.7cqw;
  height: 4.5cqw;
  border-radius: 0;
  background-size: contain;
}

/* ===== 7. 抽取范围面板 ===== */
.pool-panel {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 32%;
  height: 46%;
  background: #6B5B4F;
  border: 0.05cqw solid rgba(255, 215, 0, 0.55);
  border-radius: 0.4cqw;
  padding: 0.7cqw;
  display: none;
  flex-direction: column;
  z-index: 92; /* 高于特惠/背包，打开奖励预览时浮在上层 */
}
.pool-panel.open { display: flex; }
.pool-header {
  flex: 0 0 auto;
  color: #ffd700; font-size: 1.6cqw; font-weight: bold;
  text-align: center; letter-spacing: 2px;
  margin-bottom: 0.5cqw;
}
.pool-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox 隐藏滚动条 */
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: center;
  column-gap: 0.9cqw;
  row-gap: 0.9cqw;
  align-content: start;
}
.pool-list::-webkit-scrollbar { display: none; } /* 隐藏滚动条 */

/* ===== 8. 背包面板 ===== */
.bag-panel {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: 56%;
  background: #4A3B2E;
  border: 0.05cqw solid rgba(255, 215, 0, 0.55);
  border-radius: 0.4cqw;
  padding: 0.7cqw;
  display: none;
  flex-direction: column;
  z-index: 90;
}
.bag-panel.open { display: flex; }
.bag-top {
  flex: 0 0 auto;
  position: relative;
  display: flex; align-items: center;
  margin-bottom: 0.5cqw;
}
.bag-tabs { display: flex; gap: 0.3cqw; }
.bag-tab {
  background: #4A3B2E;
  border: 0.05cqw solid rgba(255, 215, 0, 0.45);
  border-radius: 0.25cqw;
  color: #d9c9a8; font-size: 1cqw; font-weight: bold;
  letter-spacing: 1px;
  padding: 0.18cqw 0.7cqw;
  cursor: pointer;
}
.bag-tab.active {
  background: #6a8a3f;
  color: #fff3cf;
  border-color: rgba(255, 215, 0, 0.75);
}
.bag-tab:hover { filter: brightness(1.15); }
.bag-title {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: #ffd700; font-size: 1.5cqw; font-weight: bold;
  letter-spacing: 2px;
}
.bag-view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.bag-view.hidden { display: none; }
.bag-clear {
  flex: 0 0 auto;
  align-self: flex-end;
  margin-top: 0.3cqw;
  background: rgba(0, 0, 0, 0.3);
  border: 0.05cqw solid rgba(255, 215, 0, 0.5);
  border-radius: 0.2cqw;
  color: #e8d5b0; font-size: 1.1cqw;
  padding: 0.15cqw 0.5cqw;
  cursor: pointer;
}
.bag-clear:hover { filter: brightness(1.25); }
.bag-list {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 55%;
  overflow-y: auto;
  scrollbar-width: none;
  display: grid;
  grid-template-columns: repeat(6, auto);
  justify-content: center;
  column-gap: 0.9cqw;
  row-gap: 0.9cqw;
  align-content: start;
}
.bag-list::-webkit-scrollbar { display: none; }
.bag-empty {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.2cqw;
  text-align: center;
  padding: 3cqw 0;
}
.bag-stats {
  flex: 0 0 auto;
  margin-top: 0.3cqw;
  padding-top: 0.3cqw;
  border-top: 0.05cqw solid rgba(255, 215, 0, 0.3);
  max-height: 22%;
  overflow-y: auto;
  scrollbar-width: none;
  text-align: left;
  color: #e8d5b0; font-size: 1.0cqw; line-height: 1.5;
}
.bag-stats::-webkit-scrollbar { display: none; }
/* ===== 背包内：真实可兑换（盒子图标网格） ===== */
.exchange-section-title {
  flex: 0 0 auto;
  color: #e8d5b0; font-size: 1.15cqw;
  margin: 0.25cqw 0;
}
.exchange-owned {
  flex: 0 1 auto;
  min-height: 0;
  max-height: 46%;
  overflow-y: auto;
  scrollbar-width: none;
  display: grid;
  grid-template-columns: repeat(6, auto);
  justify-content: center;
  column-gap: 0.9cqw;
  row-gap: 0.9cqw;
  align-content: start;
}
.exchange-owned::-webkit-scrollbar { display: none; }
/* 盒子本身可点开启（只显示图标 + 数量，无按钮） */
.exchange-owned .exch-box { cursor: pointer; }
.exchange-owned .exch-box:hover { filter: brightness(1.12); }
.exchange-rewards {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  display: grid;
  grid-template-columns: repeat(6, auto);
  justify-content: center;
  column-gap: 0.9cqw;
  row-gap: 0.9cqw;
  align-content: start;
}
.exchange-rewards::-webkit-scrollbar { display: none; }
.exch-empty {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.2cqw;
  text-align: center;
  padding: 2cqw 0;
}
.bag-stat-total { font-size: 1.15cqw; color: #ffd700; margin-bottom: 0.25cqw; }
.bag-stat-title { margin-bottom: 0.15cqw; }
.bag-stat-none { color: rgba(255, 255, 255, 0.45); }
.bag-stat-records {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 0.8cqw;
}

/* ===== 9. 特惠商店面板（3 列网格，2 行完整可见 + 第 3 行露顶） ===== */
.deal-panel {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 44cqw;
  /* 高度用 cqw（=容器宽度），让“2 行完整 + 第 3 行露顶”不随屏幕长宽比跑偏 */
  height: 52cqw;
  background: rgba(58, 46, 36, 0.88); /* 深棕褐磨砂底 */
  backdrop-filter: blur(3px);
  border: 0.05cqw solid rgba(255, 215, 0, 0.5);
  border-radius: 0.4cqw;
  padding: 0.6cqw 0.8cqw;
  display: none;
  flex-direction: column;
  z-index: 90;
}
.deal-panel.open { display: flex; }
.deal-header {
  flex: 0 0 auto;
  color: #ffd700; font-size: 1.6cqw; font-weight: bold;
  text-align: center; letter-spacing: 2px;
  margin-bottom: 0.4cqw;
}
.deal-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto; /* 第 3 行可下滑查看完整档位 */
  scrollbar-width: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5cqw;
  align-content: start;
}
.deal-list::-webkit-scrollbar { display: none; }

/* 单张商品卡片 */
.deal-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 242, 214, 0.07); /* 比全局底稍亮 */
  border: 0.04cqw solid rgba(0, 0, 0, 0.45);
  border-radius: 0.35cqw;
  padding: 0.4cqw;
  box-shadow: inset 0 0 0.5cqw rgba(0, 0, 0, 0.35); /* 微弱内阴影 */
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.deal-title {
  font-size: 1.1cqw; color: #f7efdc; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 0.3cqw;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
/* 图标框：深色方形内框，礼盒图标沿用 reward-frame.jpeg 外框（方法同奖励展示） */
.deal-icon {
  position: relative; width: 100%; aspect-ratio: 1;
  padding: 0.15cqw;
  display: flex; align-items: center; justify-content: center;
  background: url('src/assets/ui/reward-frame.jpeg') center / 100% 100% no-repeat;
}
.deal-icon img { width: 100%; height: 100%; object-fit: cover; }
.deal-count {
  position: absolute; right: 0.2cqw; bottom: 0.15cqw;
  font-size: 0.85cqw; font-weight: bold; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.deal-limit {
  font-size: 0.68cqw; color: #b7ab93; text-align: left;
  margin: 0.28cqw 0.05cqw;
}
/* 购买按钮：橄榄绿长条，左元宝右价格 */
.deal-buy {
  display: flex; align-items: center; justify-content: center; gap: 0.35cqw;
  background: #5a7a3a;
  border: 0.04cqw solid rgba(0, 0, 0, 0.4);
  border-radius: 0.3cqw;
  color: #f7f0d8; font-size: 1.05cqw; font-weight: bold;
  padding: 0.24cqw 0;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.deal-buy:hover { filter: brightness(1.2); }
.deal-buy .deal-buy-icon { width: 1.4cqw; height: 1.4cqw; object-fit: contain; }

/* 元宝余额（右上角） */
.deal-yuanbao {
  flex: 0 0 auto;
  align-self: flex-end;
  display: flex; align-items: center; gap: 0.4cqw;
  color: #ffd700; font-size: 1.3cqw; font-weight: bold;
  margin-bottom: 0.4cqw;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.deal-yuanbao img { width: 1.9cqw; height: 1.9cqw; object-fit: contain; }
.deal-add-yuanbao {
  flex: 0 0 auto;
  width: 1.8cqw; height: 1.8cqw;
  display: flex; align-items: center; justify-content: center;
  border: 0.05cqw solid rgba(255, 215, 0, 0.65);
  border-radius: 50%;
  background: #5a4a3a;
  color: #ffd700; font-size: 1.2cqw; font-weight: bold;
  line-height: 1;
  cursor: pointer;
}
.deal-add-yuanbao:hover { filter: brightness(1.25); }
.deal-yuanbao.insufficient { color: #ff7b6b; animation: dealShake 0.4s ease; }
@keyframes dealShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-0.3cqw); }
  75% { transform: translateX(0.3cqw); }
}
/* 选中档位：金色描边高亮 */
.deal-card.selected {
  border-color: #ffd700;
  box-shadow: 0 0 0.6cqw rgba(255, 215, 0, 0.75), inset 0 0 0.5cqw rgba(0, 0, 0, 0.35);
}
/* 特惠购买确认层：独立新图层 */
.deal-confirm-mask {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 98;
}
.deal-confirm-mask.open { display: flex; }
.deal-confirm-box {
  display: flex; flex-direction: column; align-items: center; gap: 0.6cqw;
  min-width: 22cqw;
  padding: 1cqw 1.6cqw;
  background: rgba(58, 46, 36, 0.96);
  border: 0.06cqw solid rgba(255, 215, 0, 0.6);
  border-radius: 0.5cqw;
  box-shadow: 0 0.4cqw 1.6cqw rgba(0, 0, 0, 0.6);
}
.deal-confirm-name { color: #fff3cf; font-size: 1.5cqw; font-weight: bold; }
.deal-confirm-price { display: flex; align-items: center; gap: 0.4cqw; color: #ffd700; font-size: 1.6cqw; font-weight: bold; }
.deal-confirm-price img { width: 2.2cqw; height: 2.2cqw; object-fit: contain; }
.deal-confirm-qty {
  display: none;
  align-items: center; justify-content: center; gap: 0.5cqw;
  color: #e8d5b0; font-size: 1.1cqw;
}
.deal-confirm-qty input {
  width: 4.5cqw; padding: 0.2cqw 0.3cqw;
  background: rgba(0, 0, 0, 0.35); color: #ffd700;
  font-size: 1.1cqw; font-weight: bold; text-align: center;
  border: 0.05cqw solid rgba(255, 215, 0, 0.5); border-radius: 0.25cqw;
  outline: none;
}
.deal-confirm-qty input::-webkit-outer-spin-button,
.deal-confirm-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.deal-confirm-insufficient {
  display: none;
  color: #ff7b6b;
  font-size: 1cqw;
  font-weight: bold;
  text-align: center;
}
.deal-confirm-insufficient.show { display: block; animation: dealShake 0.4s ease; }
.deal-confirm-btns { display: flex; gap: 0.8cqw; margin-top: 0.3cqw; }
.deal-confirm-btn {
  padding: 0.4cqw 1.6cqw;
  font-size: 1.2cqw; font-weight: bold; letter-spacing: 1px;
  border-radius: 0.3cqw; border: 0.05cqw solid rgba(255, 215, 0, 0.55);
  cursor: pointer;
}
.deal-confirm-cancel { background: #5a4a3a; color: #d8cfb8; }
.deal-confirm-cancel:hover { filter: brightness(1.15); }
.deal-confirm-ok { background: #6a8a3f; color: #fff3cf; }
.deal-confirm-ok:hover { filter: brightness(1.2); }

/* 兑换码输入层 */
.redeem-mask {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99;
}
.redeem-mask.open { display: flex; }
.redeem-box {
  display: flex; flex-direction: column; align-items: center; gap: 0.6cqw;
  min-width: 24cqw;
  padding: 1cqw 1.6cqw;
  background: rgba(58, 46, 36, 0.96);
  border: 0.06cqw solid rgba(255, 215, 0, 0.6);
  border-radius: 0.5cqw;
  box-shadow: 0 0.4cqw 1.6cqw rgba(0, 0, 0, 0.6);
}
.redeem-title { color: #fff3cf; font-size: 1.5cqw; font-weight: bold; letter-spacing: 1px; }
.redeem-input {
  width: 100%;
  padding: 0.4cqw 0.7cqw;
  background: rgba(0, 0, 0, 0.3);
  border: 0.05cqw solid rgba(255, 215, 0, 0.55);
  border-radius: 0.3cqw;
  color: #fff3cf; font-size: 1.3cqw; letter-spacing: 2px;
  text-align: center; text-transform: uppercase;
  outline: none;
}
.redeem-input::placeholder { color: rgba(232, 213, 176, 0.5); letter-spacing: 1px; }
.redeem-input:focus { border-color: #ffd700; box-shadow: 0 0 0.5cqw rgba(255, 215, 0, 0.4); }
.redeem-error {
  display: none;
  color: #ff7b6b; font-size: 1cqw; font-weight: bold; text-align: center;
}
.redeem-error.show { display: block; animation: dealShake 0.4s ease; }
.redeem-btns { display: flex; gap: 0.8cqw; margin-top: 0.3cqw; }

/* ===== 抽奖弹窗 ===== */
.popup-mask {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; z-index: 100;
  pointer-events: none; /* 遮罩透明：关闭时点击穿透，不挡下面按钮 */
}
.popup-mask.open { pointer-events: auto; } /* 打开后可点空白处关闭弹窗 */
.popup {
  position: relative; width: 74%; height: 62%; overflow: hidden; pointer-events: auto;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.popup-mask.open .popup { opacity: 1; visibility: visible; }

/* 抽奖遮罩里的漂浮粒子：圆形 + 中间十字光芒（范围在弹窗内） */
.popup-particles {
  position: absolute; inset: 5.5cqw 5cqw 0; /* 只在遮罩（深色内容区）范围内 */
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}
.particle {
  position: absolute;
  border-radius: 50%;
  /* 圆形本体：灰色，贴近遮罩色调 */
  background: radial-gradient(circle,
    rgba(190, 190, 195, 0.55) 0%,
    rgba(150, 150, 155, 0.28) 45%,
    rgba(120, 120, 125, 0) 70%);
  opacity: 0;
  animation: particleTwinkle 4s ease-in-out infinite;
  will-change: transform, opacity;
}
.particle::before,
.particle::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
/* 横向十字：黄光，中间更亮，不超出圆形 */
.particle::before {
  width: 82%; height: 12%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 214, 90, 0.9) 38%,
    rgba(255, 250, 205, 1) 50%,
    rgba(255, 214, 90, 0.9) 62%,
    transparent 100%);
}
/* 纵向十字：黄光，中间更亮，不超出圆形 */
.particle::after {
  width: 12%; height: 82%;
  background: linear-gradient(0deg,
    transparent 0%,
    rgba(255, 214, 90, 0.9) 38%,
    rgba(255, 250, 205, 1) 50%,
    rgba(255, 214, 90, 0.9) 62%,
    transparent 100%);
}
@keyframes particleTwinkle {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.45); }
  25%  { opacity: 0.85; }
  50%  { opacity: 1; transform: translate(var(--dx, 0), var(--dy, -1.2cqw)) scale(1); }
  75%  { opacity: 0.85; }
  100% { opacity: 0; transform: translate(0, 0) scale(0.45); }
}

/* 内容区（盒子后面，开盒后露出） */
.content {
  position: absolute; left: 5cqw; right: 5cqw; top: 5.5cqw; bottom: 0;
  background: rgba(47, 39, 28, 0.79); /* 深褐遮罩，透明度 201/255 */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.04cqw; padding: 1cqw 2.083cqw; z-index: 1;
}
.title {
  position: absolute; top: 0cqw; left: 50%;
  transform: translateX(-50%) scale(9);
  width: 20cqw; opacity: 0; z-index: 3;
  transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.2s ease;
}
.popup.pop .title, .popup.burst .title { opacity: 1; transform: translateX(-50%) scale(1); }

/* 盒子左右两半 */
.box-left, .box-right {
  position: absolute; top: 0; height: 100%; width: 50%;
  object-fit: cover; z-index: 3;
  transition: transform 1s cubic-bezier(0.33, 1, 0.68, 1);
}
.box-left  { left: 0;  transform: translateX(0); }
.box-right { right: 0; transform: translateX(0); }
.popup.open .box-left, .popup.light .box-left, .popup.pop .box-left, .popup.burst .box-left { transform: translateX(-40%); }
.popup.open .box-right, .popup.light .box-right, .popup.pop .box-right, .popup.burst .box-right { transform: translateX(40%); }

/* 奖励格子 */
.reward-grid {
  width: 100%;
  max-height: calc(3 * 8cqw + 2 * 1.35cqw + 0.8cqw); /* 展示三排，其余下滑 */
  overflow-y: auto;
  scrollbar-width: none;
  padding: 0.6cqw 0.45cqw; /* 上下留白，避免稀有奖励光效被裁切 */
  display: grid;
  grid-template-columns: repeat(6, auto);
  grid-auto-rows: 8cqw;
  justify-content: center;
  column-gap: 1.35cqw;
  row-gap: 1.35cqw;
}
.reward-grid::-webkit-scrollbar { display: none; }
/* 行只作分组，交给网格定位：第一排居中，之后各行第一个与第一排第一个上下对齐 */
.reward-row { display: contents; }
.reward-item {
  position: relative; width: 4.167cqw;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.2cqw;
}
.reward-icon {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 0.15cqw; /* 图片与边框间距，随屏幕缩放 */
  display: flex; align-items: center; justify-content: center;
  background: url('src/assets/ui/reward-frame.jpeg') center / 100% 100% no-repeat;
}
.reward-icon img { width: 100%; height: 100%; object-fit: cover; }
/* 名称在图片下面 */
.reward-name {
  width: 100%;
  font-size: 0.625cqw; color: #fff; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
/* 数量标签在图片里（右下角） */
.reward-count {
  position: absolute; right: 0.15cqw; bottom: 0.15cqw;
  font-size: 0.677cqw; font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* ===== 奖励弹窗里的奖励项放大（仅作用于弹窗，不影响奖励预览/背包面板） ===== */
.reward-grid .reward-item { width: 6.25cqw; gap: 0.3cqw; }
.reward-grid .reward-icon { padding: 0.22cqw; }
.reward-grid .reward-name { font-size: 0.94cqw; }
.reward-grid .reward-count { font-size: 1.02cqw; right: 0.22cqw; bottom: 0.22cqw; }

/* ===== 稀有奖励：方形上升火焰边框（暖金多层发光 + 细碎光焰 + 呼吸脉动） ===== */
.reward-item.rare .reward-icon img { position: relative; z-index: 3; }
.reward-item.rare .reward-icon .reward-count { z-index: 6; }

/* 外层金黄光晕 */
.reward-item.rare .fx-glow {
  position: absolute; inset: -0.5cqw;
  background:
    radial-gradient(circle at 50% 0%,   rgba(255, 224, 130, 0.9) 0%, transparent 50%),
    radial-gradient(circle at 20% 50%,  rgba(255, 208, 96, 0.65) 0%, transparent 45%),
    radial-gradient(circle at 80% 50%,  rgba(255, 208, 96, 0.65) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(240, 180, 50, 0.55) 0%, transparent 45%);
  filter: blur(0.24cqw);
  z-index: 0; pointer-events: none;
  animation: glowPulse 2s ease-in-out infinite alternate;
}

/* 金黄渐变边框 */
.reward-item.rare .fx-gold {
  position: absolute; inset: -0.2cqw;
  border: 0.26cqw solid transparent;
  border-image: linear-gradient(180deg,
    rgba(255, 220, 120, 1) 0%,
    rgba(240, 180, 50, 1) 40%,
    rgba(200, 130, 20, 1) 100%) 1;
  filter: blur(0.03cqw);
  z-index: 2; pointer-events: none;
  animation: goldFrame 2s ease-in-out infinite alternate;
}

/* 内层白色亮边 */
.reward-item.rare .fx-white {
  position: absolute; inset: -0.1cqw;
  border: 0.14cqw solid #ffffff;
  box-shadow: 0 0 0.5cqw #fff7cc, 0 0 0.3cqw #ffd060, inset 0 0 0.3cqw rgba(255, 240, 180, 1);
  filter: blur(0.02cqw);
  z-index: 4; pointer-events: none;
  animation: whiteEdge 1.8s ease-in-out infinite alternate;
}

/* 方形边缘细碎火焰容器与四边 */
.reward-item.rare .fx-flames { position: absolute; inset: -0.26cqw; z-index: 1; pointer-events: none; }
.reward-item.rare .side { position: absolute; }
.reward-item.rare .side.top    { left: 0.2cqw; right: 0.2cqw; top: -0.36cqw; height: 0.73cqw; }
.reward-item.rare .side.bottom { left: 0.2cqw; right: 0.2cqw; bottom: -0.36cqw; height: 0.73cqw; }
.reward-item.rare .side.left   { top: 0.2cqw; bottom: 0.2cqw; left: -0.36cqw; width: 0.73cqw; }
.reward-item.rare .side.right  { top: 0.2cqw; bottom: 0.2cqw; right: -0.36cqw; width: 0.73cqw; }

/* 细碎火焰尖 / 大火苗 / 火星 */
.flame-tongue {
  position: absolute; width: 0.2cqw; height: 0.2cqw;
  background: radial-gradient(circle, #ffffff 0%, #ffd860 35%, #f0a020 65%, transparent 100%);
  border-radius: 50% 50% 20% 20%;
  filter: blur(0.03cqw); opacity: 1;
  animation: flameRise 1.6s ease-out infinite;
}
.flame-tongue.big {
  width: 0.34cqw; height: 0.34cqw;
  background: radial-gradient(circle, #fffbe0 0%, #ffd860 30%, #e09a1a 65%, transparent 100%);
  filter: blur(0.04cqw);
  animation: flameRiseBig 2s ease-out infinite;
}
.spark {
  position: absolute; width: 0.14cqw; height: 0.14cqw;
  background: #fff6c0; border-radius: 50%;
  box-shadow: 0 0 0.3cqw #ffd060, 0 0 0.5cqw #ffb428;
  opacity: 0;
  animation: sparkRise 1.4s ease-out infinite;
}

@keyframes whiteEdge {
  from { border-color: #ffffff; opacity: 0.85; }
  to   { border-color: #fff3b0; opacity: 1; }
}
@keyframes goldFrame {
  from { filter: blur(0.03cqw) brightness(1.05); }
  to   { filter: blur(0.05cqw) brightness(1.3); }
}
@keyframes glowPulse {
  from { transform: scale(1.06); opacity: 0.85; }
  to   { transform: scale(1.16); opacity: 1; }
}
@keyframes flameRise {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  20%  { opacity: 0.9; }
  100% { transform: translateY(-0.63cqw) scale(1.1); opacity: 0; }
}
@keyframes flameRiseBig {
  0%   { transform: translateY(0) scale(0.7); opacity: 0; }
  25%  { opacity: 1; }
  100% { transform: translateY(-0.94cqw) scale(1.2); opacity: 0; }
}
@keyframes sparkRise {
  0%   { transform: translateY(0); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(-0.83cqw); opacity: 0; }
}

/* ===== 清空确认弹窗 ===== */
.confirm-mask {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none; align-items: center; justify-content: center;
  z-index: 120;
}
.confirm-mask.open { display: flex; }
.confirm-box {
  background: #4A3B2E;
  border: 0.05cqw solid rgba(255, 215, 0, 0.55);
  border-radius: 0.4cqw;
  padding: 1cqw 1.5cqw;
  text-align: center;
}
.confirm-text {
  color: #e8d5b0; font-size: 1.2cqw;
  margin-bottom: 0.7cqw;
}
.confirm-btns { display: flex; justify-content: center; gap: 0.8cqw; }
.confirm-btn {
  background: rgba(0, 0, 0, 0.3);
  border: 0.05cqw solid rgba(255, 215, 0, 0.5);
  border-radius: 0.2cqw;
  color: #e8d5b0; font-size: 1.1cqw;
  padding: 0.2cqw 0.8cqw;
  cursor: pointer;
}
.confirm-btn:hover { filter: brightness(1.2); }

/* ===== 资源加载进度条 ===== */
.loading-overlay {
  position: absolute; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 17, 15, 0.92);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.loading-overlay.done {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.loading-box {
  width: 52%; text-align: center;
}
.loading-text {
  color: #ffd34d; font-size: 2.6cqw; letter-spacing: 3px;
  margin-bottom: 1.6cqw; text-shadow: 0 0 1cqw rgba(255, 211, 77, 0.6);
}
.loading-bar {
  height: 1.3cqw; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 0.08cqw solid rgba(255, 211, 77, 0.55);
}
.loading-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #c9942a, #ffd34d 45%, #fff3b0 55%, #ffd34d);
  border-radius: 999px;
  box-shadow: 0 0 1cqw rgba(255, 211, 77, 0.85);
  transition: width 0.2s ease;
}
.loading-percent {
  color: #e8d5b0; font-size: 1.5cqw; margin-top: 0.8cqw;
}

/* ===== 轻提示 ===== */
.toast {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translate(-50%, 1cqw);
  max-width: 70%;
  padding: 1cqw 3cqw;
  border-radius: 1.6cqw;
  background: rgba(18, 14, 12, 0.88);
  border: 0.08cqw solid rgba(255, 211, 77, 0.55);
  color: #ffd34d;
  font-size: 2.6cqw;
  letter-spacing: 1px;
  text-align: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
