/* ===== 问卷系统 v3.0 全局样式 — 简洁清新·科技感 ===== */
* { margin:0; padding:0; box-sizing:border-box; }
:root {
  --primary: #4f6ef7;
  --primary-dark: #3b5de7;
  --accent: #7c3aed;
  --cyan: #06b6d4;
  --bg: #f0f4ff;
  --card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(79,110,247,0.08);
  --shadow-hover: 0 4px 20px rgba(79,110,247,0.15);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶部导航 ===== */
.topbar {
  background: linear-gradient(135deg, #fff 0%, #f8faff 100%);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.topbar .logo {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .logo::before { content: '📊'; font-size: 20px; -webkit-text-fill-color: initial; }
.topbar .nav a {
  margin-left: 24px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}
.topbar .nav a:hover { background: rgba(79,110,247,0.08); text-decoration: none; color: var(--primary); }
.topbar .nav a.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }

/* ===== 布局 ===== */
.container { max-width: 1200px; margin: 24px auto; padding: 0 24px; }
.container-narrow { max-width: 820px; margin: 24px auto; padding: 0 24px; }

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(226,232,240,0.6);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(79,110,247,0.15); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), #6d28d9); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; border: none; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-success { background: var(--success); color: #fff; border: none; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ===== 表格 ===== */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f1f5f9; }
th { background: #f8fafc; font-weight: 600; color: var(--text-light); font-size: 13px; }
tr:hover { background: #f8faff; }

/* ===== 标签 ===== */
.tag { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.tag-draft { background: #f1f5f9; color: #64748b; }
.tag-published { background: #ecfdf5; color: #059669; }
.tag-closed { background: #fef2f2; color: #dc2626; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text); font-size: 14px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  background: #fff;
  color: var(--text);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,110,247,0.1);
}
.form-textarea { min-height: 90px; resize: vertical; font-family: inherit; line-height: 1.6; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* ===== 开关 ===== */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; border-radius: 26px; transition: 0.3s; }
.slider:before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
input:checked + .slider { background: linear-gradient(135deg, var(--primary), var(--accent)); }
input:checked + .slider:before { transform: translateX(20px); }

/* ===== 编辑器布局 ===== */
.editor-layout { display: flex; min-height: calc(100vh - 58px); }
.editor-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #fff 0%, #f8faff 100%);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  overflow-y: auto;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  flex-shrink: 0;
}
.editor-sidebar h4 {
  font-size: 12px;
  color: var(--text-light);
  margin: 14px 4px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.editor-sidebar h4:first-child { margin-top: 0; }
.type-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 48%;
  padding: 8px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
  transition: all 0.2s;
  color: var(--text);
  margin-bottom: 4px;
  vertical-align: top;
}
.type-btn:hover { background: rgba(79,110,247,0.08); border-color: rgba(79,110,247,0.2); color: var(--primary); }
.type-btn .icon { font-size: 15px; width: 20px; text-align: center; }
.editor-main { flex: 1; padding: 22px; max-width: 880px; margin: 0 auto; width: 100%; }

/* ===== 题目卡片 ===== */
.q-item {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  position: relative;
  transition: all 0.2s;
}
.q-item:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); }
.q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 6px;
}
.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-right: 10px;
}
.q-actions button { margin-left: 2px; }
.q-act-btn {
  font-size: 11px !important;
  padding: 4px 7px !important;
  border-radius: 5px !important;
  white-space: nowrap;
}
.option-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.option-item .opt-input { flex: 1; }
.option-item .opt-del { color: var(--danger); cursor: pointer; font-size: 20px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.option-item .opt-del:hover { background: #fef2f2; }
.add-option { color: var(--primary); cursor: pointer; font-size: 13px; margin-top: 6px; display: inline-block; font-weight: 500; }
.add-option:hover { text-decoration: underline; }

.logic-section { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.logic-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; font-size: 13px; }
.logic-row select, .logic-row input { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }

.config-section { margin-top: 12px; padding: 14px; background: #f8fafc; border-radius: 8px; border: 1px solid #f1f5f9; }
.config-section .form-group { margin-bottom: 10px; }

/* ===== 填写端（移动端优先·清新科技风） ===== */
.survey-wrap { max-width: 720px; margin: 0 auto; padding: 16px; min-height: 100vh; }
.survey-header {
  background: linear-gradient(135deg, #fff 0%, #f0f4ff 100%);
  border-radius: 16px;
  padding: 32px 24px;
  margin-bottom: 18px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(79,110,247,0.1);
  position: relative;
  overflow: hidden;
}
.survey-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(79,110,247,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.survey-header h1 { font-size: 22px; margin-bottom: 10px; color: var(--text); position: relative; font-weight: 700; }
.survey-header p { color: var(--text-light); line-height: 1.7; font-size: 14px; position: relative; }
.fill-q {
  background: #fff;
  border-radius: 14px;
  padding: 20px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid rgba(226,232,240,0.6);
  transition: all 0.25s ease;
}
.fill-q:hover {
  box-shadow: 0 4px 20px rgba(79,110,247,0.08);
  border-color: rgba(79,110,247,0.15);
}
.fill-q-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
  line-height: 1.6;
}
.fill-q-title .required { color: #ef4444; margin-right: 4px; }
.fill-option {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  font-size: 14px;
  color: #334155;
}
.fill-option:hover {
  border-color: #a5b4fc;
  background: #f8faff;
}
.fill-option.selected {
  border-color: #4f6ef7;
  background: linear-gradient(135deg, #eef2ff 0%, #f0f4ff 100%);
  color: #4f6ef7;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(79,110,247,0.1);
}
.fill-options-horizontal { display: flex; flex-wrap: wrap; gap: 8px; }
.fill-options-horizontal .fill-option { margin-bottom: 0; flex: 1; min-width: 100px; justify-content: center; }
.fill-text-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s;
  box-sizing: border-box;
}
.fill-text-input:focus {
  outline: none;
  border-color: #4f6ef7;
  box-shadow: 0 0 0 3px rgba(79,110,247,0.1);
}
.fill-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}
.fill-select:focus { outline: none; border-color: #4f6ef7; }
.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 18px;
}
.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, #4f6ef7 0%, #818cf8 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.submit-area { text-align: center; margin-top: 24px; }
.submit-area .btn {
  padding: 13px 56px;
  font-size: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f6ef7 0%, #6366f1 100%);
  border: none;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(79,110,247,0.25);
  transition: all 0.2s;
}
.submit-area .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,110,247,0.35);
}
.submit-area .btn:active { transform: translateY(0); }
.fill-q:hover { box-shadow: var(--shadow-hover); }
.fill-q .q-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; line-height: 1.5; color: var(--text); }
.fill-q .q-desc { font-size: 13px; color: var(--text-light); margin-bottom: 14px; line-height: 1.6; }
.fill-q .q-title .req { color: var(--danger); margin-right: 4px; font-weight: 700; }
.fill-option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.fill-option:hover { border-color: var(--primary); background: #f8faff; }
.fill-option.selected { border-color: var(--primary); background: linear-gradient(135deg, #f0f4ff, #ede9fe); }
.fill-option input[type=radio], .fill-option input[type=checkbox] {
  margin-right: 12px;
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  flex-shrink: 0;
  cursor: pointer;
}
.fill-option span { font-size: 15px; line-height: 1.5; color: var(--text); }
/* 选项横向排列 */
.fill-options-horizontal { display: flex; flex-wrap: wrap; gap: 10px; }
.fill-options-horizontal .fill-option { margin-bottom: 0; flex: 1; min-width: calc(50% - 5px); }
.fill-text-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
  background: #fff;
}
.fill-text-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,110,247,0.1); }
.fill-textarea { min-height: 110px; resize: vertical; font-family: inherit; line-height: 1.6; }
.submit-area { text-align: center; padding: 20px 0 32px; }
.submit-area .btn {
  padding: 14px 56px;
  font-size: 16px;
  border-radius: 25px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(79,110,247,0.3);
}

/* 下拉 */
.fill-select { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; background: #fff; cursor: pointer; }
.fill-select:focus { border-color: var(--primary); outline: none; }
.multi-select-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.multi-select-tag {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  background: #fff;
  user-select: none;
}
.multi-select-tag:hover { border-color: var(--primary); color: var(--primary); }
.multi-select-tag.selected { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }
.multi-select-tag.disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

/* 级联 */
.cascade-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cascade-row select { flex: 1; min-width: 100px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff; }

/* 量表 */
.scale-row { display: flex; justify-content: space-between; gap: 6px; margin-top: 10px; }
.scale-item {
  flex: 1;
  text-align: center;
  padding: 12px 4px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
  font-weight: 600;
  background: #fff;
  user-select: none;
}
.scale-item:hover { border-color: var(--primary); color: var(--primary); }
.scale-item.selected { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; transform: scale(1.05); }
.scale-labels { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--text-light); }

/* 表格填空 */
.fill-table { width: 100%; border-collapse: collapse; margin-top: 8px; border-radius: 8px; overflow: hidden; }
.fill-table th, .fill-table td { border: 1px solid var(--border); padding: 8px; text-align: center; font-size: 14px; }
.fill-table th { background: #f8fafc; font-weight: 600; color: var(--text-light); }
.fill-table input { width: 100%; border: none; padding: 6px; text-align: center; font-size: 14px; background: transparent; outline: none; }
.fill-table input:focus { background: #f0f4ff; border-radius: 4px; }

/* 填空多空 */
.fill-blank-content { font-size: 15px; line-height: 2.2; }
.fill-blank-input {
  display: inline-block;
  width: 130px;
  border: none;
  border-bottom: 2px solid var(--primary);
  padding: 2px 8px;
  font-size: 15px;
  text-align: center;
  outline: none;
  margin: 0 4px;
  background: rgba(79,110,247,0.03);
  border-radius: 4px 4px 0 0;
}
.fill-blank-input:focus { background: rgba(79,110,247,0.08); }

/* 说明块 */
.desc-block {
  background: linear-gradient(135deg, #f0f4ff, #ede9fe);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 14px;
  line-height: 1.8;
  font-size: 15px;
  color: var(--text);
}

/* 密码弹窗 */
.password-mask { position: fixed; inset: 0; background: rgba(15,23,42,0.6); display: flex; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(4px); }
.password-box { background: #fff; border-radius: 16px; padding: 32px 28px; width: 340px; max-width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.password-box h3 { margin-bottom: 8px; text-align: center; font-size: 18px; }
.password-box p { color: var(--text-light); margin-bottom: 20px; font-size: 13px; text-align: center; }

/* 进度条 */
.progress-bar { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-bottom: 18px; }
.progress-bar .fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent), var(--cyan)); transition: width 0.4s ease; border-radius: 3px; }

/* 提示 */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; line-height: 1.6; }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226,232,240,0.5);
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-card .num { font-size: 30px; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-card .label { color: var(--text-light); font-size: 13px; margin-top: 6px; font-weight: 500; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.pagination button { min-width: 34px; height: 34px; border: 1px solid var(--border); background: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; transition: all 0.2s; }
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; border-color: transparent; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* 空状态 */
.empty { text-align: center; padding: 50px 20px; color: var(--text-light); }
.empty .icon { font-size: 52px; margin-bottom: 14px; opacity: 0.6; }

/* 模态框 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,0.55); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; backdrop-filter: blur(4px); }
.modal-box { background: #fff; border-radius: 16px; padding: 28px; width: 500px; max-width: 100%; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-box h3 { margin-bottom: 18px; font-size: 18px; }
.modal-actions { text-align: right; margin-top: 22px; }
.modal-actions .btn { margin-left: 10px; }

/* 表格填空编辑器 */
.table-fill-editor { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table-fill-editor th, .table-fill-editor td { border: 1px solid var(--border); padding: 6px; text-align: center; }
.table-fill-editor input { width: 100%; border: none; padding: 4px; text-align: center; background: transparent; outline: none; font-size: 13px; }

/* 级联编辑器 */
.cascade-level { margin-bottom: 10px; padding: 12px; background: #f8fafc; border-radius: 8px; }
.cascade-level h5 { font-size: 13px; margin-bottom: 8px; color: var(--text-light); font-weight: 600; }

/* 二维码弹窗 */
.qrcode-box { text-align: center; padding: 10px 0; }
.qrcode-box img { max-width: 260px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fff; }
.qrcode-box .qr-url { margin-top: 14px; padding: 10px 14px; background: #f8fafc; border-radius: 8px; font-size: 12px; color: var(--text-light); word-break: break-all; }

/* 配额提示 */
.quota-full { opacity: 0.45 !important; cursor: not-allowed !important; text-decoration: line-through; }
.quota-tag { font-size: 11px; color: var(--danger); margin-left: 6px; font-weight: 500; }

/* 分享页面 */
.share-wrap { max-width: 900px; margin: 0 auto; padding: 24px 16px; }
.share-header { text-align: center; padding: 32px 20px; background: linear-gradient(135deg, #fff, #f0f4ff); border-radius: 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
.share-header h1 { font-size: 24px; margin-bottom: 8px; }
.stat-bar { display: flex; justify-content: center; gap: 40px; margin-top: 16px; }
.stat-bar .item .num { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-bar .item .label { font-size: 12px; color: var(--text-light); }
.chart-card { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.chart-card h4 { margin-bottom: 14px; font-size: 15px; }
.bar-row { display: flex; align-items: center; margin-bottom: 10px; gap: 10px; }
.bar-row .bar-label { width: 120px; font-size: 13px; text-align: right; flex-shrink: 0; }
.bar-row .bar-track { flex: 1; height: 24px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 6px; transition: width 0.5s; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; color: #fff; font-size: 12px; font-weight: 600; min-width: 30px; }

/* ===== 移动端适配 ===== */
@media (max-width: 768px) {
  .topbar { padding: 0 16px; height: 52px; }
  .topbar .logo { font-size: 16px; }
  .topbar .nav a { margin-left: 8px; padding: 5px 10px; font-size: 13px; }
  .container { padding: 0 12px; margin: 14px auto; }
  .card { padding: 18px; }
  .editor-layout { flex-direction: column; }
  .editor-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px;
  }
  .editor-sidebar h4 { width: 100%; margin: 6px 0 2px; }
  .type-btn { width: auto; margin-bottom: 0; padding: 7px 10px; font-size: 12px; }
  .editor-main { padding: 14px; }
  .form-row { flex-direction: column; gap: 0; }
  .survey-wrap { padding: 12px; }
  .survey-header { padding: 24px 18px; }
  .survey-header h1 { font-size: 20px; }
  .fill-q { padding: 18px 16px; }
  .fill-q .q-title { font-size: 15px; }
  .fill-option { padding: 12px 14px; }
  .fill-option span { font-size: 14px; }
  .scale-item { font-size: 13px; padding: 10px 2px; }
  .cascade-row { flex-direction: column; }
  .cascade-row select { width: 100%; }
  table { font-size: 13px; }
  th, td { padding: 8px 10px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 16px 12px; }
  .stat-card .num { font-size: 24px; }
  .fill-options-horizontal .fill-option { min-width: 100%; }
  .bar-row .bar-label { width: 80px; font-size: 12px; }
}
