/* ===================================================================
 * css/v19.css — 抽奖结果呈现方式切换（逐一揭晓 / 一次性展示）
 * -------------------------------------------------------------------
 *  1) 右上角 segmented 切换控件（音乐按钮左侧，常驻显示）
 *  2) 逐一揭晓全屏层 #revealStage：中央大字逐条揭晓 + 已抽出奖品左侧流入堆叠
 *  3) 一次性模式完全沿用 v18 结果弹层，本文件不参与
 *  依赖变量：--gold-100/200/400/500、--gold-line、--font-num、--ease-out
 * =================================================================== */

/* ==================================================================
 * 1. 右上角：呈现方式切换（segmented）
 * ================================================================== */
.rv-switch {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid var(--gold-line-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  flex: none;
  user-select: none;
}

.rv-switch .rv-opt {
  appearance: none;
  -webkit-appearance: none;
  height: 30px;
  min-width: 52px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 232, 200, .62);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 30px;
  cursor: pointer;
  transition: color .18s var(--ease-out), background .18s var(--ease-out),
              box-shadow .18s var(--ease-out);
}

.rv-switch .rv-opt:hover { color: var(--gold-200); }

.rv-switch .rv-opt.is-active {
  color: #3B0A12;
  background: linear-gradient(180deg, var(--gold-200) 0%, var(--gold-400) 55%, var(--gold-500) 100%);
  box-shadow: 0 2px 10px rgba(207, 160, 60, .3), inset 0 1px 0 rgba(255, 255, 255, .55);
}

.rv-switch .rv-opt:focus-visible {
  outline: 2px solid var(--gold-400);
  outline-offset: 2px;
}

/* ==================================================================
 * 2. 逐一揭晓全屏层
 * ================================================================== */
.reveal-stage {
  position: fixed;
  inset: 0;
  z-index: 9400;                 /* 高于抽奖动画层（9300）、低于结果弹层（9500+） */
  display: none;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(158, 21, 38, .78) 0%, rgba(10, 2, 4, .975) 74%);
  backdrop-filter: blur(3px);
  cursor: pointer;               /* 整层可点击跳过 */
}

.reveal-stage.is-open { display: flex; animation: rvs-in .24s ease-out; }
@keyframes rvs-in { from { opacity: 0; } to { opacity: 1; } }

.rvs-inner {
  position: relative;
  z-index: 2;
  width: min(94vw, 1120px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  align-items: center;
  gap: clamp(18px, 3vw, 56px);
  cursor: default;
}

/* ---- 左侧：中央大字揭晓区 ---- */
.rvs-main { text-align: center; }

.rvs-head {
  font-size: 11px;
  letter-spacing: .5em;
  color: rgba(227, 185, 95, .72);
}

.rvs-idx {
  margin-top: clamp(10px, 1.4vw, 18px);
  font-family: var(--font-num);
  font-size: clamp(13px, 1.15vw, 17px);
  letter-spacing: .18em;
  color: rgba(255, 232, 200, .62);
}
.rvs-idx b { color: var(--gold-200); font-weight: 800; }

/* 当前揭晓的奖品卡 */
.rvs-card {
  margin: clamp(14px, 1.8vw, 24px) auto 0;
  padding: clamp(18px, 2.2vw, 34px) clamp(18px, 2.6vw, 42px);
  max-width: min(92vw, 640px);
  border-radius: 20px;
  border: 1px solid var(--gold-line);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(227, 185, 95, .16) 0%, rgba(0, 0, 0, 0) 68%),
    linear-gradient(180deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .02) 100%);
  box-shadow: 0 0 46px rgba(227, 185, 95, .22), inset 0 0 34px rgba(0, 0, 0, .5);
}
.rvs-card.is-pop { animation: rvs-pop .42s var(--ease-out); }
@keyframes rvs-pop {
  0%   { opacity: 0; transform: translateY(14px) scale(.94); }
  60%  { opacity: 1; transform: translateY(0) scale(1.025); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.rvs-tier { min-height: 1.7em; }

.rvs-name {
  margin-top: clamp(8px, 1vw, 14px);
  font-size: clamp(22px, 2.6vw, 44px);
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.28;
  color: #FFEFE3;
  text-shadow: 0 0 26px rgba(227, 185, 95, .45);
}

.rvs-sku {
  margin-top: clamp(8px, 1vw, 12px);
  font-family: var(--font-num);
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: .16em;
  color: rgba(227, 185, 95, .82);
}

/* 揭晓进度条（第 n / N 条） */
.rvs-progress {
  width: min(72%, 460px);
  height: 3px;
  margin: clamp(16px, 2vw, 24px) auto 0;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
}
.rvs-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-100));
  box-shadow: 0 0 12px rgba(227, 185, 95, .8);
  transition: width .42s var(--ease-out);
}

