:root {
  --bg-deep: #110719;
  --bg-mid: #1e0c29;
  --rose-gold: #f5c799;
  --rose-pink: #ff6fa5;
  --rose-deep: #d9467b;
  --cream: #fff6fa;
  --muted: #d5bfd1;
  --glass-bg: rgba(34, 15, 48, 0.74);
  --glass-border: rgba(245, 199, 153, 0.28);
  --shadow-glow: 0 18px 50px rgba(255, 111, 165, 0.22);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at 18% 12%, #2f1242 0%, #160921 48%, #0c0412 100%);
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hidden {
  display: none !important;
}

/* 顶部悬浮栏 */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(17, 7, 25, 0.92) 0%, rgba(17, 7, 25, 0) 100%);
  backdrop-filter: blur(8px);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--rose-gold);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose-pink);
  box-shadow: 0 0 10px var(--rose-pink);
  animation: pulseGlow 1.8s infinite;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.pill-btn:active {
  transform: scale(0.95);
}

.pill-btn-gold {
  border-color: rgba(245, 199, 153, 0.55);
  background: linear-gradient(135deg, rgba(245, 199, 153, 0.22), rgba(255, 111, 165, 0.18));
  color: var(--rose-gold);
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--rose-pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* 主容器 */
.page-shell {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0 auto;
  padding: 4px 16px 64px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow-glow);
  backdrop-filter: blur(16px);
}

/* ==================== 初始高交互欢迎仪式界面 ==================== */
.welcome-gate {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 25%, #3a1452 0%, #190826 55%, #090310 100%);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-gate.opening {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
}

.welcome-card {
  position: relative;
  width: 100%;
  max-width: 410px;
  padding: 36px 24px 30px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(56, 20, 76, 0.88), rgba(26, 9, 40, 0.94));
  border: 1.5px solid rgba(245, 199, 153, 0.55);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 50px rgba(255, 111, 165, 0.28);
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 76px;
  background: linear-gradient(180deg, rgba(245, 199, 153, 0.22), rgba(255, 111, 165, 0.04));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.55s ease, opacity 0.55s ease;
  pointer-events: none;
}

.welcome-card.unlocked .envelope-flap {
  transform: rotateX(180deg);
  opacity: 0.2;
}

.welcome-kicker {
  position: relative;
  z-index: 2;
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(245, 199, 153, 0.16);
  border: 1px solid rgba(245, 199, 153, 0.45);
  color: var(--rose-gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  margin-bottom: 14px;
}

.welcome-title {
  position: relative;
  z-index: 2;
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.38;
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 10%, #ffd8b0 55%, #ff8ebb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.welcome-desc {
  position: relative;
  z-index: 2;
  margin: 0 0 24px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.welcome-desc strong {
  color: #ffd98e;
}

.unlock-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.unlock-heart-btn {
  position: relative;
  width: 108px;
  height: 108px;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 130, 180, 0.35), rgba(245, 199, 153, 0.12));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  touch-action: manipulation;
  box-shadow: 0 0 32px rgba(255, 111, 165, 0.35);
  transition: transform 0.2s ease;
}

.unlock-heart-btn:active {
  transform: scale(0.94);
}

.unlock-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 4;
}

.ring-fg {
  fill: none;
  stroke: #ffd59e;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 302;
  stroke-dashoffset: 302;
  transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.unlock-heart-core {
  font-size: 42px;
  filter: drop-shadow(0 4px 14px rgba(255, 111, 165, 0.65));
  animation: pulseGlow 1.6s infinite;
}

.unlock-tip {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rose-gold);
  letter-spacing: 0.3px;
}

.welcome-burst-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

.burst-heart {
  position: absolute;
  left: 50%;
  top: 62%;
  font-size: 18px;
  pointer-events: none;
  animation: burstFly 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes burstFly {
  0% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.25) rotate(var(--rot));
    opacity: 0;
  }
}

