/* ============================================================
   主屏（正屏幕）样式 —— 1920×1080 基准，自动缩放适配
   ============================================================ */

body { background: var(--bg); }

/* ---------- 固定舞台：1920×1080 按比例缩放 ---------- */
#stage {
  position: absolute;
  left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  padding: 40px 64px 34px;
  z-index: 5;
}

/* ---------- 背景灯光 ---------- */
.bg-lights {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(1400px 900px at 12% -10%, rgba(255, 59, 48, .14), transparent 60%),
    radial-gradient(1400px 900px at 88% -10%, rgba(47, 123, 255, .14), transparent 60%),
    radial-gradient(1000px 700px at 50% 115%, rgba(246, 196, 83, .10), transparent 62%),
    linear-gradient(180deg, #07080e 0%, #05060a 55%, #04050a 100%);
}
.beam {
  position: absolute; top: -12%;
  width: 190px; height: 130%;
  filter: blur(26px);
  opacity: .5;
  transform-origin: top center;
}
.beam-l {
  left: 21%;
  background: linear-gradient(180deg, rgba(255, 59, 48, .34), transparent 75%);
  transform: rotate(9deg);
  animation: beamL 13s ease-in-out infinite alternate;
}
.beam-r {
  right: 21%;
  background: linear-gradient(180deg, rgba(47, 123, 255, .34), transparent 75%);
  transform: rotate(-9deg);
  animation: beamR 11s ease-in-out infinite alternate;
}
@keyframes beamL { from { transform: rotate(4deg); opacity: .34; } to { transform: rotate(12deg); opacity: .6; } }
@keyframes beamR { from { transform: rotate(-12deg); opacity: .6; } to { transform: rotate(-4deg); opacity: .34; } }

.spot {
  position: absolute; top: -160px;
  width: 560px; height: 560px; border-radius: 50%;
  filter: blur(60px); opacity: .3;
  animation: spotMove 16s ease-in-out infinite alternate;
}
.spot-l { left: 2%; background: radial-gradient(circle, rgba(255, 59, 48, .4), transparent 70%); }
.spot-r { right: 2%; background: radial-gradient(circle, rgba(47, 123, 255, .4), transparent 70%); animation-delay: -8s; }
@keyframes spotMove { from { transform: translateY(0) scale(1); } to { transform: translateY(130px) scale(1.15); } }

.floor {
  position: absolute; left: -30%; right: -30%; bottom: -34%;
  height: 46%;
  background:
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(246, 196, 83, .07) 118px 120px),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(246, 196, 83, .05) 46px 48px);
  transform: perspective(700px) rotateX(58deg);
  transform-origin: top center;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.9) 30%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.9) 30%);
}
.vignette { position: absolute; inset: 0; background: radial-gradient(120% 92% at 50% 46%, transparent 58%, rgba(0, 0, 0, .55) 100%); }

/* ---------- 顶部 ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  height: 118px;
  position: relative;
}
.brand-sub {
  display: flex; align-items: center; gap: 18px;
  font-size: 24px; font-weight: 800; letter-spacing: 14px;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(246, 196, 83, .5);
}
.brand-sub .wing {
  display: inline-block; width: 74px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold));
  transform: skewX(-30deg);
}
.brand-sub .wing:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.brand-title {
  margin-top: 10px;
  font-size: 56px; font-weight: 900; letter-spacing: 22px;
  font-family: var(--font-cn);
  background: linear-gradient(180deg, #ffffff 20%, #c9cede 60%, #8f95ab);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .6));
}
.top-right { display: flex; align-items: center; gap: 16px; }
.top-right .chip { font-size: 16px; padding: 9px 22px; letter-spacing: 4px; }
.icon-btn {
  width: 54px; height: 54px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .05);
  color: var(--dim);
  font-size: 24px;
  cursor: pointer;
  transition: all .18s;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--gold); border-color: rgba(246, 196, 83, .5); }
.icon-btn.muted { opacity: .4; }

/* ---------- 对阵区 ---------- */
.arena {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 44px;
  padding: 12px 0 16px;
  min-height: 0;
}

