/* ===== MITB 人格测试 - 样式表 ===== */

:root {
  --primary: #6c5ce7;
  --primary-dark: #5849c2;
  --primary-light: #a29bfe;
  --accent: #fd79a8;
  --accent-dark: #e84393;
  --bg-dark: #0f0f1e;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --text-main: #e8e8f0;
  --text-dim: #9999b0;
  --text-bright: #ffffff;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #ff7675;
  --border: #2a2a45;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景装饰 */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 30%, rgba(108, 92, 231, 0.08), transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(253, 121, 168, 0.06), transparent 50%);
  z-index: -1;
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, -30px); }
}

/* ===== 通用容器 ===== */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ===== 页面切换 ===== */
.page {
  display: none;
  animation: fadeInUp 0.5s ease;
}

.page.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 开始界面 ===== */
.start-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  width: 100%;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.start-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.logo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 800;
  color: white;
  letter-spacing: -2px;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}

.start-card h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.start-card .subtitle {
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 32px;
  line-height: 1.6;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}

.feature-tag {
  padding: 6px 16px;
  background: rgba(108, 92, 231, 0.12);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: 20px;
  font-size: 13px;
  color: var(--primary-light);
}

.info-box {
  background: rgba(0, 184, 148, 0.08);
  border: 1px solid rgba(0, 184, 148, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
  text-align: left;
}

.info-box p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}

.info-box strong {
  color: var(--success);
}

/* ===== 免责声明框 ===== */
.disclaimer-box {
  background: rgba(255, 118, 117, 0.08);
  border: 1px solid rgba(255, 118, 117, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 32px;
  text-align: left;
}

.disclaimer-box strong {
  color: var(--danger);
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

.disclaimer-box p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}

.disclaimer-box strong em,
.disclaimer-box p strong {
  color: var(--danger);
  font-style: normal;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(108, 92, 231, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 20px rgba(253, 121, 168, 0.35);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(253, 121, 168, 0.5);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ===== 答题界面 ===== */
.quiz-header {
  width: 100%;
  margin-bottom: 24px;
}

.quiz-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.quiz-counter {
  font-size: 14px;
  color: var(--text-dim);
}

.quiz-counter span {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 16px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  transition: width 0.4s ease;
  width: 0%;
}

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  width: 100%;
  box-shadow: var(--shadow);
}

.question-number {
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 1px;
}

.question-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.5;
  margin-bottom: 32px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.option {
  display: flex;
  align-items: center;
  padding: 20px 24px;
  background: var(--bg-card-hover);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.5;
}

.option:hover {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.1);
  transform: translateX(4px);
}

.option.selected {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.15);
}

.option-letter {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-right: 16px;
  transition: var(--transition);
  color: var(--text-dim);
}

.option.selected .option-letter {
  background: var(--primary);
  color: white;
}

.option:hover .option-letter {
  color: var(--primary-light);
}

/* ===== Likert 量表 ===== */
.likert-scale {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.likert-option {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-card-hover);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  color: var(--text-main);
}

.likert-option:hover {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.1);
  transform: translateX(4px);
}

.likert-option.selected {
  border-color: var(--primary);
  background: rgba(108, 92, 231, 0.15);
}

.likert-circle {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-right: 14px;
  transition: var(--transition);
  color: var(--text-dim);
}

.likert-option.selected .likert-circle {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 12px rgba(108, 92, 231, 0.4);
}

.likert-option:hover .likert-circle {
  color: var(--primary-light);
}

.likert-label {
  font-size: 14px;
}

.reverse-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.7;
  font-style: italic;
}

/* ===== 维度子描述 ===== */
.dim-facet-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 4px;
  font-style: italic;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

.quiz-nav .btn {
  padding: 12px 28px;
  font-size: 14px;
}

/* ===== 结算界面 ===== */
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  width: 100%;
  box-shadow: var(--shadow);
  text-align: center;
}

.result-type-badge {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(108, 92, 231, 0.4);
}

.result-type-badge .type-code {
  font-size: 36px;
  font-weight: 800;
  color: white;
  letter-spacing: 2px;
  line-height: 1;
}

