:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
  --success: #16a34a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

#app {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

h1 {
  font-size: 26px;
  margin: 0 0 8px;
}
h2 {
  font-size: 18px;
  margin: 0 0 16px;
}
.desc {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 14px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #eef2ff;
  color: var(--primary);
  border: 1px solid #c7d2fe;
}
.badge.warn {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}
.badge.danger {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}
.option:hover {
  border-color: #c7d2fe;
}
.option.selected {
  border-color: var(--primary);
  background: #eef2ff;
}

.option input[type="radio"],
.option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--primary);
}
.option .opt-label {
  flex: 1;
  font-size: 16px;
}
.option .opt-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
}
.option .opt-count {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.name-field {
  margin: 16px 0;
}
.name-field label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  font-weight: 500;
}
.name-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}
.name-field input:focus {
  outline: none;
  border-color: var(--primary);
}

.captcha-box {
  margin: 18px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: background 0.15s;
}
.btn:hover {
  background: var(--primary-hover);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.results {
  margin-top: 28px;
}
.result-bar {
  margin-bottom: 14px;
}
.result-bar .r-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}
.result-bar .r-track {
  height: 20px;
  background: #eef2ff;
  border-radius: 10px;
  overflow: hidden;
}
.result-bar .r-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 10px;
  transition: width 0.4s;
}

.msg {
  padding: 12px 16px;
  border-radius: 10px;
  margin: 16px 0;
  font-size: 14px;
}
.msg.error {
  background: #fee2e2;
  color: #b91c1c;
}
.msg.success {
  background: #dcfce7;
  color: #166534;
}

.loading {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}
