/* 单词测试页独立样式，避免影响其他页面的全局样式。 */

.quiz-page {
  background: #f4f4f6;
  min-height: 100vh;
}

.quiz-account {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: #292e41;
  background: #e4e6ec;
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}

.quiz-main {
  width: min(960px, 100% - 32px);
  margin: 0 auto;
  padding: 28px 0 72px;
}

.quiz-gate {
  margin: 64px auto;
  max-width: 460px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #dbdde4;
  border-radius: 8px;
  padding: 32px 24px;
}

.quiz-gate strong {
  display: block;
  font-size: 18px;
  color: #161b30;
  margin-bottom: 8px;
}

.quiz-gate p {
  margin: 0 0 20px;
  color: #5c6071;
  font-size: 14px;
  line-height: 1.7;
}

.quiz-gate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.quiz-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.quiz-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #7a7e8d;
}

.quiz-hero h1 {
  margin: 0 0 8px;
  font-size: 26px;
  color: #12172a;
}

.quiz-lead {
  margin: 0;
  max-width: 560px;
  font-size: 14px;
  line-height: 1.7;
  color: #5c6071;
}

.quiz-pool-stats {
  display: flex;
  gap: 18px;
  margin: 0;
}

.quiz-pool-stats div {
  text-align: right;
}

.quiz-pool-stats dt {
  font-size: 12px;
  color: #7a7e8d;
}

.quiz-pool-stats dd {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: #171d35;
}

.quiz-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.quiz-tab,
.quiz-board-tab {
  border: 1px solid #d5d7e0;
  background: #ffffff;
  color: #3d4256;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.quiz-tab:hover,
.quiz-board-tab:hover {
  border-color: #9da3bb;
}

.quiz-tab.is-active,
.quiz-board-tab.is-active {
  background: #171d35;
  border-color: #171d35;
  color: #ffffff;
}

.quiz-board-tabs {
  margin: 16px 0 18px;
  padding-top: 14px;
  border-top: 1px dashed #dbdde4;
}

.quiz-panel {
  background: #ffffff;
  border: 1px solid #dbdde4;
  border-radius: 8px;
  padding: 24px;
}

.quiz-panel-head h2 {
  margin: 0 0 4px;
  font-size: 19px;
  color: #161b30;
}

.quiz-panel-head p {
  margin: 0;
  font-size: 13px;
  color: #7a7e8d;
}

.quiz-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-top: 20px;
}

.quiz-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #5c6071;
}

.quiz-field select {
  min-width: 160px;
  border: 1px solid #cfd2dc;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 14px;
  color: #161b30;
  background: #ffffff;
}

.quiz-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfd2dc;
  background: #ffffff;
  color: #171d35;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.quiz-button:hover:not(:disabled) {
  border-color: #9da3bb;
  background: #f3f4f7;
}

.quiz-button.primary {
  background: #171d35;
  border-color: #171d35;
  color: #ffffff;
}

.quiz-button.primary:hover:not(:disabled) {
  background: #222b50;
  border-color: #222b50;
}

.quiz-button.ghost {
  background: transparent;
  border-color: transparent;
  color: #5c6071;
}

.quiz-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.quiz-best {
  margin-top: 18px;
  border-top: 1px dashed #dbdde4;
  padding-top: 16px;
  font-size: 14px;
  color: #3d4256;
  line-height: 1.7;
}

.quiz-best strong {
  color: #171d35;
}

.quiz-message {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #8a5a1f;
}

.quiz-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #5c6071;
  margin-bottom: 8px;
}

.quiz-progress-track {
  height: 6px;
  border-radius: 999px;
  background: #e8e9ee;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  width: 0;
  background: #2f3b6d;
  transition: width 0.2s ease;
}

.quiz-prompt {
  margin: 26px 0 4px;
  font-size: 24px;
  line-height: 1.5;
  color: #12172a;
  word-break: break-word;
}

.quiz-phonetic {
  margin: 0;
  font-size: 14px;
  color: #7a7e8d;
}

.quiz-options {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #d5d7e0;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 15px;
  color: #1d233a;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.quiz-option:hover {
  border-color: #9da3bb;
}

.quiz-option.is-selected {
  border-color: #2f3b6d;
  background: #eeeff5;
}

.quiz-option-marker {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eeeff2;
  color: #474c60;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-option.is-selected .quiz-option-marker {
  background: #2f3b6d;
  color: #ffffff;
}

.quiz-question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.quiz-result-head {
  display: flex;
  align-items: center;
  gap: 20px;
}

.quiz-result-ring {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 6px solid #2f3b6d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #171d35;
}

.quiz-result-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #161b30;
}

.quiz-result-head p {
  margin: 0;
  font-size: 14px;
  color: #5c6071;
  line-height: 1.6;
}

.quiz-wrong-list {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.quiz-wrong-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  border: 1px solid #eadfc8;
  background: #fdf9f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
}

.quiz-wrong-item strong {
  color: #7a4f12;
}

.quiz-wrong-item span {
  color: #6b5a3c;
}

.quiz-board-me {
  margin-bottom: 16px;
  border: 1px solid #bcc1d6;
  background: #eeeff5;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #1d233a;
}

.quiz-board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.quiz-board-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #e4e5eb;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 14px;
  color: #292e41;
  background: #ffffff;
}

.quiz-board-row.is-me {
  border-color: #2f3b6d;
  background: #eeeff5;
}

.quiz-board-rank {
  font-weight: 700;
  color: #7a7e8d;
}

.quiz-board-row:nth-child(1) .quiz-board-rank {
  color: #b8860b;
}

.quiz-board-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-board-score {
  font-weight: 700;
  color: #171d35;
}

.quiz-board-meta {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #7a7e8d;
}

@media (max-width: 720px) {
  .quiz-main {
    width: min(100%, 100% - 24px);
    padding-top: 18px;
  }

  .quiz-hero {
    align-items: flex-start;
  }

  .quiz-pool-stats {
    width: 100%;
    justify-content: space-between;
  }

  .quiz-pool-stats div {
    text-align: left;
  }

  .quiz-panel {
    padding: 18px;
  }

  .quiz-prompt {
    font-size: 20px;
  }

  .quiz-account {
    display: none;
  }

  .quiz-board-row {
    grid-template-columns: 34px 1fr auto;
    gap: 8px;
    padding: 10px 12px;
  }
}