.result-type-badge .type-name {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
}

.result-card h2 {
  font-size: 24px;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.result-card .result-desc {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* 维度得分条 */
.dimension-scores {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
  text-align: left;
}

.dim-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dim-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.dim-labels span:first-child {
  color: var(--text-dim);
}

.dim-labels span:last-child {
  color: var(--text-dim);
}

.dim-labels .active-label {
  color: var(--primary-light) !important;
  font-weight: 600;
}

.dim-bar {
  width: 100%;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  position: relative;
}

.dim-bar-first {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.6s ease;
  border-radius: 12px 0 0 12px;
}

.dim-bar-second {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: width 0.6s ease;
  border-radius: 0 12px 12px 0;
}

.dim-percent {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

/* 维度得分新样式 */
.dim-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.dim-score-label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  flex-shrink: 0;
}

.dim-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.dim-name {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.dim-score-bar-bg {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.dim-score-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s ease;
}

.dim-score-value {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 60px;
  flex-shrink: 0;
}

.dim-score-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.dim-score-pct {
  font-size: 12px;
  color: var(--text-dim);
}

/* API 配置区域 */
.api-config {
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: left;
}

.api-config-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-config-hint {
  font-size: 13px;
  color: var(--warning);
  margin-bottom: 20px;
  line-height: 1.5;
}

.api-config-hint.no-api {
  color: var(--danger);
}

.form-group {
  margin-bottom: 16px;
  position: relative;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #555568;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

/* ===== 下拉选择列表 ===== */
.dropdown-toggle {
  font-size: 12px;
  color: var(--primary-light);
  cursor: pointer;
  font-weight: 500;
  user-select: none;
  transition: var(--transition);
}

.dropdown-toggle:hover {
  color: var(--accent);
}

.form-group {
  position: relative;
}

.provider-dropdown,
.model-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  max-height: 280px;
  overflow-y: auto;
  margin-top: 4px;
}

.dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid rgba(42, 42, 69, 0.5);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: rgba(108, 92, 231, 0.15);
}

.dropdown-item-name {
  display: block;
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
}

.dropdown-item-url {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  word-break: break-all;
}

/* 报告区域 */
.report-section {
  margin-top: 24px;
  text-align: left;
}

.report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.report-loading p {
  color: var(--text-dim);
  font-size: 14px;
}

/* ===== 流式输出区域 ===== */
.report-streaming {
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.streaming-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.streaming-header span {
  font-size: 14px;
  color: var(--text-dim);
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* 生成进度条 */
.streaming-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  padding: 8px 12px;
  background: rgba(108, 92, 231, 0.08);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.progress-item strong {
  color: var(--primary-light);
  font-weight: 600;
}

/* 流式文本 */
.streaming-text {
  max-height: 500px;
  overflow-y: auto;
  line-height: 1.8;
  font-size: 15px;
  color: var(--text-main);
  word-wrap: break-word;
}

.streaming-text h1,
.streaming-text h2,
.streaming-text h3 {
  color: var(--text-bright);
  margin: 16px 0 8px;
}

.streaming-text h1 { font-size: 22px; }
.streaming-text h2 { font-size: 19px; }
.streaming-text h3 { font-size: 16px; }

.streaming-text strong {
  color: var(--primary-light);
}

.streaming-text ul,
.streaming-text ol {
  margin: 8px 0 8px 24px;
}

.streaming-text p {
  margin-bottom: 12px;
}

/* 闪烁光标 */
.streaming-cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  background: var(--primary-light);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Token 消耗统计 */
.report-token-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 16px;
  padding: 12px 20px;
  background: rgba(108, 92, 231, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(108, 92, 231, 0.15);
}

.token-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.token-label {
  color: var(--text-dim);
}

.token-value {
  color: var(--primary-light);
  font-weight: 600;
}

.report-content {
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  line-height: 1.8;
  font-size: 15px;
  color: var(--text-main);
  word-wrap: break-word;
}

.report-content h1,
.report-content h2,
.report-content h3 {
  color: var(--text-bright);
  margin: 16px 0 8px;
}

.report-content h1 { font-size: 22px; }
.report-content h2 { font-size: 19px; }
.report-content h3 { font-size: 16px; }

.report-content strong {
  color: var(--primary-light);
}

.report-content ul,
.report-content ol {
  margin: 8px 0 8px 24px;
}

.report-content ul ul,
.report-content ol ol,
.report-content ul ol,
.report-content ol ul {
  margin: 4px 0 4px 16px;
}

.report-content li {
  margin-bottom: 4px;
}

.report-content p {
  margin-bottom: 12px;
}

.report-error {
  background: rgba(255, 118, 117, 0.1);
  border: 1px solid rgba(255, 118, 117, 0.3);
  border-radius: 12px;
  padding: 20px;
  color: var(--danger);
  font-size: 14px;
  line-height: 1.6;
}

.report-error strong {
  color: var(--danger);
}

.report-stopped {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 12px;
  padding: 20px;
  color: var(--warning, #ffc107);
  font-size: 14px;
  line-height: 1.6;
}

.report-stopped strong {
  color: var(--warning, #ffc107);
}

.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: nowrap;
}

/* ===== 用时统计 ===== */
.time-stats {
  margin: 24px 0;
}

.time-stats-card {
  background: rgba(100, 180, 255, 0.05);
  border: 1px solid rgba(100, 180, 255, 0.15);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
}

.time-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.time-label {
  font-size: 13px;
  color: var(--text-muted);
}

.time-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary-light);
}

/* ===== 答题回顾 ===== */
.review-section {
  margin: 24px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
}

.review-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}

.review-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.review-toggle span:first-child {
  font-size: 15px;
  font-weight: 500;
}

.review-arrow {
  font-size: 12px;
  transition: transform 0.2s;
}

.review-content {
  max-height: 600px;
  overflow-y: auto;
}

.review-list {
  padding: 12px;
}

.review-item {
  padding: 16px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.review-item.unanswered {
  border-left-color: var(--danger);
  opacity: 0.7;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.review-q-num {
  font-weight: 600;
  color: var(--primary-light);
}

.review-dim {
  color: var(--text-muted);
}

.review-time {
  color: var(--text-muted);
  font-size: 12px;
}

.review-question {
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.review-answer {
  font-size: 13px;
  color: var(--text-secondary);
}

.no-answer {
  color: var(--danger);
  font-style: italic;
}

/* ===== Toast 提示 ===== */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== 暂停按钮 ===== */
.quiz-pause-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.quiz-pause-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* ===== 暂停页面 ===== */
#page-pause.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.pause-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.pause-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.8;
}

.pause-card h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--text);
}

.pause-hint {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 14px;
}

.pause-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn-danger {
  background: rgba(255, 118, 117, 0.15);
  border: 1px solid rgba(255, 118, 117, 0.3);
  color: var(--danger);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: rgba(255, 118, 117, 0.25);
  border-color: rgba(255, 118, 117, 0.5);
}

.btn-stop {
  background: rgba(255, 118, 117, 0.15);
  color: var(--danger);
  border: 1px solid rgba(255, 118, 117, 0.3);
  padding: 14px 40px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  letter-spacing: 0.5px;
}

.btn-stop:hover {
  background: rgba(255, 118, 117, 0.25);
  border-color: rgba(255, 118, 117, 0.5);
  transform: translateY(-2px);
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
  .container {
    padding: 12px;
  }

  .start-card {
    padding: 32px 20px;
  }

  .start-card h1 {
    font-size: 26px;
  }

  .question-card {
    padding: 28px 20px;
  }

  .question-text {
    font-size: 19px;
  }

  .option {
    padding: 16px;
    font-size: 14px;
  }

  .result-card {
    padding: 28px 20px;
  }

  .result-type-badge {
    width: 96px;
    height: 96px;
  }

  .result-type-badge .type-code {
    font-size: 28px;
  }

  .form-row {
    flex-direction: column;
  }
}