/* ---- 右侧：已抽出奖品堆叠（从左侧流入） ---- */
.rvs-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 74vh;
  overflow: hidden;
}
.rvs-side-head {
  font-size: 11px;
  letter-spacing: .3em;
  color: rgba(227, 185, 95, .62);
  padding-left: 2px;
}
.rvs-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(227, 185, 95, .35) transparent;
}
.rvs-list::-webkit-scrollbar { width: 5px; }
.rvs-list::-webkit-scrollbar-thumb {
  background: rgba(227, 185, 95, .35);
  border-radius: 3px;
}

.rvs-item {
  display: grid;
  grid-template-columns: 30px auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--gold-line-soft);
  background: linear-gradient(90deg, rgba(227, 185, 95, .13) 0%, rgba(255, 255, 255, .03) 62%);
  animation: rvs-item-in .34s var(--ease-out);
}
@keyframes rvs-item-in {
  from { opacity: 0; transform: translateX(-26px); }
  to   { opacity: 1; transform: translateX(0); }
}
.rvs-item .ri-idx {
  font-family: var(--font-num);
  font-size: 13px;
  color: rgba(255, 232, 200, .45);
  text-align: center;
}
.rvs-item .ri-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: #FFEFE3;
}
.rvs-item .tier-badge { justify-self: start; }

/* ---- 底部：跳过提示 ---- */
.rvs-skip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(18px, 3vh, 40px);
  text-align: center;
  font-size: 12px;
  letter-spacing: .12em;
  color: rgba(255, 232, 200, .38);
  pointer-events: none;
}

/* ==================================================================
 * 3. 响应式
 * ================================================================== */
@media (max-width: 1023px) {
  .rvs-inner {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    max-height: 88vh;
    overflow-y: auto;
  }
  .rvs-side { width: min(94vw, 520px); max-height: 32vh; }
}

@media (max-width: 767px) {
  .rv-switch { height: 34px; padding: 2px; }
  .rv-switch .rv-opt { height: 28px; line-height: 28px; min-width: 46px; padding: 0 9px; font-size: 12px; }

  .rvs-name { font-size: clamp(20px, 6.4vw, 30px); }
  .rvs-card { padding: 16px 18px; border-radius: 16px; }
  .rvs-item { grid-template-columns: 26px auto 1fr; padding: 8px 10px; }
  .rvs-item .ri-name { font-size: 12.5px; }
  .rvs-skip { font-size: 11px; bottom: 14px; }
}

/* 大屏（≥1920）：中央卡片与列表再放大一档，保证远距离可读 */
@media (min-width: 1920px) {
  .rvs-inner { width: min(88vw, 1560px); grid-template-columns: minmax(0, 1fr) minmax(0, 380px); }
  .rvs-name { font-size: clamp(30px, 2.4vw, 56px); }
  .rvs-item .ri-name { font-size: 15px; }
}

/* 尊重系统「减少动态效果」偏好：取消入场动效，仅保留即时显示 */
@media (prefers-reduced-motion: reduce) {
  .reveal-stage.is-open,
  .rvs-card.is-pop,
  .rvs-item { animation: none !important; }
  .rvs-progress i { transition: none; }
}
