/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f8fafc;
  color: #334155;
  line-height: 1.6;
  padding-bottom: 80px;
  min-height: 100vh;
}

/* ===== Container ===== */
.page-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ===== Header ===== */
.page-header {
  text-align: center;
  padding: 32px 20px 24px;
  margin-bottom: 8px;
}
.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.page-header .subtitle-badge {
  display: inline-block;
  background: #3b82f6;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.page-header .instructions {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  text-align: left;
  margin-top: 16px;
}
.page-header .instructions p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.8;
  margin-bottom: 6px;
}
.page-header .instructions p:last-child { margin-bottom: 0; }
.page-header .instructions p::before {
  content: "•";
  color: #3b82f6;
  font-weight: 700;
  margin-right: 8px;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  padding: 20px 0 12px;
  border-bottom: 2px solid #3b82f6;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title .icon {
  width: 24px;
  height: 24px;
  background: #3b82f6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

/* ===== Basic Info Form ===== */
.form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}
.form-group {
  margin-bottom: 16px;
}
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}
.form-label .required {
  color: #ef4444;
  margin-left: 2px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  color: #334155;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}
.form-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
  background: #fff;
}
.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.form-error {
  font-size: 13px;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}
.form-error.visible { display: block; }

/* Date input */
.date-input {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  color: #334155;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
  cursor: pointer;
}
.date-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
  background-color: #fff;
}
.date-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

/* ===== Question Card ===== */
.question-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color 0.2s;
}
.question-card.has-error {
  border-color: #ef4444;
}
.question-number {
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 6px;
}
.question-text {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.6;
  margin-bottom: 14px;
}
.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
}
.option-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.option-btn.selected {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}
.option-btn .option-key {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s;
}
.option-btn.selected .option-key {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.question-error {
  font-size: 13px;
  color: #ef4444;
  margin-top: 8px;
  display: none;
}
.question-error.visible { display: block; }

/* ===== Bottom Bar ===== */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid #e2e8f0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}
.progress-info {
  font-size: 14px;
  color: #64748b;
}
.progress-info strong {
  color: #3b82f6;
  font-weight: 700;
}
.progress-bar-wrap {
  width: 120px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-top: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}
.submit-btn {
  padding: 12px 32px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
}
.submit-btn:hover { background: #2563eb; }
.submit-btn:active { transform: scale(0.97); }
.submit-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

/* ===== Result Page ===== */
.result-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #f8fafc;
  z-index: 200;
  overflow-y: auto;
}
.result-overlay.visible { display: block; }
.result-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 20px 40px;
}
.result-header {
  text-align: center;
  margin-bottom: 28px;
}
.result-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}
.result-header p {
  font-size: 14px;
  color: #64748b;
}

/* Score Cards */
.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.score-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.score-card .dim-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.score-card .dim-name {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 4px;
}
.score-card .dim-score {
  font-size: 32px;
  font-weight: 700;
}
.score-card.red .dim-icon { background: #fef2f2; }
.score-card.red .dim-score { color: #ef4444; }
.score-card.blue .dim-icon { background: #eff6ff; }
.score-card.blue .dim-score { color: #3b82f6; }
.score-card.yellow .dim-icon { background: #fefce8; }
.score-card.yellow .dim-score { color: #eab308; }
.score-card.green .dim-icon { background: #f0fdf4; }
.score-card.green .dim-score { color: #22c55e; }

/* Radar Chart */
.chart-section {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 24px;
  text-align: center;
}
.chart-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
}
.chart-section canvas {
  max-width: 320px;
  max-height: 320px;
  margin: 0 auto;
}

/* Warning */
.warning-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.warning-box .warn-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.warning-box .warn-text {
  font-size: 14px;
  color: #991b1b;
  line-height: 1.6;
}
.warning-box .warn-text strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

/* Result info */
.result-info {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}
.result-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}
.result-info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}
.result-info-row:last-child { border-bottom: none; }
.result-info-row .label { color: #64748b; }
.result-info-row .value { color: #1e293b; font-weight: 600; }

/* ===== Success Page ===== */
.success-page {
  text-align: center;
  padding: 48px 24px 40px;
  max-width: 420px;
  margin: 0 auto;
}
.success-icon-wrap {
  margin-bottom: 28px;
}
.success-checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #f0fdf4;
  animation: successPop 0.4s ease-out;
}
@keyframes successPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.success-title {
  font-size: 26px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 10px;
  letter-spacing: 1px;
}
.success-name {
  font-size: 15px;
  color: #64748b;
  margin: 0 0 24px;
}
.success-name strong {
  color: #1e293b;
  font-weight: 600;
}
.success-divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #22c55e);
  border-radius: 2px;
  margin: 0 auto 24px;
}
.success-hint {
  font-size: 15px;
  color: #475569;
  margin: 0 0 6px;
  line-height: 1.6;
}
.success-hint-sub {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 36px;
  line-height: 1.5;
}
.btn-restart {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 15px 24px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 1px;
}
.btn-restart:hover {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25);
}
.btn-restart:active {
  transform: translateY(0);
}
}

/* ===== Responsive ===== */
@media (min-width: 768px) {
  .page-container { padding: 32px 24px; }
  .form-card, .question-card { padding: 24px 32px; }
  .page-header h1 { font-size: 28px; }
  .option-btn { font-size: 15px; }
  .bottom-bar { padding: 16px 32px; }
  .progress-bar-wrap { width: 200px; }
}
@media (max-width: 420px) {
  .bottom-bar { padding: 10px 12px; }
  .submit-btn { padding: 10px 20px; font-size: 14px; }
}

/* ===== Academic Section (HR2 校招) ===== */
.campus-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 10px;
  vertical-align: middle;
}
.academic-notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #92400e;
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
}
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.radio-option {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #ffffff;
  user-select: none;
}
.radio-option:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}
.radio-option input[type="radio"] {
  margin: 0 10px 0 0;
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
  cursor: pointer;
}
.radio-option:has(input:checked) {
  border-color: #3b82f6;
  background: #eff6ff;
}
.radio-label {
  font-size: 15px;
  color: #1e293b;
}
@media (min-width: 768px) {
  .radio-group { flex-direction: row; flex-wrap: wrap; }
  .radio-option { flex: 1 1 calc(50% - 10px); min-width: 200px; }
}
