:root {
  --bg: #f4f7f8;
  --panel: #ffffff;
  --text: #18212a;
  --muted: #6b7785;
  --line: #dfe7ec;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #b45309;
  --danger: #b42318;
  --success: #17803d;
  --shadow: 0 18px 45px rgba(22, 35, 48, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.12), transparent 360px),
    var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

body.quiz-page {
  --panel: rgba(255, 255, 255, 0.94);
  --line: #bfd4e2;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(7, 84, 168, 0.2) 0, rgba(234, 247, 249, 0.62) 360px, rgba(244, 249, 247, 0.94) 100%),
    url("/quiz-bg.svg") center top / min(1000px, 150vw) auto no-repeat,
    #eef8f6;
}

body.quiz-page::before,
body.quiz-page::after {
  position: fixed;
  left: 0;
  right: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
}

body.final-page {
  background:
    linear-gradient(180deg, rgba(8, 52, 135, 0.28) 0, rgba(231, 243, 255, 0.72) 380px, rgba(246, 250, 255, 0.96) 100%),
    url("/quiz-bg.svg") center top / min(1040px, 158vw) auto no-repeat,
    #eef6ff;
}

body.final-page .phone-shell::before {
  content: "特殊奖励挑战  满分通关";
}

body.quiz-page::before {
  top: 0;
  height: 260px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 48px),
    linear-gradient(180deg, rgba(4, 68, 145, 0.16), transparent);
}

body.quiz-page::after {
  bottom: 0;
  height: 180px;
  background: linear-gradient(0deg, rgba(7, 84, 168, 0.14), transparent);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.phone-shell {
  width: min(640px, calc(100% - 24px));
  margin: 0 auto;
  padding: 26px 0 32px;
  position: relative;
}

.quiz-page .phone-shell::before {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 12px;
  border: 1px solid rgba(13, 99, 183, 0.28);
  border-radius: 999px;
  padding: 8px 14px;
  color: #0754a8;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 26px rgba(13, 99, 183, 0.12);
  content: "全民反诈  你我同行";
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.quiz-page .panel,
.quiz-page .question-card,
.quiz-page .sticky-status {
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 48px rgba(7, 58, 112, 0.14);
}

.quiz-page #startView {
  position: relative;
  overflow: hidden;
  border-color: rgba(13, 99, 183, 0.28);
}

.quiz-page #startView::before {
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg, #0d63b7, #0c8f6e, #f4b23b, #b42318);
  content: "";
}

.start-footer {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(13, 99, 183, 0.24);
  border-radius: 8px;
  color: #123a64;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 40px rgba(7, 58, 112, 0.1);
  backdrop-filter: blur(12px);
}

.safety-reminders {
  padding: 18px 18px 16px;
}

.start-footer-title {
  margin: 0 0 12px;
  color: #0754a8;
  font-size: 17px;
  font-weight: 900;
  text-align: center;
}

.reminder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.reminder-grid span {
  min-width: 0;
  border-right: 1px solid rgba(13, 99, 183, 0.16);
  color: #526b83;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.reminder-grid span:last-child {
  border-right: 0;
}

.reminder-grid strong {
  color: #0f766e;
  font-size: 15px;
}

.help-line {
  margin: 0;
  padding: 13px 18px;
  color: #7a271a;
  background: #fff4e8;
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

.help-line strong {
  color: #b42318;
}

.help-line b {
  color: #b42318;
  font-size: 17px;
}

.activity-note {
  margin: 0;
  padding: 14px 18px 16px;
  color: #66798d;
  font-size: 11px;
  line-height: 1.75;
  text-align: justify;
}

.final-start {
  border-color: rgba(14, 74, 166, 0.32);
}

.final-start h1 {
  color: #102a56;
}

.final-status {
  color: #0e4aa6;
}

.final-feedback {
  min-height: 26px;
  margin: 12px 0 0;
  color: #0f766e;
  font-weight: 900;
  text-align: center;
}

.intro-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
}

h2 {
  font-size: 20px;
}

.lead {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-actions,
.url-row,
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title {
  justify-content: space-between;
  margin-bottom: 18px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--primary);
  cursor: pointer;
  font-weight: 700;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.button:hover {
  background: var(--primary-dark);
}

.button:active {
  transform: translateY(1px);
}

.button.secondary {
  color: var(--text);
  border-color: var(--line);
  background: #ffffff;
}

.button.secondary:hover {
  border-color: #a9bbc4;
  background: #f8fbfc;
}

.button.danger {
  background: var(--danger);
}

.button.wide {
  width: 100%;
  margin-top: 18px;
}

.qr-panel {
  min-height: 520px;
}

.qr-box {
  display: grid;
  min-height: 360px;
  place-items: center;
  border: 1px dashed #b6c5ce;
  border-radius: 8px;
  background: #f8fbfc;
}

.qr-box img {
  display: block;
  width: min(100%, 340px);
  height: auto;
}

.url-row {
  margin-top: 16px;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd8df;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #ffffff;
}

input:focus {
  outline: 3px solid rgba(15, 118, 110, 0.16);
  border-color: var(--primary);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.hidden {
  display: none !important;
}

.sticky-status {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.quiz-page .sticky-status {
  border-color: rgba(13, 99, 183, 0.24);
  background: rgba(255, 255, 255, 0.9);
}

.question-list {
  display: grid;
  gap: 12px;
}

.question-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.quiz-page .question-card {
  border-color: rgba(13, 99, 183, 0.2);
  background: rgba(255, 255, 255, 0.93);
}

.question-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
}

.question-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: -4px 0 14px;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--primary);
  background: rgba(15, 118, 110, 0.1);
  font-size: 13px;
  font-weight: 800;
}