/* Hero & 12月2日倒计时器 */
.hero-card {
  padding: 22px 18px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 140px;
  background: radial-gradient(ellipse at center, rgba(255, 111, 165, 0.26), transparent 70%);
  pointer-events: none;
}

.hero-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(120deg, #fff5f8 10%, #ffd5ad 55%, #ff8ebb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 6px 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.timer-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--rose-gold);
  margin-bottom: 10px;
}

.flip-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.flip-unit {
  min-width: 64px;
  padding: 10px 6px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 50%, rgba(0, 0, 0, 0.25) 51%, rgba(255, 255, 255, 0.06) 100%);
  border: 1px solid rgba(245, 199, 153, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.flip-num {
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1.1;
}

.flip-caption {
  margin-top: 4px;
  font-size: 10px;
  color: var(--rose-gold);
  letter-spacing: 0.6px;
}

.flip-sep {
  font-size: 20px;
  font-weight: 700;
  color: var(--rose-pink);
  margin-top: -12px;
}

/* 扭蛋币额度栏 */
.quota-bar {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(245, 199, 153, 0.16), rgba(255, 111, 165, 0.14));
}

.quota-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.coin-icon {
  font-size: 26px;
}

.quota-main {
  font-size: 14px;
  color: #fff;
}

.quota-main strong {
  font-size: 18px;
  color: #ffd98e;
  margin: 0 2px;
}

.quota-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

/* 章节 Tab */
.chapter-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chapter-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
}

.chapter-tab.active {
  background: linear-gradient(135deg, rgba(255, 111, 165, 0.28), rgba(245, 199, 153, 0.2));
  border-color: rgba(255, 151, 190, 0.75);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 111, 165, 0.24);
}

.tab-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.chapter-tab.active .tab-num {
  background: linear-gradient(135deg, var(--rose-pink), var(--rose-gold));
  color: #200926;
}

.tab-text {
  display: flex;
  flex-direction: column;
  font-size: 13.5px;
  font-weight: 700;
}

.tab-text small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.88;
  margin-top: 2px;
}

.chapter-section {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.chapter-section.active {
  display: flex;
  animation: fadeUp 0.35s ease;
}

/* ==================== 多球碰撞扭蛋机 ==================== */
.gacha-panel {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.gacha-machine {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gacha-top-crown {
  padding: 5px 18px;
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(90deg, #d9467b, #f5c799, #d9467b);
  color: #240928;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  box-shadow: 0 4px 16px rgba(245, 199, 153, 0.3);
}

.gacha-dome-wrap {
  position: relative;
  width: 300px;
  height: 250px;
  border-radius: 50% 50% 42% 42%;
  border: 3.5px solid rgba(245, 199, 153, 0.72);
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.2), rgba(38, 13, 55, 0.78) 72%);
  box-shadow: inset 0 0 34px rgba(255, 111, 165, 0.25), 0 12px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

#gacha-dome-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.gacha-glass-shine {
  position: absolute;
  top: 14px;
  left: 28px;
  width: 68px;
  height: 115px;
  border-radius: 50%;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0) 75%);
  transform: rotate(-22deg);
  pointer-events: none;
}

