/* ============================================================
   pages.css —— 各页面专属布局
   ============================================================ */

/* ==================== 登录 / 等待 / 核验 / 完成 ====================
   这四个页面共用居中卡片布局，样式已在 components.css 定义，
   这里只补充各自的细微差别。
   ============================================================ */

/* 登录：按考试端登录界面还原（左侧“考生登录”标签+座位号，右侧双证信息表单） */
.page--login .card--login {
  grid-template-columns: 34% 1fr;
  width: min(920px, 74vw);
  min-height: 360px;
}

/* 绿色页签（专题登录 / 考生信息确认 / 调试设备 / 引导考试 / 考试完成）：贴卡片上边框、骑在左右分栏处 */
.card__tab {
  position: absolute;
  top: 0;
  left: 100%;
  transform: translateX(-62%);
  z-index: 2;
  padding: 3px 14px;
  font-size: 12px;
  line-height: 18px;
  color: #fff;
  background: var(--green);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  white-space: nowrap;
}

.page--login .card__seat { font-size: 5rem; letter-spacing: .08em; }

.page--login .card__content--login {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  padding: 30px 42px 26px;
}

.login-title {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 700;
  color: var(--seat-color);
  text-align: center;
  letter-spacing: .01em;
}

.login-tip {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.login-row { display: flex; align-items: center; gap: 10px; }

.login-label {
  flex: none;
  width: 76px;
  font-size: 13px;
  color: var(--text-main);
  text-align: right;
}

.login-input {
  flex: 1;
  height: 32px;
  padding: 0 8px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-main);
  background: #fff;
  border: 1px solid #c3ced9;
  border-radius: 2px;
  outline: none;
  transition: border-color var(--t-fast);
}
.login-input:focus { border-color: var(--btn-primary); }

.page--login .field__error { text-align: center; }

.login-submit {
  width: 100%;
  margin-top: 6px;
  letter-spacing: .4em;
  text-indent: .4em;
}

.login-foot {
  margin: 10px 0 0;
  font-size: 12px;
  color: #8b98a5;
  text-align: right;
}
.login-practice {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--red);
  text-align: center;
  font-weight: 600;
}

/* ==================== 信息面板（考生信息确认 / 引导考试 / 交卷中 / 考试完成） ==================== */
.card--panel {
  grid-template-columns: 34% 1fr;
  width: min(920px, 74vw);
  min-height: 360px;
}

.card__content--panel {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  padding: 28px 42px 24px;
}

.panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--seat-color);
  text-align: center;
}

.panel-tip {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--text-muted);
}

.panel-main { display: flex; gap: 22px; align-items: flex-start; }

/* 证件照位：浅紫灰底 + 竖排“照 片” */
.photo {
  flex: none;
  width: 66px;
  height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 13px;
  letter-spacing: .18em;
  color: #8b90b4;
  background: #e3e7f6;
  border: 1px solid #ccd3ea;
  border-radius: 2px;
}
.card__side .photo--side {
  width: 58px;
  height: 80px;
  margin-top: 4px;
}