.quiz-page .question-type {
  color: #0754a8;
  background: rgba(13, 99, 183, 0.1);
}

.option-list {
  display: grid;
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid #cbd8df;
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.option input {
  width: 18px;
  min-height: 18px;
}

.option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(15, 118, 110, 0.08);
}

.quiz-page .option {
  background: rgba(255, 255, 255, 0.78);
}

.quiz-page .option:has(input:checked) {
  border-color: #0d63b7;
  background: rgba(13, 99, 183, 0.1);
}

.detail-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.result-poster {
  margin-top: 18px;
}

.poster-frame {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 0 14px;
  color: #ffffff;
  background: #17803d;
  box-shadow: 0 8px 20px rgba(6, 30, 20, 0.22);
  font-size: 15px;
  font-weight: 900;
}

.poster-badge.failed {
  background: #b42318;
}

.verification-card {
  position: absolute;
  top: 3.8%;
  right: 6.1%;
  display: grid;
  width: 24%;
  min-width: 118px;
  max-width: 176px;
  border: 2px solid rgba(172, 207, 255, 0.92);
  border-radius: 12px;
  padding: 8px 8px 9px;
  color: #122033;
  background: rgba(247, 251, 255, 0.96);
  box-shadow: 0 10px 22px rgba(12, 69, 145, 0.16);
  text-align: center;
  gap: 4px;
}

.verification-card strong {
  color: #075ec9;
  font-size: clamp(13px, 3vw, 22px);
  line-height: 1.05;
}

.verification-card img {
  display: block;
  width: 100%;
  border-radius: 8px;
  padding: 4px;
  background: #ffffff;
}

.verify-code {
  overflow: hidden;
  color: #142033;
  font-size: clamp(10px, 2.4vw, 16px);
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verify-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-height: 24px;
  min-width: 72px;
  border-radius: 999px;
  padding: 0 9px;
  color: #ffffff;
  background: #15a05a;
  font-size: clamp(11px, 2.3vw, 16px);
  font-weight: 900;
  line-height: 1;
}

.verify-state.used {
  background: #6b7785;
}

.verification-card small,
.verification-card em {
  display: block;
  font-style: normal;
  line-height: 1.1;
}

.verification-card small {
  color: #0d3a78;
  font-size: clamp(9px, 2vw, 14px);
  font-weight: 900;
}

.verification-card em {
  color: #e74727;
  font-size: clamp(9px, 1.9vw, 13px);
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 14px 0 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--success);
  font-weight: 800;
}

.result-badge.failed {
  background: var(--danger);
}

.detail-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.detail-item.correct {
  border-color: rgba(23, 128, 61, 0.35);
  background: rgba(23, 128, 61, 0.08);
}

.detail-item.wrong {
  border-color: rgba(180, 35, 24, 0.35);
  background: rgba(180, 35, 24, 0.07);
}

.detail-title {
  margin: 0 0 6px;
  font-weight: 800;
  line-height: 1.45;
}

.detail-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(12, 22, 31, 0.58);
}

.modal-card {
  width: min(100%, 520px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.anti-fraud-image {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.modal-card .anti-fraud-image {
  max-height: min(62vh, 640px);
  object-fit: contain;
  background: #eaf7f9;
}

.modal-result {
  margin: 16px 0 4px;
  color: var(--success);
  font-size: 36px;
  line-height: 1.1;
  text-align: center;
  font-weight: 900;
}

.modal-result.failed {
  color: var(--danger);
}

.modal-score {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.staff-page {
  background:
    linear-gradient(180deg, rgba(7, 84, 168, 0.16), rgba(244, 249, 247, 0.94)),
    #eef8f6;
}

.staff-shell {
  width: min(520px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 0;
}

.staff-card {
  border-color: rgba(13, 99, 183, 0.24);
}

.staff-card h1 {
  font-size: 34px;
}

.staff-status {
  margin: 14px 0 0;
  line-height: 1.6;
  text-align: center;
}

.verify-info {
  margin-top: 20px;
  border: 1px solid rgba(13, 99, 183, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.verify-info .lead {
  margin: 0;
  padding: 18px;
}

.verify-info dl {
  margin: 0;
}

.verify-info div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(13, 99, 183, 0.12);
}

.verify-info div:last-child {
  border-bottom: 0;
}

.verify-info dt {
  color: var(--muted);
  font-weight: 800;
}

.verify-info dd {
  margin: 0;
  font-weight: 900;
}

.verify-info dd.ok {
  color: var(--success);
}

.verify-info dd.used {
  color: var(--danger);
}

@media (max-width: 820px) {
  .intro-panel,
  .admin-actions,
  .url-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100% - 24px, 640px);
    padding-top: 20px;
  }

  .panel {
    padding: 18px;
  }

  .verification-card {
    min-width: 106px;
    padding: 6px;
    border-radius: 10px;
    gap: 3px;
  }

  .verify-state {
    min-height: 21px;
    min-width: 62px;
  }
}