.gacha-body {
  width: 258px;
  margin-top: -14px;
  padding: 20px 16px 16px;
  border-radius: 22px 22px 28px 28px;
  background: linear-gradient(180deg, #ff7eb0 0%, #c93d75 65%, #992556 100%);
  border: 2px solid rgba(255, 224, 194, 0.65);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.knob-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.gacha-knob {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid #fff3e6;
  background: radial-gradient(circle at 30% 30%, #ffe6cc, #e8a773);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
  touch-action: none;
}

.gacha-knob.spinning {
  transform: rotate(360deg);
}

.knob-bar {
  width: 46px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #f2be8f);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.knob-hint {
  font-size: 11px;
  color: #fff6fa;
  opacity: 0.94;
}

.chute-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-height: 54px;
}

.chute-slot {
  width: 96px;
  height: 36px;
  border-radius: 12px;
  background: #230924;
  border: 2px solid rgba(255, 224, 194, 0.5);
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, 0.75);
}

.drop-capsule {
  margin-top: -22px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: transparent;
  padding: 0;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(255, 215, 160, 0.75);
  animation: capsuleDrop 0.65s cubic-bezier(0.22, 1.4, 0.36, 1), floatPulse 1.6s infinite 0.7s;
}

.cap-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(135deg, #ffd4a3, #ff82b2);
}

.cap-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(135deg, #ffffff, #ffe3ee);
}

.cap-glow {
  position: relative;
  z-index: 2;
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(34, 10, 42, 0.88);
  color: #ffd79f;
  font-size: 10px;
  font-weight: 700;
}

.gacha-cta-row {
  width: 100%;
}

/* ==================== 真手指刮刮乐舞台 ==================== */
.scratch-stage {
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeUp 0.35s ease;
}

.scratch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.scratch-badge {
  color: var(--rose-gold);
  font-weight: 600;
}

.scratch-progress-text {
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.scratch-card-frame {
  position: relative;
  width: 100%;
  min-height: 220px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(245, 199, 153, 0.7);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  user-select: none;
  -webkit-user-select: none;
}

.coupon-ticket {
  position: relative;
  width: 100%;
  min-height: 220px;
  padding: 24px 18px 16px;
  background: linear-gradient(135deg, #fff8f2 0%, #ffeaf2 55%, #ffdfcc 100%);
  color: #36132b;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.coupon-ticket.trap-ticket {
  background: linear-gradient(135deg, #2d123d 0%, #4a154b 55%, #2b0f36 100%);
  color: #ffe9f5;
}

.ticket-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e13b78, #f29a5e);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.coupon-ticket.trap-ticket .ticket-badge {
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
}

.ticket-serial {
  font-size: 11px;
  font-family: monospace;
  color: #8a5673;
}

.coupon-ticket.trap-ticket .ticket-serial {
  color: #d8b4fe;
}

.ticket-main {
  text-align: center;
  padding: 10px 4px;
}

.ticket-icon {
  font-size: 40px;
  line-height: 1.1;
}

.ticket-title {
  margin: 6px 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: #2f0d24;
}

.coupon-ticket.trap-ticket .ticket-title {
  color: #ffd78a;
}

.ticket-desc {
  margin: 0;
  font-size: 12.5px;
  color: #6b3c58;
  line-height: 1.48;
}

.coupon-ticket.trap-ticket .ticket-desc {
  color: #f3d0e8;
}

.ticket-divider {
  border-top: 2px dashed rgba(217, 70, 123, 0.3);
  margin: 6px 0;
}

.coupon-ticket.trap-ticket .ticket-divider {
  border-top-color: rgba(216, 180, 254, 0.35);
}

.ticket-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #7d4a67;
  font-weight: 600;
}

.coupon-ticket.trap-ticket .ticket-footer {
  color: #e9d5ff;
}

.redeemed-stamp {
  position: absolute;
  top: 16px;
  right: 12px;
  padding: 5px 11px;
  border: 2.5px solid #d93870;
  border-radius: 10px;
  color: #d93870;
  font-size: 12px;
  font-weight: 800;
  transform: rotate(-10deg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(217, 56, 112, 0.28);
  animation: stampIn 0.35s cubic-bezier(0.22, 1.5, 0.36, 1);
}

.redeemed-stamp.trap-stamp {
  border-color: #f59e0b;
  background: rgba(34, 9, 52, 0.95);
  color: #fde047;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

#scratch-canvas,
#scratch-spark-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#scratch-canvas {
  z-index: 4;
  cursor: crosshair;
  transition: opacity 0.45s ease;
}

#scratch-canvas.faded {
  opacity: 0;
  pointer-events: none;
}

#scratch-spark-canvas {
  z-index: 5;
  pointer-events: none;
}

.scratch-progress-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.scratch-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff75a7, #f5c799);
  transition: width 0.15s ease;
}

