/* ==========================================================================
   UTA 风格 - 工业级 PBR 武器箱与电影级横向卡片轮盘抽奖样式表
   ========================================================================== */

:root {
  --cs2-yellow: #f0ad28;
  --cs2-yellow-glow: rgba(240, 173, 40, 0.45);
  --cs2-dark-bg: #0c0f12;
  --cs2-panel-bg: rgba(14, 18, 22, 0.92);
  
  /* CS2 稀有度品质标准色系 */
  --rarity-gold: #ffd700;       /* 罕见特殊物品 (金色大奖) */
  --rarity-red: #eb4b4b;        /* 隐秘级 (红色) */
  --rarity-pink: #d32ce6;       /* 保密级 (粉紫色) */
  --rarity-purple: #8847ff;     /* 受限级 (紫色) */
  --rarity-blue: #4b69ff;       /* 军规级 (蓝色) */
  --rarity-gray: #607d8b;       /* 工业级 / 参与奖 (灰色) */

  --text-main: #ffffff;
  --text-muted: #8c9ba5;
  --text-desc: #b0bec5;
  --font-hud: 'Orbitron', 'Chakra Petch', sans-serif;
  --font-main: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-drag: none;
}

body.cs2-theme, html {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--cs2-dark-bg);
  font-family: var(--font-main);
  color: var(--text-main);
}

/* ================== 3D 画布容器与背景光晕 ================== */
#three-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  background: radial-gradient(circle at 50% 42%, #1a2026 0%, #101418 50%, #06080a 100%);
  transition: filter 0.4s ease, opacity 0.4s ease;
}

/* 开箱滚动时 3D 背景景深暗化虚化 */
body.spinning #three-container {
  filter: blur(5px) brightness(0.55);
}

/* ================== CS2 检视暗角遮罩 + 2. SVG 胶片微观噪点层 ================== */
.cs2-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 45%, transparent 35%, rgba(0, 0, 0, 0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

/* 叠加真实科技质感胶片颗粒噪点，消除纯色假感 */
.cs2-vignette::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.045;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ================== 主大屏容器 (16:9 横屏) ================== */
.screen-container {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 32px;
  pointer-events: none;
}

.top-header, .ticker-wrapper, .bottom-bar, .cs2-spinner-container, .stage-interaction-hint {
  pointer-events: auto;
}

/* ================== 顶部导航与大标题 ================== */
.top-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  height: 72px;
}

.header-left {
  display: flex;
  align-items: center;
}

/* 7. 双层金属描边状态徽章 */
.cs2-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 16, 20, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.12) inset, 0 4px 12px rgba(0,0,0,0.6);
  padding: 7px 18px;
  border-radius: 4px;
  backdrop-filter: blur(12px);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 8px #00ff88;
  animation: pulseGreen 1.6s infinite ease-in-out;
}

.badge-text {
  font-family: var(--font-hud);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--cs2-yellow);
  font-weight: 700;
}

.header-center {
  text-align: center;
}

.main-title-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 5. 字体粗细层次：副标题轻量化 */
.title-sub-cs2 {
  font-size: 13px;
  letter-spacing: 2.5px;
  color: #cfd8dc;
  margin-bottom: 2px;
  font-weight: 600;
  text-transform: uppercase;
}

.main-title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 3px;
  background: linear-gradient(180deg,
    #ffffff 0%,
    #fff2b8 15%,
    #f3b333 45%,
    #d49117 75%,
    #9e6406 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 15px rgba(240, 173, 40, 0.45)) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.9));
  white-space: nowrap;
}

.title-desc-sub {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1px;
  font-weight: 400;
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* 7. 双层金属描边导航按钮 */
.cs2-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(38, 46, 54, 0.9) 0%, rgba(18, 22, 26, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.15) inset, 0 4px 10px rgba(0,0,0,0.5);
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  border-radius: 4px;
}

