/* ==========================================================================
   培训大屏：1920×1080 定尺舞台，按视口等比缩放，适配任意投影
   ========================================================================== */

body {
  overflow: hidden;
  background: #000;
}

.stage-wrap {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* 舞台左上角定位，由 JS 精确计算缩放与居中偏移，避免各浏览器对齐差异 */
.stage {
  width: 1920px;
  height: 1080px;
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  display: flex;
  flex-direction: column;
  padding: 46px 64px 40px;
  color: var(--text);
}

/* 顶部信息条 */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.hud__brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hud__mark {
  width: 8px;
  height: 46px;
  background: linear-gradient(180deg, var(--unicom-red), transparent);
}

.hud__name {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.16em;
  color: var(--text-hi);
  line-height: 1;
}

.hud__sub {
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  margin-top: 5px;
}

.hud__stats {
  display: flex;
  gap: 46px;
  align-items: center;
}

.hud__stat {
  text-align: right;
}

.hud__stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--text-hi);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hud__stat span {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.screen-body {
  flex: 1;
  min-height: 0;
  padding-top: 34px;
}

.screen-view {
  height: 100%;
  animation: viewIn 520ms var(--ease-out);
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* ------------------------------ 封面 ------------------------------ */
.cover {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 70px;
  height: 100%;
  align-items: center;
}

.cover__title {
  font-family: var(--font-display);
  font-size: 150px;
  line-height: 0.9;
  color: var(--text-hi);
  letter-spacing: 0.02em;
  margin: 20px 0 16px;
}

.cover__title em {
  font-style: normal;
  color: var(--unicom-red-soft);
  text-shadow: 0 0 60px rgba(230, 0, 18, 0.55);
}

.cover__cn {
  font-size: 40px;
  color: var(--text-hi);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.cover__desc {
  font-size: 20px;
  color: var(--text-dim);
  margin-top: 14px;
  max-width: 700px;
  line-height: 1.7;
}

.qr-card {
  text-align: center;
  padding: 34px;
}

.qr-card img {
  width: 320px;
  height: 320px;
  display: block;
  margin: 0 auto 20px;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.qr-card__hint {
  font-size: 20px;
  color: var(--text-hi);
  font-weight: 700;
}

.qr-card__code {
  font-family: var(--font-display);
  font-size: 40px;
  letter-spacing: 0.22em;
  color: var(--data-cyan);
  margin-top: 12px;
}

.qr-card__url {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 10px;
  word-break: break-all;
}

.joined-big {
  margin-top: 34px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.joined-big b {
  font-family: var(--font-display);
  font-size: 96px;
  line-height: 1;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
}

.joined-big span {
  font-size: 26px;
  color: var(--text-faint);
}

.name-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  max-height: 140px;
  overflow: hidden;
}

.name-chip {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 17px;
  color: var(--text);
  animation: chipIn 480ms var(--ease-out);
}

@keyframes chipIn {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
}

/* ------------------------------ 任务页 ------------------------------ */
.taskview {
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 48px;
  height: 100%;
}

.taskview__left {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.taskview__round {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 0.34em;
  color: var(--data-cyan);
}

.taskview__title {
  font-size: 108px;
  line-height: 1;
  color: var(--text-hi);
  margin: 14px 0 6px;
  font-weight: 700;
}

.taskview__sub {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.3em;
  color: var(--text-faint);
}

.taskview__mission {
  margin-top: 34px;
  font-size: 24px;
  line-height: 1.75;
  color: var(--text);
  max-width: 950px;
}

.clock {
  font-family: var(--font-display);
  font-size: 148px;
  line-height: 0.9;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.clock.is-hot {
  color: var(--unicom-red-soft);
  text-shadow: 0 0 50px rgba(230, 0, 18, 0.5);
  animation: clockBeat 1s infinite;
}

@keyframes clockBeat {
  50% {
    opacity: 0.6;
  }
}

.submit-count {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 8px;
}

.submit-count b {
  font-family: var(--font-display);
  font-size: 64px;
  color: var(--text-hi);
  line-height: 1;
}

.submit-count span {
  font-size: 22px;
  color: var(--text-faint);
}

.qr-mini {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.qr-mini img {
  width: 130px;
  height: 130px;
  background: #fff;
  padding: 7px;
  border-radius: 6px;
}

/* 关卡进度轨：让学员一眼看到自己在整场培训的哪一段 */
.rail {
  margin-top: auto;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 10px;
}

.rail__step {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}

.rail__step--done {
  border-top-color: var(--data-teal);
}

.rail__step--live {
  border-top-color: var(--unicom-red);
  background: rgba(230, 0, 18, 0.1);
}

.rail__code {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}

.rail__title {
  font-size: 17px;
  color: var(--text);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail__step--live .rail__title {
  color: var(--text-hi);
  font-weight: 700;
}

/* ------------------------------ 实时动态 ------------------------------ */
.liveview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  height: 100%;
}

.feed {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--data-cyan);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  font-size: 21px;
  color: var(--text);
}

/* 只让最新一条做入场动画，避免整屏重绘时集体闪烁 */
.feed__item--new {
  animation: feedIn 420ms var(--ease-out);
}

@keyframes feedIn {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
}

.feed__item--score {
  border-left-color: var(--data-teal);
}

.feed__item--join {
  border-left-color: var(--data-violet);
}

.feed__item--round {
  border-left-color: var(--unicom-red);
}

.feed__icon {
  font-size: 26px;
}

.feed__name {
  color: var(--text-hi);
  font-weight: 700;
}

.feed__score {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--data-teal);
}

/* ------------------------------ 排行榜 ------------------------------ */
.ranking {
  height: 100%;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 46px;
}

.rank-row {
  display: grid;
  grid-template-columns: 78px 1fr 140px 78px;
  align-items: center;
  gap: 14px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.026);
  margin-bottom: 6px;
  transition: transform var(--dur-slow) var(--ease-out);
}

.rank-row--1 {
  border-color: rgba(255, 200, 60, 0.55);
  background: linear-gradient(90deg, rgba(255, 200, 60, 0.16), rgba(255, 255, 255, 0.02));
}

.rank-row--2 {
  border-color: rgba(200, 214, 235, 0.42);
  background: linear-gradient(90deg, rgba(200, 214, 235, 0.12), rgba(255, 255, 255, 0.02));
}

.rank-row--3 {
  border-color: rgba(214, 142, 78, 0.45);
  background: linear-gradient(90deg, rgba(214, 142, 78, 0.14), rgba(255, 255, 255, 0.02));
}

.rank-row__no {
  font-family: var(--font-display);
  font-size: 38px;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.rank-row__name {
  font-size: 26px;
  color: var(--text-hi);
  font-weight: 700;
}

.rank-row__dept {
  font-size: 13px;
  color: var(--text-faint);
}

.rank-row__score {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--text-hi);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rank-row__delta {
  font-family: var(--font-display);
  font-size: 22px;
  text-align: right;
}

.delta-up {
  color: var(--data-teal);
}
.delta-down {
  color: var(--unicom-red-soft);
}
.delta-flat {
  color: var(--text-faint);
}

.honor {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.026);
}

.honor__icon {
  font-size: 28px;
}

.honor__title {
  font-size: 16px;
  color: var(--text-dim);
}

.honor__name {
  font-size: 21px;
  color: var(--text-hi);
  font-weight: 700;
}

.honor__value {
  margin-left: auto;
  text-align: right;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--data-amber);
  line-height: 1.1;
}

.honor__unit {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}

/* ------------------------------ 优秀案例 ------------------------------ */
.case {
  height: 100%;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 54px;
}

.case__author {
  font-size: 66px;
  color: var(--text-hi);
  font-weight: 700;
  line-height: 1.1;
}

.case__content {
  font-size: 23px;
  line-height: 1.85;
  color: var(--text);
  white-space: pre-wrap;
  overflow: hidden;
  max-height: 100%;
}

/* ------------------------------ 总结 ------------------------------ */
.summary {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.summary__title {
  font-family: var(--font-display);
  font-size: 128px;
  color: var(--text-hi);
  letter-spacing: 0.08em;
  line-height: 1;
}

.summary__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  margin: 54px 0 40px;
}

.summary__cell b {
  display: block;
  font-family: var(--font-display);
  font-size: 84px;
  color: var(--text-hi);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.summary__cell span {
  font-size: 17px;
  color: var(--text-faint);
  letter-spacing: 0.14em;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.podium__item {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.podium__item b {
  display: block;
  font-size: 34px;
  color: var(--text-hi);
}

.podium__item span {
  font-family: var(--font-display);
  font-size: 44px;
  color: var(--data-cyan);
}

/* 未创建场次时的提示 */
.screen-empty {
  height: 100%;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 16px;
}

.screen-empty h2 {
  font-size: 48px;
}

.screen-empty p {
  font-size: 20px;
  color: var(--text-dim);
}

.screen-empty code {
  font-family: var(--font-mono);
  color: var(--data-cyan);
}

/* ==========================================================================
   V2.0：异步模式的关卡进度总览（取代"当前第几关 + 倒计时"）
   ========================================================================== */
.progress-board {
  display: grid;
  gap: 10px;
  margin-top: 34px;
}

.progress-row {
  display: grid;
  grid-template-columns: 110px 1fr 150px 130px;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.progress-row__code {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.12em;
  color: var(--data-cyan);
}

.progress-row__title {
  font-size: 20px;
  color: var(--text-hi);
  margin-bottom: 8px;
}

.progress-row__num {
  text-align: right;
  font-size: 15px;
  color: var(--text-dim);
}

.progress-row__num b {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--text-hi);
  font-variant-numeric: tabular-nums;
}