.info-list { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.info-row { margin: 0; font-size: 13px; color: var(--text-muted); }
.info-row span { color: var(--text-main); }

.panel-field { margin-top: 8px; }
.panel-field__label { display: block; margin-bottom: 5px; font-size: 13px; color: var(--text-muted); }
.panel-field .login-input { width: 100%; }

.panel-acts { display: flex; gap: 20px; margin-top: 10px; }
.panel-acts .btn { min-width: 116px; }

.panel-msg { margin: 4px 0 0; font-size: 14px; }
.panel-msg--guide { color: #1f8f3e; }
.panel-msg__sec { color: #e60012; font-weight: 700; font-size: 16px; padding: 0 2px; }
.panel-msg--submitting { color: #d6007f; font-weight: 700; }
.panel-msg--done { color: #12a13c; font-weight: 700; }

.panel-restart {
  align-self: flex-end;
  margin-top: 6px;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  color: #8b98a5;
  background: none;
  border: 0;
  cursor: pointer;
}
.panel-restart:hover { color: var(--seat-color); text-decoration: underline; }

/* 等待考试：提示文案绿色居中 */
.hint-text {
  color: var(--green);
  font-size: 15px;
  margin-top: 14px !important;
}

/* 省略号动画 */
.dots { display: inline-flex; margin-left: 2px; }
.dots i {
  width: 3px; height: 3px;
  margin: 0 1px;
  border-radius: 50%;
  background: currentColor;
  animation: dotPulse 1.4s infinite;
}
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dotPulse {
  0%, 60%, 100% { opacity: .25; }
  30%           { opacity: 1; }
}

/* 核验：准考证号输入行右对齐紧凑 */
.page--verify .card__info { line-height: 2.1; }
.page--verify .field__row { justify-content: flex-start; }
.page--verify .field__error { margin-left: 110px; }
.page--verify .card__actions--split { margin-left: 110px; }

/* 完成页：座位号已在左侧 badge */
.page--finished .hint-text { margin-top: 16px !important; }
.page--finished .card__actions { margin-top: 14px; }

/* ==================== 设备测试 ==================== */
.card__content--device {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 18px 24px 20px;
}
.card__content--device .device-bar { flex: none; }
.card__content--device .card__actions { justify-content: center; margin-top: 6px; }

/* ==================== 阅题准备 / 答题 ==================== */
/* 蓝色渐变网格为全屏背景，试题信息框为居中 1280*960 的白色卡片（等比自适应缩放） */
.page--exam {
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
}

.exam-frame {
  width: 1280px;
  height: 960px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transform: scale(var(--exam-scale, 1));
  transform-origin: center center;
}
/* 信息条改为随卡片内嵌，取消固定定位 */
.exam-frame .topbar {
  position: static;
  flex: none;
  box-shadow: none;
}

.exam-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--panel-main);
  margin: 0;
  min-height: 0;
  overflow: hidden;
}
/* 顶部整行：大题信息（第几部分） */
.exam-partrow {
  flex: none;
  padding: 10px 22px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
/* 阅题准备：头部说明框（大题标题 + 时间提示） */
.exam-headbox {
  flex: none;
  border: 1px solid var(--line);
  padding: 10px 14px;
  margin: 8px 12px 0;
  background: var(--white);
}
.exam-headbox .exam-partrow { padding: 0; border-bottom: none; }
.exam-subtip { font-size: 14px; color: var(--text-main); margin-top: 2px; font-weight: 700; }
/* 阅题准备：左右面板加边框 */
.exam-panel__body--boxed {
  padding: 8px 12px 12px;
  gap: 10px;
}
.exam-panel__body--boxed .exam-panel__main,
.exam-panel__body--boxed .exam-panel__side {
  border: 1px solid var(--line);
  background: var(--white);
}

/* 主体：左（试题内容）/ 右（录像与回放） */
.exam-panel__body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  overflow: hidden;
}

.exam-panel__main {
  padding: 16px 22px;
  background: var(--white);
  overflow: auto;
  min-width: 0;
}
.exam-type { font-size: 15px; font-weight: 700; color: var(--text-main); margin-bottom: 10px; }
.exam-stem { font-size: 15px; color: var(--text-main); margin-bottom: 10px; }
.exam-body {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 2;
}
.exam-body p { margin: 0 0 4px; }
.exam-req {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.exam-req b { color: var(--text-sub); }

.exam-panel__side {
  position: relative;
  background: var(--panel-video);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.exam-panel__side video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.exam-panel__recdot {
  position: absolute;
  right: 14px; top: 14px;
  z-index: 3;
}
.exam-panel__body--full { grid-template-columns: 1fr; }   /* 阅题准备：无预览区，占满整行（备用） */
.exam-side-empty {
  width: 100%;
  height: 100%;
  background: #fff;
}

/* 单题录像完成后就地回放（覆盖右侧录像区） */
.exam-replay {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 4;
}
.exam-replay video {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.exam-replay__countdown {
  position: absolute;
  right: 14px; bottom: 14px;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
/* 回放态状态条：青绿底 + 深蓝标题 + 右侧红色倒计时 + 下方蓝色进度条 */
.statusbar--replay {
  background: #009688;
  flex-wrap: wrap;
  height: auto;
  min-height: 42px;
  padding: 6px 16px 8px;
  row-gap: 5px;
  align-content: center;
}
.statusbar--replay .statusbar__icon { display: none; }
.statusbar--replay .statusbar__label {
  color: #0b3c5d;
  font-weight: 700;
  font-size: 14px;
}
.statusbar--replay .statusbar__countdown {
  margin-left: auto;
  color: #000;
  font-size: 15px;
}
.statusbar--replay .statusbar__countdown b {
  color: #d32f2f;
  font-size: 16px;
}
.statusbar--replay .statusbar__progress {
  order: 3;
  flex: 0 0 100%;
  height: 8px;
  margin: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.95);
}
.statusbar--replay .statusbar__bar {
  border-radius: 0;
  background: #1565c0;
}
.exam-panel__recdot[hidden] { display: none; }

/* ==================== 答题核对 ==================== */
.card__content--review { align-items: stretch; }

.review-warn {
  flex: none;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--red);
  font-weight: 600;
}
.page--review .card__content {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 20px 26px;
}
.page--review .card__actions { justify-content: center; margin-top: 18px; }

/* 左侧录像缩略图（M8-04） */
.review-thumb {
  position: relative;
  width: 100%;
  height: 118px;
  margin-top: auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #223;
}
.review-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-thumb__ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px;
  background: linear-gradient(135deg, #455a64, #263238);
}
.review-thumb__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2px 6px;
  font-size: 10px;
  color: #ffe082;
  background: rgba(0, 0, 0, .45);
}
.review-thumb.is-playing .review-thumb__ph { display: none; }

/* ==================== 小屏适配 ==================== */
@media (max-width: 900px) {
  .card { grid-template-columns: 28% 1fr; width: 92vw; }
  .card__seat { font-size: 4.4rem; }
  .exam-panel__body { grid-template-columns: 1fr; grid-template-rows: 1fr 240px; }
  .topbar { font-size: 12px; gap: 12px; }
  .topbar__right { display: none; }
  .card--wide { grid-template-columns: 160px 1fr; }
}

/* ==================== 设备页：独立回放进度条（放在三个按钮上方） ==================== */
.dev-replay-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  margin: 0 12px 4px;
  background: #f1f3f5;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  height: 26px;
}
.dev-replay-progress__label {
  font-size: 13px;
  font-weight: 700;
  color: #15365c;
  white-space: nowrap;
  flex: none;
}
.dev-replay-progress__bar {
  flex: 1;
  height: 10px;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 5px;
  overflow: hidden;
}
.dev-replay-progress__fill {
  width: 0%;
  height: 100%;
  background: #1565c0;
  border-radius: 4px;
  transition: none;
}
.dev-replay-progress__cd b {
  color: #d32f2f;
  font-size: 16px;
  font-weight: 700;
  min-width: 22px;
  text-align: right;
  display: inline-block;
}