/* ========== Quiz / Assessment Page ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #1a5c9e;
  --primary-dark: #0d3d6e;
  --primary-light: #e8f2fc;
  --primary-lighter: #f4f9fe;
  --accent: #d4a017;
  --accent-light: #fdf6e3;
  --text-dark: #2c2c2c;
  --text-body: #4a4a4a;
  --text-muted: #888;
  --border: #e3e8ee;
  --bg-light: #f5f8fc;
  --white: #ffffff;
  --green: #0f6e56;
  --danger: #d85a30;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text-body);
  background: var(--bg-light);
  line-height: 1.7;
}
a { text-decoration: none; color: var(--primary); }
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* Header */
.quiz-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.quiz-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.quiz-logo { display: flex; align-items: center; gap: 10px; }
.quiz-logo .lg { width: 38px; height: 38px; background: var(--primary); border-radius: 9px; color: #fff; font-weight: bold; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.quiz-logo span { font-size: 17px; color: var(--text-dark); font-weight: 600; }
.quiz-header a.back { font-size: 13px; color: var(--text-muted); }

/* Hero */
.quiz-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 30px 0 26px;
}
.quiz-hero h1 { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.quiz-hero p { font-size: 13px; color: rgba(255,255,255,0.75); }
.quiz-sub { margin-bottom: 18px; }

/* 基本信息表单 */
.info-form {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 22px 24px;
  margin-top: 8px;
  backdrop-filter: blur(2px);
}
.info-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.info-field { display: flex; flex-direction: column; gap: 6px; }
.info-field label { font-size: 12.5px; color: rgba(255,255,255,0.9); font-weight: 500; }
.info-field .req { color: #ffd54f; }
.info-field input, .info-field select {
  height: 40px; border: 1px solid rgba(255,255,255,0.25); border-radius: 8px;
  padding: 0 8px; font-size: 13px; color: var(--text-dark); background: #fff; width: 100%;
}
.info-field input:focus, .info-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212,160,23,0.25); }
.info-field input::placeholder { font-size: 10px; }
.info-field input::-webkit-input-placeholder { font-size: 10px; }
.info-field input::-moz-placeholder { font-size: 10px; }
.info-field input:-ms-input-placeholder { font-size: 10px; }
.info-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.info-tip { font-size: 12px; color: rgba(255,255,255,0.65); }
.photo-prev { margin-top: 4px; }
.field-hint { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 4px; line-height: 1.5; }
#f_photo { color: #fff; font-size: 12px; }

@media (max-width: 768px) {
  .info-row { grid-template-columns: repeat(2, 1fr); }
}
.timer-box {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 14px;
}
.timer-box .timer-label { color: rgba(255,255,255,0.8); }
.timer-box .timer-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.quiz-progress {
  margin-top: 14px;
  height: 6px;
  background: rgba(255,255,255,0.18);
  border-radius: 4px;
  overflow: hidden;
}
.quiz-progress .bar { height: 100%; width: 0%; background: var(--accent); transition: width 0.3s; }

/* Questions */
.quiz-body { padding: 28px 0 120px; }
.quiz-section { margin-bottom: 26px; }
.quiz-section-title {
  font-size: 16px; font-weight: 600; color: var(--text-dark);
  padding: 10px 16px; background: var(--white);
  border-left: 4px solid var(--primary);
  border-radius: 6px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.quiz-q {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.quiz-q .q-title { font-size: 14px; color: var(--text-dark); margin-bottom: 12px; }
.quiz-q .q-title .q-no { color: var(--primary); font-weight: 700; margin-right: 6px; }
.quiz-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.quiz-opt {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 4px;
  text-align: center;
  font-size: 12px;
  color: var(--text-body);
  cursor: pointer;
  background: var(--white);
  transition: all 0.15s;
}
.quiz-opt:hover { border-color: var(--primary); background: var(--primary-lighter); }
.quiz-opt.selected { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* Submit bar */
.quiz-submit-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.05);
  padding: 14px 0;
  z-index: 60;
}
.quiz-submit-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.quiz-submit-bar .tip { font-size: 13px; color: var(--text-muted); }
.quiz-submit-bar .answered { color: var(--primary); font-weight: 600; }
.btn-quiz-submit {
  background: var(--accent); color: #fff; border: none;
  padding: 12px 40px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.2s;
}
.btn-quiz-submit:hover { background: #b88a0e; }
.btn-quiz-submit:disabled { background: #ccc; cursor: not-allowed; }

/* Result */
.quiz-result { padding: 30px 0 60px; }
.result-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.result-card h2 { font-size: 22px; color: var(--text-dark); text-align: center; margin-bottom: 6px; }
.result-time {
  text-align: center;
  font-size: 15px;
  color: var(--text-body);
  background: var(--accent-light);
  border: 1px solid #f0e2bd;
  border-radius: 10px;
  padding: 12px;
  margin: 18px 0 24px;
}
.result-time b { color: var(--accent); font-size: 18px; }
.result-dims { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 24px; }
.result-dim { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.result-dim .rd-name { font-size: 14px; color: var(--text-dark); font-weight: 600; margin-bottom: 8px; }
.result-dim .rd-bar { height: 8px; background: var(--bg-light); border-radius: 4px; overflow: hidden; }
.result-dim .rd-bar .fill { height: 100%; background: linear-gradient(90deg, var(--primary), #3a8fd0); }
.result-dim .rd-score { font-size: 13px; color: var(--primary); font-weight: 700; margin-top: 6px; }
.result-actions { display: flex; gap: 14px; justify-content: center; }
.btn-ghost { border: 1px solid var(--primary); color: var(--primary); background: #fff; padding: 11px 28px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.btn-ghost:hover { background: var(--primary-light); }

@media (max-width: 768px) {
  .quiz-options { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .quiz-opt { font-size: 11px; padding: 8px 2px; }
  .result-dims { grid-template-columns: 1fr; }
}