.trap-locked-banner {
  padding: 11px 13px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(236, 72, 153, 0.28));
  border: 1.5px solid rgba(253, 224, 71, 0.7);
  color: #fef08a;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.45;
}

.shop-link-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(245, 199, 153, 0.18);
  border: 1px solid rgba(245, 199, 153, 0.65);
  color: #ffe3b8;
  font-size: 13.5px;
  font-weight: 700;
}

/* 奖池概率公示 */
.odds-panel {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.odds-header {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.odds-header strong {
  font-size: 14px;
  color: var(--rose-gold);
}

.odds-header span {
  font-size: 11.5px;
  color: var(--muted);
}

.odds-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.odds-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
}

.odds-item.rarity-ssr {
  border-color: rgba(253, 224, 71, 0.55);
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.15), rgba(255, 111, 165, 0.12));
}

.odds-item.rarity-sr {
  border-color: rgba(255, 138, 190, 0.4);
}

.odds-item.rarity-trap {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(109, 40, 217, 0.14);
}

.odds-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.odds-pct {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.12);
  color: var(--rose-gold);
  white-space: nowrap;
}

.odds-item.rarity-ssr .odds-pct {
  background: linear-gradient(90deg, #fde047, #f59e0b);
  color: #261004;
}

.odds-item.rarity-trap .odds-pct {
  background: rgba(167, 139, 250, 0.28);
  color: #e9d5ff;
}

/* 按钮 */
.primary-btn {
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #ff6fa5 0%, #f5b988 100%);
  color: #240926;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255, 111, 165, 0.32);
  transition: transform 0.15s ease;
}

.primary-btn:active {
  transform: scale(0.97);
}

.primary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pulse-glow {
  animation: btnPulse 2s infinite;
}

.scratch-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.secondary-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ghost-btn {
  padding: 10px 12px;
  border-radius: 13px;
  border: 1px solid rgba(245, 199, 153, 0.4);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.gold-outline-btn {
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid rgba(245, 199, 153, 0.65);
  background: rgba(245, 199, 153, 0.16);
  color: var(--rose-gold);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

/* ==================== 默契闯关 ==================== */
.quiz-shell {
  padding: 18px 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.star-bridge {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bridge-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--rose-gold);
}

.bridge-status {
  color: var(--muted);
  font-size: 11.5px;
}

.bridge-track {
  position: relative;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.bridge-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 111, 165, 0.2), rgba(245, 199, 153, 0.25), rgba(255, 111, 165, 0.2));
  opacity: 0.4;
}

.avatar-chip {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: left 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), right 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-boy {
  left: 6px;
}

.avatar-girl {
  right: 6px;
}

.bridge-center-heart {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0.35;
  transition: all 0.4s ease;
}

.bridge-center-heart.lit {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.3);
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quiz-step-pill {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 111, 165, 0.22);
  border: 1px solid rgba(255, 111, 165, 0.45);
  color: #ffc8de;
  font-size: 12px;
  font-weight: 700;
}

.hint-toggle-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 199, 153, 0.4);
  background: rgba(245, 199, 153, 0.12);
  color: var(--rose-gold);
  font-size: 12px;
  cursor: pointer;
}

.quiz-question-title {
  margin: 14px 0 12px;
  font-size: 17.5px;
  line-height: 1.5;
  color: #fff;
}