/* ---------- 选手面板 ---------- */
.panel {
  flex: 1;
  position: relative;
  padding: 2px;
  clip-path: polygon(0 0, calc(100% - 38px) 0, 100% 38px, 100% 100%, 38px 100%, 0 calc(100% - 38px));
  background: linear-gradient(165deg, var(--c, #888) 0%, rgba(255, 255, 255, .10) 40%, rgba(255, 255, 255, .04) 100%);
  transition: filter .4s ease;
}
.panel-inner {
  position: relative;
  height: 100%;
  clip-path: polygon(1px 1px, calc(100% - 39px) 1px, calc(100% - 1px) 39px, calc(100% - 1px) calc(100% - 1px), 39px calc(100% - 1px), 1px calc(100% - 39px));
  background:
    radial-gradient(600px 400px at 50% 0%, var(--c-soft, rgba(255,255,255,.07)), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(0, 0, 0, .25)),
    #0a0c15;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 42px 30px 34px;
  overflow: hidden;
}
.panel-stripes {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(-45deg, transparent 0 22px, rgba(255, 255, 255, .025) 22px 24px);
}
.panel-tag {
  align-self: flex-start;
  font-size: 15px; font-weight: 800; letter-spacing: 6px;
  color: var(--c, #888);
  text-shadow: 0 0 14px var(--c-glow, rgba(255,255,255,.3));
  margin-bottom: 18px;
}
.avatar {
  width: 264px; height: 264px;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 210deg, transparent 0 12%, var(--c, #888) 22% 38%, transparent 48% 62%, var(--c, #888) 72% 88%, transparent 98%);
  animation: avatarSpin 9s linear infinite;
  position: relative;
  flex: none;
}
@keyframes avatarSpin { to { transform: rotate(360deg); } }
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #0b0e18;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 255, 255, .14);
  animation: avatarSpinReverse 9s linear infinite;
}
@keyframes avatarSpinReverse { to { transform: rotate(-360deg); } }
.avatar-inner img { width: 100%; height: 100%; object-fit: cover; }
.monogram {
  font-family: var(--font-cn);
  font-size: 118px; font-weight: 900;
  background: linear-gradient(160deg, var(--c, #888), var(--c-light, #fff));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px var(--c-glow, rgba(255,255,255,.35)));
  animation: avatarSpinReverse 9s linear infinite;
}
.name {
  margin-top: 30px;
  font-size: 72px; font-weight: 900; letter-spacing: 8px;
  font-family: var(--font-cn);
  color: #fff;
  text-shadow: 0 0 26px var(--c-glow, rgba(255,255,255,.35)), 0 4px 20px rgba(0, 0, 0, .55);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
.slogan {
  margin-top: 14px;
  font-size: 30px; font-weight: 600; letter-spacing: 5px;
  color: var(--dim);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}

/* ---------- 票数区（紧凑横向布局：左数字+百分比，右细高条） ---------- */
.vote-box {
  margin-top: auto;
  display: none;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 30px;
  width: 100%;
  padding: 8px 0 4px;
}
#stage.phase-voting .vote-box,
#stage.phase-result .vote-box { display: flex; }

.vote-left {
  display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end;
  padding-bottom: 4px;
}
.vote-num {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--font-num);
}
.vote-count {
  font-size: 104px; line-height: 1;
  color: var(--c, #888);
  text-shadow: 0 0 34px var(--c-glow, rgba(255,255,255,.4));
  letter-spacing: 2px;
}
.vote-num em {
  font-style: normal;
  font-family: var(--font-cn);
  font-size: 28px; font-weight: 800;
  color: var(--dim);
  letter-spacing: 3px;
}
.bar-track {
  width: 58px; height: 190px;
  border: 2px solid var(--c, #888);
  border-radius: 10px;
  position: relative;
  background: rgba(0, 0, 0, .4);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .6), 0 0 20px var(--c-glow, rgba(255,255,255,.15));
  overflow: hidden;
}
.bar-fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 0%;
  background: linear-gradient(180deg, var(--c-light, #fff), var(--c, #888));
  box-shadow: 0 0 24px var(--c-glow, rgba(255,255,255,.4));
  transition: height .55s cubic-bezier(.22, 1, .36, 1);
}
.bar-fill::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 26px, rgba(0, 0, 0, .22) 26px 28px);
}
.vote-pct {
  margin-top: 6px;
  font-family: var(--font-num);
  font-size: 46px;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 0 24px var(--c-glow, rgba(255,255,255,.3));
}

/* ---------- 中央舞台 ---------- */
.center {
  width: 520px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.phase { display: none; flex-direction: column; align-items: center; width: 100%; }
#stage.phase-idle .phase-idle { display: flex; }
#stage.phase-voting .phase-voting { display: flex; }
#stage.phase-result .phase-result { display: flex; }

/* 待机 */
.eq {
  display: flex; align-items: flex-end; gap: 12px;
  height: 96px; margin-bottom: 26px;
}
.eq i {
  width: 16px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(246, 196, 83, .4);
  animation: eq 1s ease-in-out infinite alternate;
}
.eq i:nth-child(1) { animation-delay: 0s; }
.eq i:nth-child(2) { animation-delay: .18s; }
.eq i:nth-child(3) { animation-delay: .36s; }
.eq i:nth-child(4) { animation-delay: .54s; }
.eq i:nth-child(5) { animation-delay: .72s; }
@keyframes eq { from { height: 18px; } to { height: 96px; } }

.vs-wrap { position: relative; }
.vs {
  font-family: var(--font-num);
  font-size: 240px; line-height: 1; font-weight: 900;
  font-style: italic;
  background: linear-gradient(180deg, #ffedb0 5%, var(--gold) 45%, #c67a00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 34px rgba(246, 196, 83, .45)) drop-shadow(0 10px 30px rgba(0, 0, 0, .6));
  animation: vsPulse 2.4s ease-in-out infinite;
  transform: skewX(-6deg);
}
@keyframes vsPulse {
  0%, 100% { filter: drop-shadow(0 0 26px rgba(246, 196, 83, .35)); }
  50% { filter: drop-shadow(0 0 52px rgba(246, 196, 83, .7)); }
}
.phase-idle .ribbon { margin-top: 30px; font-size: 20px; padding: 12px 30px; }
.hint { margin-top: 26px; font-size: 24px; letter-spacing: 4px; color: var(--dim-2); }

/* 投票中 */
.voting-tag {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-num);
  font-size: 34px; font-weight: 900; letter-spacing: 6px;
  font-style: italic;
  color: #fff;
  background: linear-gradient(90deg, #ff4b3e, #d91f12);
  padding: 10px 30px;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  box-shadow: 0 8px 30px rgba(255, 59, 48, .5);
  margin-bottom: 30px;
  animation: voteTag 1s ease-in-out infinite;
}
.voting-tag .dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; animation: pulseDot 1s infinite; }
@keyframes voteTag {
  0%, 100% { box-shadow: 0 8px 30px rgba(255, 59, 48, .5); }
  50% { box-shadow: 0 8px 44px rgba(255, 59, 48, .8); }
}
.ring-wrap { position: relative; width: 430px; height: 430px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 10; }
.ring-fg {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 578.05;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 12px rgba(246, 196, 83, .6));
  transition: stroke-dashoffset .12s linear;
}
.ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.count-num {
  font-family: var(--font-num);
  font-size: 168px; line-height: .9;
  color: #fff;
  text-shadow: 0 0 42px rgba(246, 196, 83, .65);
  letter-spacing: 2px;
  transition: transform .1s ease;
}
.count-num.tick-pulse { animation: countPulse .35s ease; }
@keyframes countPulse {
  0% { transform: scale(1.22); color: var(--gold); }
  100% { transform: scale(1); color: #fff; }
}
.count-num.danger { color: #ff5a4d; text-shadow: 0 0 42px rgba(255, 59, 48, .8); }
.count-unit {
  font-size: 30px; font-weight: 800; letter-spacing: 10px;
  color: var(--dim);
  margin-top: 6px;
}
.voting-sub {
  margin-top: 34px;
  font-size: 26px; letter-spacing: 4px;
  color: var(--dim);
}
.voting-sub b { color: var(--gold); font-family: var(--font-num); font-size: 34px; }

/* 结果 */
.winner-crown {
  font-size: 104px;
  filter: drop-shadow(0 0 34px rgba(246, 196, 83, .8));
  animation: crownBounce 1.6s ease-in-out infinite;
}
@keyframes crownBounce {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}
.winner-name {
  margin-top: 16px;
  font-size: 104px; font-weight: 900; letter-spacing: 10px;
  font-family: var(--font-cn);
  color: #fff;
  text-shadow: 0 0 40px var(--c-glow, rgba(246, 196, 83, .8)), 0 6px 30px rgba(0, 0, 0, .6);
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.winner-label {
  margin-top: 20px;
  font-size: 30px; font-weight: 900; letter-spacing: 8px;
  font-style: italic;
  color: #241500;
  background: linear-gradient(90deg, #ffd875, var(--gold-2));
  padding: 8px 26px;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  box-shadow: 0 6px 24px rgba(246, 196, 83, .45);
}
.result-pcts {
  margin-top: 30px;
  display: flex; align-items: baseline; gap: 26px;
}
.rp { font-family: var(--font-num); font-size: 58px; color: #fff; }
.rp-colon { font-size: 40px; color: var(--dim); }
#rpA { color: var(--color-a, var(--red)); text-shadow: 0 0 22px rgba(255, 59, 48, .5); }
#rpB { color: var(--color-b, var(--blue)); text-shadow: 0 0 22px rgba(47, 123, 255, .5); }

/* ---------- 底部 ---------- */
.bottom {
  height: 66px;
  display: flex; align-items: center; justify-content: center; gap: 30px;
}
.bottom-line {
  width: 240px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(246, 196, 83, .5));
  transform: skewX(-30deg);
}
.bottom-line:last-child { background: linear-gradient(90deg, rgba(246, 196, 83, .5), transparent); }
.bottom-msg {
  font-size: 25px; font-weight: 600; letter-spacing: 6px;
  color: var(--dim);
  white-space: nowrap;
}

/* ---------- 阶段高亮 ---------- */
#stage.phase-result .panel.win { filter: drop-shadow(0 0 44px var(--c-glow, rgba(246,196,83,.55))); }
#stage.phase-result .panel.lose { filter: saturate(.35) brightness(.62); }
#stage.phase-result .panel.draw { filter: drop-shadow(0 0 34px rgba(246, 196, 83, .4)); }
#stage.phase-result .panel { animation: panelPop .6s cubic-bezier(.22, 1.4, .36, 1); }
#stage.phase-result .panel.win { animation: winPulse 1.6s ease-in-out infinite; }
@keyframes panelPop { from { transform: scale(.94); } to { transform: scale(1); } }
@keyframes winPulse {
  0%, 100% { filter: drop-shadow(0 0 30px var(--c-glow, rgba(246,196,83,.45))); }
  50% { filter: drop-shadow(0 0 58px var(--c-glow, rgba(246,196,83,.8))); }
}

/* ---------- 彩带 ---------- */
#confetti {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 90;
}
