/* 活动问卷调查 —— 淡雅科技风，浅蓝玻璃质感 */
:root {
  --bg: #f4f8ff;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --line: rgba(47, 107, 255, 0.12);
  --text: #16233a;
  --text-soft: #5b6b86;
  --accent: #2f6bff;
  --accent-soft: rgba(47, 107, 255, 0.08);
  --accent-line: rgba(47, 107, 255, 0.32);
  --shadow: 0 18px 42px rgba(31, 74, 156, 0.1);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* 背景光斑，给纯色底加一点层次 */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.glow-a { width: 460px; height: 460px; top: -160px; left: -120px; background: #cfe0ff; }
.glow-b { width: 380px; height: 380px; bottom: -140px; right: -100px; background: #d7f0ff; }

.shell {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 120px;
}

/* ---------- 头部 ---------- */
.hero { margin-bottom: 28px; }

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.lead {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 15px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.meta li {
  padding: 4px 12px;
  font-size: 13px;
  color: var(--text-soft);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ---------- 面板 / 状态 ---------- */
.panel {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
}
.panel.center { text-align: center; }

.hidden { display: none !important; }
.muted { color: var(--text-soft); margin: 6px 0; }
.small { font-size: 13px; }
.emoji { font-size: 40px; margin: 0 0 8px; }

.spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 3px solid rgba(47, 107, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 题目 ---------- */
.question-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.question {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(31, 74, 156, 0.06);
  padding: 20px 20px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.question.is-answered { border-color: var(--accent-line); }
.question.is-invalid { border-color: #ff8a8a; box-shadow: 0 0 0 3px rgba(255, 138, 138, 0.14); }
.question.is-target { animation: nudge 0.5s ease; }
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

.q-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.q-no {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 2px 8px;
}
.q-title { font-size: 16px; font-weight: 600; line-height: 1.5; }

.q-tag {
  display: inline-block;
  margin: 4px 0 12px 0;
  font-size: 12px;
  color: var(--text-soft);
}
.q-tag::before { content: "· "; }

/* 选项 */
.options { display: flex; flex-direction: column; gap: 8px; }

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  color: #24344f;
  background: #fbfdff;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.option:hover { border-color: var(--accent-line); background: #f7faff; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .dot {
  flex: none;
  width: 16px;
  height: 16px;
  border: 2px solid #c8d5ec;
  border-radius: 50%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.option input:checked + .dot {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 10px var(--accent);
}
.option:has(input:checked) {
  border-color: var(--accent);
  background: #f1f6ff;
  transform: translateY(-1px);
}

/* 多选题标签：点击即选中，可多选 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 14px;
}
.chip {
  padding: 8px 16px;
  font: inherit;
  font-size: 14px;
  color: #24344f;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.chip:hover { border-color: var(--accent-line); background: #f7faff; }
.chip.is-on {
  color: #fff;
  background: linear-gradient(135deg, #4f86ff, #2f6bff);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.22);
  transform: translateY(-1px);
}

/* 开放题 */
.hint {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.hint span {
  font-size: 13px;
  color: var(--text-soft);
  background: #f4f8ff;
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 12px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.1);
}

/* ---------- 提交区 ---------- */
.submit-bar {
  position: sticky;
  bottom: 16px;
  margin-top: 22px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.progress { flex: 1; min-width: 0; }
.progress-track {
  height: 6px;
  background: var(--accent-soft);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6aa8ff, var(--accent));
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-text {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-soft);
}

.primary-btn {
  flex: none;
  padding: 12px 26px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #4f86ff, #2f6bff);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(47, 107, 255, 0.34); }
.primary-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.ghost-btn {
  padding: 8px 18px;
  font: inherit;
  font-size: 14px;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  cursor: pointer;
}

.form-error {
  margin: 12px 0 0;
  padding: 10px 14px;
  font-size: 14px;
  color: #c0392b;
  background: #fff3f2;
  border: 1px solid #ffd6d2;
  border-radius: 10px;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: #93a3bd;
}

code {
  padding: 2px 6px;
  font-size: 13px;
  background: #f1f6ff;
  border-radius: 6px;
  color: var(--accent);
}

/* ---------- 小屏 ---------- */
@media (max-width: 560px) {
  .shell { padding: 28px 14px 110px; }
  .hero h1 { font-size: 23px; }
  .question { padding: 16px 14px 12px; }
  .submit-bar { flex-direction: column; align-items: stretch; gap: 10px; bottom: 8px; }
  .primary-btn { width: 100%; }
  .option { padding: 12px; }
}