.quiz-hint-bubble {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(245, 199, 153, 0.14);
  border: 1px dashed rgba(245, 199, 153, 0.5);
  color: #ffe3c4;
  font-size: 13px;
  margin-bottom: 12px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option-btn {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  font-size: 14.5px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-option-btn:hover {
  border-color: rgba(245, 199, 153, 0.55);
  background: rgba(255, 255, 255, 0.11);
}

.quiz-option-btn.wrong {
  border-color: #ff6b8b;
  background: rgba(255, 80, 115, 0.2);
  animation: shakeX 0.38s ease;
}

.quiz-option-btn.correct {
  border-color: #7ef2b6;
  background: rgba(70, 224, 150, 0.22);
}

.opt-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.quiz-feedback {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 107, 139, 0.18);
  border: 1px solid rgba(255, 107, 139, 0.45);
  color: #ffd6df;
  font-size: 13px;
}

.tease-pass-wrap {
  margin-top: 12px;
}

.tease-pass-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1.5px dashed #ff9ac2;
  background: rgba(255, 111, 165, 0.18);
  color: #ffe2ee;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.memory-polaroid {
  padding: 18px 16px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255, 245, 249, 0.12), rgba(245, 199, 153, 0.14));
  border: 1px solid rgba(245, 199, 153, 0.5);
  text-align: center;
  animation: fadeUp 0.35s ease;
}

.coin-reward-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fde047, #f59e0b);
  color: #291202;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}

.polaroid-note {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #fff;
}

.quiz-reward-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-cleared-box {
  text-align: center;
  padding: 12px 6px;
  animation: fadeUp 0.4s ease;
}

.cleared-emoji {
  font-size: 42px;
  margin-bottom: 8px;
}

.quiz-cleared-box h3 {
  margin: 0 0 8px;
  font-size: 19px;
  color: var(--rose-gold);
}

.quiz-cleared-box p {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* ==================== 弹窗与陷阱强效弹窗 ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 4, 15, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 22px 18px 20px;
  max-height: 85vh;
  overflow-y: auto;
}

.trap-modal-card {
  border: 2px solid #fbbf24;
  background: linear-gradient(155deg, rgba(49, 16, 68, 0.96), rgba(26, 9, 38, 0.98));
  text-align: center;
  animation: stampIn 0.4s cubic-bezier(0.22, 1.4, 0.36, 1);
}

.trap-devil-emoji {
  font-size: 44px;
  margin-bottom: 6px;
}

.trap-stamp-headline {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 14px;
  border: 2px dashed #fde047;
  background: rgba(245, 158, 11, 0.16);
  color: #fde047;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 12px;
}

.trap-modal-desc {
  font-size: 13.5px;
  color: #f5d0fe;
  line-height: 1.55;
  margin: 8px 0 14px;
}

.trap-notice-box {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.32);
  color: #fde68a;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.modal-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 111, 165, 0.22);
  color: #ffb8d4;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.modal-sub {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.quick-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.quick-note-chip {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(245, 199, 153, 0.45);
  background: rgba(245, 199, 153, 0.12);
  color: var(--rose-gold);
  font-size: 12px;
  cursor: pointer;
}

textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 12px;
}

.wallet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(245, 199, 153, 0.28);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.wallet-item.wallet-trap {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(88, 28, 135, 0.22);
}

.wallet-item-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.wallet-item-icon {
  font-size: 26px;
}

.wallet-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.wallet-item-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

.wallet-use-btn {
  padding: 7px 11px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #ff6fa5, #f5c799);
  color: #240926;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.wallet-status-pill {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(126, 242, 182, 0.18);
  color: #8af3be;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.wallet-status-pill.trap-pill {
  background: rgba(250, 204, 21, 0.2);
  color: #fde047;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 90;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(34, 14, 48, 0.95);
  border: 1px solid rgba(245, 199, 153, 0.6);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  max-width: 92vw;
  text-align: center;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

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

@keyframes capsuleDrop {
  0% { transform: translateY(-48px) scale(0.6); opacity: 0; }
  70% { transform: translateY(4px) scale(1.06); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes floatPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes stampIn {
  0% { transform: scale(1.7) rotate(-18deg); opacity: 0; }
  100% { transform: scale(1) rotate(-10deg); opacity: 1; }
}

@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(255, 111, 165, 0.35); }
  50% { box-shadow: 0 10px 34px rgba(255, 111, 165, 0.7); }
}