.cs2-nav-btn:hover {
  background: linear-gradient(180deg, rgba(50, 60, 70, 0.95) 0%, rgba(25, 30, 36, 0.98) 100%);
  border-color: rgba(240, 173, 40, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(240, 173, 40, 0.4), 0 4px 15px var(--cs2-yellow-glow);
}

.cs2-nav-btn.highlight {
  background: linear-gradient(180deg,
    #ffeaa7 0%,
    #f3b333 12%,
    #c4821d 60%,
    #824e05 100%
  );
  color: #1a1509;
  font-weight: 800;
  border: 1px solid #fff5b3;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.5) inset, 0 4px 15px rgba(240, 173, 40, 0.4);
}

/* ================== 实时跑马灯 ================== */
.ticker-wrapper {
  display: flex;
  align-items: center;
  background: rgba(14, 18, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.1) inset, 0 6px 18px rgba(0,0,0,0.7);
  border-radius: 6px;
  margin: 4px auto 8px auto;
  max-width: 980px;
  width: 90%;
  height: 36px;
  padding: 0 15px 0 6px;
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.ticker-label {
  flex-shrink: 0;
  margin-right: 12px;
}

.ticker-badge {
  background: linear-gradient(180deg, #fff2b8 0%, #f0ad28 20%, #b87508 100%);
  color: #1a1509;
  font-size: 11px;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 4px;
  letter-spacing: 1.5px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}

.ticker-content-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-list {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: tickerSlide 26s linear infinite;
}

.ticker-item {
  font-size: 13px;
  color: var(--text-desc);
  font-weight: 400;
  padding-right: 45px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ticker-item b {
  color: #fff;
  font-weight: 700;
}

.ticker-item .gold {
  color: var(--cs2-yellow);
  font-weight: 800;
  text-shadow: 0 0 6px var(--cs2-yellow-glow);
}

/* ================== 主舞台与待机提示 ================== */
.main-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

.stage-interaction-hint {
  position: absolute;
  bottom: 25px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(12, 16, 20, 0.88);
  border: 1px solid rgba(240, 173, 40, 0.35);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.1) inset, 0 6px 20px rgba(0,0,0,0.7);
  padding: 8px 24px;
  border-radius: 6px;
  backdrop-filter: blur(12px);
  animation: hintPulse 2.5s infinite ease-in-out;
  transition: opacity 0.4s;
}

.hint-reticle {
  width: 10px;
  height: 10px;
  border: 2px solid var(--cs2-yellow);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cs2-yellow);
}

.hint-text {
  font-size: 14px;
  color: #ffeaa7;
  letter-spacing: 1px;
  font-weight: 500;
}

/* ================== CS2 经典横向奖品滑轨 (Reel Spinner) ================== */
.cs2-spinner-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  max-width: 1380px;
  display: none;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}

.cs2-spinner-container.active {
  display: flex;
  animation: fadeIn 0.35s ease;
}

.spinner-header-title {
  font-family: var(--font-hud);
  font-size: 15px;
  font-weight: 800;
  color: var(--cs2-yellow);
  letter-spacing: 3px;
  margin-bottom: 14px;
  text-shadow: 0 0 12px var(--cs2-yellow-glow);
}

/* 滑轨视口容器（深黑金属质感框 + 多层复合阴影） */
.cs2-reel-viewport {
  position: relative;
  width: 100%;
  height: 240px;
  background: rgba(8, 11, 14, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.15) inset,
    0 -25px 40px rgba(0,0,0,0.8) inset,
    0 0 0 2px rgba(0,0,0,0.9),
    0 20px 60px rgba(0, 0, 0, 0.95);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

/* 正中央黄色瞄准指针线 */
.cs2-center-marker {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  z-index: 60;
  pointer-events: none;
}

.marker-line {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #fff7cc 0%, #ffd700 30%, #e6a000 70%, #fff7cc 100%);
  box-shadow: 0 0 14px #ffd700, 0 0 28px rgba(255, 215, 0, 0.9);
}

.marker-pointer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
}
.marker-pointer.top {
  top: 0;
  border-top: 12px solid #ffd700;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.9));
}
.marker-pointer.bottom {
  bottom: 0;
  border-bottom: 12px solid #ffd700;
  filter: drop-shadow(0 -2px 5px rgba(0,0,0,0.9));
}

/* 左右两端深度羽化渐隐遮罩 */
.reel-fade-gradient {
  position: absolute;
  top: 0;
  width: 160px;
  height: 100%;
  z-index: 45;
  pointer-events: none;
}
.reel-fade-gradient.left {
  left: 0;
  background: linear-gradient(90deg, #080b0e 0%, rgba(8, 11, 14, 0) 100%);
}
.reel-fade-gradient.right {
  right: 0;
  background: linear-gradient(-90deg, #080b0e 0%, rgba(8, 11, 14, 0) 100%);
}

/* 横向滑动卡片长条 */
.cs2-reel-strip {
  display: flex;
  align-items: center;
  height: 100%;
  padding-left: 0;
  will-change: transform;
}

/* ================== 3. 多层复合物理阴影 CS2 奖品卡片 ================== */
.cs2-card {
  flex-shrink: 0;
  width: 180px;
  height: 210px;
  margin: 0 5px;
  background: linear-gradient(180deg,
    rgba(42, 50, 60, 0.9) 0%,
    rgba(25, 30, 36, 0.95) 40%,
    rgba(14, 18, 22, 0.98) 100%
  );
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,   /* 顶部细高光 */
    0 -20px 30px rgba(0,0,0,0.5) inset,     /* 内部渐暗 */
    0 0 0 1px rgba(0,0,0,0.8),              /* 外圈深边框 */
    0 4px 8px rgba(0,0,0,0.4),              /* 近硬阴影 */
    0 15px 30px rgba(0,0,0,0.6);            /* 远柔阴影营造悬浮感 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px 10px 10px;
  position: relative;
  overflow: hidden;
}

/* 6. 卡片稀有度条：多色标渐变 + 细微高光线 */
.cs2-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 7px;
  background: linear-gradient(180deg, #dce6ff 0%, var(--rarity-blue) 35%, #2540b8 100%);
  box-shadow: 0 0 10px var(--rarity-blue), 0 -1px 0 rgba(255,255,255,0.5) inset;
}

.cs2-card.gold::after {
  background: linear-gradient(180deg, #fff9d9 0%, var(--rarity-gold) 30%, #b8900a 100%);
  box-shadow: 0 0 14px var(--rarity-gold), 0 -1px 0 rgba(255,255,255,0.6) inset;
}
.cs2-card.red::after {
  background: linear-gradient(180deg, #ffd9d9 0%, var(--rarity-red) 30%, #a81e1e 100%);
  box-shadow: 0 0 12px var(--rarity-red), 0 -1px 0 rgba(255,255,255,0.6) inset;
}
.cs2-card.pink::after {
  background: linear-gradient(180deg, #ffd9fc 0%, var(--rarity-pink) 30%, #8a1399 100%);
  box-shadow: 0 0 12px var(--rarity-pink), 0 -1px 0 rgba(255,255,255,0.6) inset;
}
.cs2-card.purple::after {
  background: linear-gradient(180deg, #e7d9ff 0%, var(--rarity-purple) 30%, #511eb8 100%);
  box-shadow: 0 0 12px var(--rarity-purple), 0 -1px 0 rgba(255,255,255,0.6) inset;
}
.cs2-card.blue::after {
  background: linear-gradient(180deg, #dce6ff 0%, var(--rarity-blue) 30%, #203ca8 100%);
  box-shadow: 0 0 12px var(--rarity-blue), 0 -1px 0 rgba(255,255,255,0.6) inset;
}
.cs2-card.gray::after {
  background: linear-gradient(180deg, #e0e8ed 0%, var(--rarity-gray) 30%, #37474f 100%);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.4) inset;
}

.card-glow-bg {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.28;
  pointer-events: none;
}
.cs2-card.gold .card-glow-bg { background-color: var(--rarity-gold); opacity: 0.45; }
.cs2-card.red .card-glow-bg { background-color: var(--rarity-red); opacity: 0.4; }
.cs2-card.pink .card-glow-bg { background-color: var(--rarity-pink); opacity: 0.35; }
.cs2-card.purple .card-glow-bg { background-color: var(--rarity-purple); opacity: 0.35; }
.cs2-card.blue .card-glow-bg { background-color: var(--rarity-blue); opacity: 0.35; }

.card-icon-slot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  z-index: 2;
}

/* ================== 4. 高精度插画 SVG 图标系统 ================== */
.svg-art-icon {
  width: 90px;
  height: 90px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.6));
  transition: transform 0.2s ease;
}

.cs2-card:hover .svg-art-icon {
  transform: scale(1.05);
}

.card-title-box {
  width: 100%;
  text-align: center;
  padding-top: 4px;
  z-index: 2;
}

.card-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}

.card-tier {
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: 0.8px;
}

.cs2-card.gold .card-tier { color: var(--rarity-gold); }
.cs2-card.red .card-tier { color: var(--rarity-red); }
.cs2-card.pink .card-tier { color: var(--rarity-pink); }
.cs2-card.purple .card-tier { color: var(--rarity-purple); }
.cs2-card.blue .card-tier { color: var(--rarity-blue); }
.cs2-card.gray .card-tier { color: var(--rarity-gray); }

/* ================== 底部操作栏 ================== */
.bottom-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: var(--cs2-panel-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.12) inset, 0 15px 40px rgba(0, 0, 0, 0.8);
  padding: 14px 28px;
  backdrop-filter: blur(18px);
  gap: 20px;
  border-radius: 8px;
}

.bar-col-left {
  display: flex;
  align-items: center;
}

.cs2-info-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(10, 13, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.1) inset;
  padding: 8px 16px;
  border-radius: 4px;
}

.info-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.info-val {
  font-size: 12px;
  font-weight: 700;
  color: #00ff88;
}

.bar-col-center {
  display: flex;
  justify-content: center;
}

/* 1. 多色标金属渐变核心按钮 (高光窄、暗部宽) */
.btn-action-cs2 {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg,
    #fff5c9 0%,      /* 顶部强高光,窄 */
    #f3b333 8%,
    #d49117 45%,
    #a86e0c 75%,
    #7a4d06 100%     /* 底部暗部,宽 */
  );
  border: 1px solid #fffae0;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 -2px 5px rgba(0,0,0,0.4) inset,
    0 0 0 1px rgba(0,0,0,0.85),
    0 8px 25px rgba(240, 173, 40, 0.5);
  padding: 14px 55px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.25s ease;
}

.btn-action-cs2:hover {
  transform: scale(1.04);
  background: linear-gradient(180deg,
    #ffffff 0%,
    #ffd559 10%,
    #e6a01e 48%,
    #b87a0e 75%,
    #8a5608 100%
  );
  box-shadow:
    0 1px 0 rgba(255,255,255,0.8) inset,
    0 0 0 1px rgba(0,0,0,0.9),
    0 10px 32px rgba(240, 173, 40, 0.75);
}

.btn-action-cs2:active {
  transform: scale(0.98);
}

.btn-action-cs2 .btn-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-action-cs2 .btn-title {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #1a1509;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.6);
}

.btn-action-cs2 .btn-subtitle {
  font-family: var(--font-hud);
  font-size: 10px;
  color: #473205;
  letter-spacing: 1.5px;
  margin-top: 2px;
  font-weight: 700;
}

.btn-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
  transform: rotate(30deg);
  animation: btnShineAnim 3.5s infinite;
}

.bar-col-right {
  display: flex;
  justify-content: flex-end;
}

.prizes-showcase {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.prize-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* 统一高级黑金深浅胶囊，彻底移除杂乱彩色边框 */
.prize-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(12, 15, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.06) inset;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.prize-pill:hover {
  background: rgba(22, 28, 34, 0.95);
  border-color: rgba(240, 173, 40, 0.3);
}

.prize-pill .p-name {
  font-weight: 600;
  color: #cfd8dc;
}
.prize-pill .p-stock {
  color: var(--cs2-yellow);
  font-family: var(--font-hud);
  font-weight: 700;
}

/* ================== 中奖公布弹窗 ================== */
.result-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 8, 0.9);
  backdrop-filter: blur(14px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.result-modal-backdrop.show {
  display: flex;
  opacity: 1;
}

.result-modal-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-card {
  position: relative;
  z-index: 10;
  width: 600px;
  background: linear-gradient(180deg, #1e262e 0%, #101418 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.2) inset,
    0 0 0 1px rgba(0,0,0,0.9),
    0 25px 70px rgba(0, 0, 0, 0.95),
    0 0 50px rgba(240, 173, 40, 0.35);
  border-radius: 12px;
  padding: 36px 30px 28px 30px;
  text-align: center;
  transform: scale(0.8) translateY(30px);
  animation: modalPopIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.result-header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.modal-title-code {
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 800;
  color: var(--cs2-yellow);
  letter-spacing: 2px;
}

.result-winner-meta {
  font-size: 14px;
  color: var(--text-desc);
  font-weight: 400;
  margin-bottom: 16px;
}

.prize-display-box {
  margin: 16px auto 24px auto;
  background: rgba(8, 10, 13, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.08) inset;
  border-radius: 8px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prize-tier-badge {
  background: linear-gradient(180deg, #fff2b8 0%, #f0ad28 20%, #b87508 100%);
  color: #1a1509;
  font-size: 14px;
  font-weight: 900;
  padding: 4px 24px;
  border-radius: 4px;
  margin-bottom: 14px;
  letter-spacing: 2px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, 0 4px 10px rgba(0,0,0,0.4);
}

.prize-item-visual {
  margin: 10px 0 15px 0;
}

.prize-name {
  font-size: 36px;
  font-weight: 900;
  background: linear-gradient(180deg, #ffffff 0%, #ffeaa7 50%, #f0ad28 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 12px rgba(240, 173, 40, 0.5));
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.prize-desc {
  font-size: 13px;
  color: var(--text-desc);
  font-weight: 400;
}

.btn-modal-cs2 {
  background: linear-gradient(180deg,
    #fff5c9 0%,
    #f3b333 10%,
    #d49117 50%,
    #996005 100%
  );
  border: 1px solid #fffae0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 0 0 1px rgba(0,0,0,0.8), 0 6px 20px rgba(240, 173, 40, 0.4);
  color: #1a1509;
  font-size: 16px;
  font-weight: 900;
  padding: 12px 42px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.25s;
  letter-spacing: 1.5px;
}

.btn-modal-cs2:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 25px rgba(240, 173, 40, 0.7);
}

/* ================== 侧边栏：流水抽屉 ================== */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 2100;
  display: none;
  justify-content: flex-end;
}

.drawer-backdrop.show {
  display: flex;
}

.drawer-panel {
  width: 580px;
  max-width: 90vw;
  height: 100vh;
  background: linear-gradient(180deg, #181e24 0%, #0e1216 100%);
  border-left: 1px solid rgba(240, 173, 40, 0.4);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
}

.drawer-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--cs2-yellow);
  letter-spacing: 1px;
}

.drawer-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.drawer-close:hover {
  background: #eb4b4b;
  border-color: #eb4b4b;
}

.drawer-stats {
  padding: 12px 24px;
  background: rgba(240, 173, 40, 0.04);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-chip {
  background: rgba(10, 12, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.stat-chip b {
  color: #fff;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px;
}

.history-table-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cs2-yellow);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-row {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
  transition: background 0.2s;
}
.history-row:hover {
  background: rgba(240, 173, 40, 0.06);
}
.history-row .seq {
  width: 75px;
  color: var(--text-muted);
  font-family: var(--font-hud);
  font-weight: 700;
}
.history-row .time {
  width: 90px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
}
.history-row .tier-box {
  width: 90px;
}
.history-row .tier {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.history-row .tier.t1 { background: var(--rarity-gold); color: #1a1509; }
.history-row .tier.t2 { background: var(--rarity-red); color: #fff; }
.history-row .tier.t3 { background: var(--rarity-pink); color: #fff; }
.history-row .tier.t4 { background: var(--rarity-purple); color: #fff; }
.history-row .tier.t5 { background: var(--rarity-blue); color: #fff; }

.history-row .content {
  flex: 1;
  color: #ffffff;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
}

.btn-drawer-action {
  flex: 1;
  background: linear-gradient(180deg, #00c878 0%, #008f50 100%);
  border: 1px solid #44ffaa;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 1px;
}
.btn-drawer-action:hover {
  background: linear-gradient(180deg, #00e68a 0%, #00aa60 100%);
}

.btn-drawer-danger {
  background: rgba(235, 75, 75, 0.15);
  border: 1px solid rgba(235, 75, 75, 0.4);
  color: #ff8591;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-drawer-danger:hover {
  background: #eb4b4b;
  color: #fff;
}

/* ================== 设置面板 ================== */
.settings-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(14px);
  z-index: 2200;
  display: none;
  align-items: center;
  justify-content: center;
}

.settings-modal-backdrop.show {
  display: flex;
}

.settings-modal-container {
  width: 900px;
  max-width: 95vw;
  max-height: 90vh;
  background: linear-gradient(180deg, #1e262e 0%, #101418 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.9), 0 25px 70px rgba(0,0,0,0.95);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPopIn 0.3s ease;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.3);
}

.settings-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--cs2-yellow);
  letter-spacing: 1px;
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setting-section {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 16px;
}

.setting-section h3 {
  font-size: 15px;
  color: var(--cs2-yellow);
  margin-bottom: 12px;
}

.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--cs2-yellow);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.form-row label {
  font-size: 14px;
  color: #ddd;
  width: 80px;
}

.setting-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  outline: none;
}
.setting-input:focus {
  border-color: var(--cs2-yellow);
}

.prizes-table-wrapper {
  overflow-x: auto;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.settings-table th {
  padding: 8px 10px;
  background: rgba(240, 173, 40, 0.08);
  color: var(--cs2-yellow);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.table-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
}
.table-input:focus {
  border-color: var(--cs2-yellow);
}

.setting-tip {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.settings-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-right-btns {
  display: flex;
  gap: 10px;
}

.btn-subtle-modal {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
}

/* ================== Toast 提示 ================== */
.toast-box {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14, 18, 22, 0.96);
  border: 1px solid var(--cs2-yellow);
  color: #fff;
  padding: 10px 26px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8), 0 0 15px var(--cs2-yellow-glow);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.toast-box.show {
  opacity: 1;
  transform: translateX(-50%) translateY(10px);
}

/* ================== 关键帧动画 ================== */
@keyframes pulseGreen {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

@keyframes tickerSlide {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes btnShineAnim {
  0% { transform: translate(-100%, -100%) rotate(30deg); }
  30%, 100% { transform: translate(100%, 100%) rotate(30deg); }
}

@keyframes modalPopIn {
  0% { transform: scale(0.7) translateY(40px); opacity: 0; }
  70% { transform: scale(1.03) translateY(-4px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
