/* ============================================
   Risk Hunter — 全局样式
   ============================================ */

/* ===== CSS 变量（主题系统） ===== */
:root {
  --primary: #7C5CBF;
  --primary-light: #A78BFA;
  --primary-dark: #5B3E9B;
  --primary-bg: rgba(124, 92, 191, 0.08);
  --success: #22C55E;
  --success-bg: rgba(34, 197, 94, 0.08);
  --error: #EF4444;
  --error-bg: rgba(239, 68, 68, 0.08);
  --warning: #F59E0B;
  --bg: #F8F7FC;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --text: #1E1E2E;
  --text-light: #6B7280;
  --text-white: #FFFFFF;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --tab-height: 64px;
  --max-width: 480px;
  --transition-fast: 150ms ease-out;
  --transition-normal: 250ms ease-out;
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  background: #E8E5F0;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

/* ===== 主容器（手机 App 感） ===== */
#app {
  width: 100%;
  max-width: var(--max-width);
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ===== 页面系统 ===== */
.page {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: var(--tab-height);
}

.page.active {
  display: flex;
}

.sub-page {
  display: none;
  flex-direction: column;
  flex: 1;
}

.sub-page.active {
  display: flex;
}

/* ===== 页面头部 ===== */
.page-header {
  padding: 20px 16px 12px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.page-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--primary-bg);
  transform: scale(1.1);
}

.quiz-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quiz-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-level {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.quiz-type-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--primary-bg);
  color: var(--primary);
}

/* ===== 积分条 ===== */
.score-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.score-bar-large {
  padding: 20px 16px;
  justify-content: center;
  gap: 16px;
}

.score-label {
  font-size: 14px;
  color: var(--text-light);
}

.score-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.score-value-large {
  font-size: 48px;
}

/* ===== 底部 Tab 导航栏 ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--tab-height);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 100;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-light);
  transition: color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.tab-item.active {
  color: var(--primary);
}

.tab-item:hover {
  color: var(--primary-light);
}

.tab-icon {
  font-size: 22px;
  line-height: 1;
}

.tab-label {
  font-size: 11px;
  font-weight: 500;
}

/* ===== 按钮系统 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:disabled {
  background: var(--border);
  color: var(--text-light);
  cursor: not-allowed;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-bg);
}

.btn-full {
  width: 100%;
}

.btn-back {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 8px;
  -webkit-tap-highlight-color: transparent;
}

/* ===== 卡片 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-md);
}

/* ===== 输入框 ===== */
input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--transition-fast);
  outline: none;
}

input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 191, 0.15);
}

/* ===== 弹窗/模态框 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.btn-close {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.btn-close:hover {
  background: var(--bg);
}

.modal-body {
  padding: 16px;
}

/* ===== 排行榜列表 ===== */
.leaderboard-list {
  padding: 0 16px;
  flex: 1;
  overflow-y: auto;
}

.leaderboard-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-light);
}

.leaderboard-empty p:first-child {
  font-size: 36px;
  margin-bottom: 8px;
}

.leaderboard-loading {
  text-align: center;
  padding: 32px;
  color: var(--text-light);
}

.leaderboard-filter {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

.filter-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--card);
  font-size: 14px;
  cursor: pointer;
  color: var(--text-light);
  transition: all var(--transition-fast);
}

.filter-btn.active {
  background: var(--primary);
  color: var(--text-white);
  border-color: var(--primary);
}

/* 排行榜行 */
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.leaderboard-row.is-me {
  background: var(--primary-bg);
  border: 2px solid var(--primary);
}

.lb-rank {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.lb-rank-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
}

.lb-info {
  flex: 1;
  min-width: 0;
}

.lb-nickname {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-me-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  margin-left: 4px;
  vertical-align: middle;
}

.lb-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.lb-score {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

.lb-score-label {
  font-size: 12px;
  font-weight: 500;
  margin-left: 2px;
}

/* ===== 昵称输入页 ===== */
.nickname-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 24px;
}

.nickname-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-icon {
  font-size: 64px;
}

.logo-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 12px;
}

.logo-subtitle {
  font-size: 16px;
  color: var(--text-light);
  margin-top: 4px;
}

.nickname-card {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.nickname-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
}

.nickname-input {
  text-align: center;
  font-size: 20px;
}

.nickname-hint {
  min-height: 20px;
  font-size: 13px;
  color: var(--primary);
  text-align: center;
  margin: 8px 0 16px;
}

/* ===== 个人设置页 ===== */
.profile-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 20px;
}

.avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-white);
  font-weight: 700;
  margin-bottom: 12px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0 16px 20px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.profile-section {
  padding: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.badge-wall {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge-item {
  text-align: center;
  width: 70px;
  padding: 10px 4px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.badge-icon {
  font-size: 28px;
}

.badge-name {
  font-size: 10px;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.2;
}

.skin-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skin-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.skin-option.active {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.skin-option.locked {
  opacity: 0.5;
}

.skin-option-preview {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.skin-option-info {
  flex: 1;
}

.skin-option-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.skin-option-status {
  font-size: 12px;
  color: var(--text-light);
}

.profile-footer {
  padding: 24px 16px;
  text-align: center;
}

.version-text {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 12px;
}

.text-light {
  color: var(--text-light);
  font-size: 14px;
}

/* ===== 通用辅助类 ===== */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* ===== 商城区域 ===== */
.shop-section {
  padding: 16px;
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.shop-item {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.shop-item:hover {
  box-shadow: var(--shadow-md);
}

.shop-item.owned {
  border-color: var(--success);
}

.shop-item.active {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.shop-item.locked {
  opacity: 0.5;
}

.shop-item-icon {
  font-size: 32px;
}

.shop-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.shop-item-desc {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.3;
}

.shop-item-cost {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.shop-item.owned .shop-item-cost {
  color: var(--success);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
  min-height: 32px;
}

/* 皮肤预览色条 */
.skin-item {
  position: relative;
}

.skin-item::before {
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  background: var(--skin-primary, var(--primary));
  border-radius: 2px;
}

/* ===== Toast 提示 ===== */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: var(--max-width);
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease-out;
  pointer-events: auto;
  text-align: center;
}

.toast-success { background: #16A34A; }
.toast-error { background: #DC2626; }
.toast-info { background: var(--primary); }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 单元选择卡片 ===== */
.unit-list {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.unit-card {
  display: flex;
  gap: 16px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  border-left: 5px solid var(--unit-color, var(--primary));
}

.unit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--unit-color, var(--primary));
}

.unit-card:active {
  transform: scale(0.98);
}

.unit-card-icon {
  font-size: 42px;
  min-width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: var(--radius-md);
}

.unit-card-content {
  flex: 1;
}

.unit-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.unit-card-subtitle {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.unit-card-desc {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 8px;
  line-height: 1.4;
}

.unit-card-levels {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.unit-level-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-bg);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.unit-progress {
  font-size: 13px;
  color: var(--success);
}

/* ===== 学习路径 ===== */
.path-container {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
}

.path-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 16px 0;
}

.path-node-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.path-node {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--card);
  border: 3px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  z-index: 1;
}

.path-node.current {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--text-white);
  box-shadow: 0 0 0 6px rgba(124, 92, 191, 0.2);
  transform: scale(1.1);
  animation: pulse-node 2s infinite;
}

.path-node.completed {
  border-color: var(--success);
  background: var(--success);
  color: var(--text-white);
}

.path-node.locked {
  border-color: #E5E7EB;
  background: #F3F4F6;
  opacity: 0.6;
}

.path-node[data-clickable="true"] {
  cursor: pointer;
}

.path-node[data-clickable="true"]:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

.path-node-icon {
  font-size: 18px;
  line-height: 1;
}

.path-node-num {
  font-size: 10px;
  font-weight: 700;
}

.path-node.current .path-node-num {
  color: rgba(255,255,255,0.8);
}

.path-node-label {
  text-align: center;
  margin: 6px 0;
}

.path-type-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text-light);
}

.path-type-tag.tag-choice { background: #EDE9FE; color: #6D28D9; }
.path-type-tag.tag-image-click { background: #FEF3C7; color: #B45309; }
.path-type-tag.tag-truefalse { background: #DBEAFE; color: #1E40AF; }

.path-connector {
  width: 3px;
  height: 24px;
  background: var(--border);
  margin: 4px 0;
}

.path-node.completed + .path-connector,
.path-node-wrapper:has(.path-node.completed) .path-connector {
  background: var(--success);
}

.path-complete-banner {
  text-align: center;
  padding: 32px 16px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-top: 16px;
}

.path-complete-banner span {
  font-size: 48px;
}

.path-complete-banner p {
  font-size: 18px;
  font-weight: 600;
  margin: 12px 0 20px;
  color: var(--text);
}

.path-complete-score {
  font-size: 20px !important;
  color: var(--primary) !important;
  margin-bottom: 16px !important;
}

.path-complete-score strong {
  font-size: 28px;
}

/* ===== 答题区域 ===== */
.quiz-area {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.quiz-question-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.quiz-question-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.6;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.quiz-instruction {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
}

/* 选择题选项 */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
}

.quiz-option:hover:not(.answered) {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.quiz-option:active:not(.answered) {
  transform: scale(0.98);
}

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.quiz-option.answered {
  cursor: default;
}

.quiz-option.correct {
  border-color: var(--success);
  background: var(--success-bg);
}

.quiz-option.correct .option-letter {
  background: var(--success);
  color: white;
}

.quiz-option.wrong {
  border-color: var(--error);
  background: var(--error-bg);
}

.quiz-option.wrong .option-letter {
  background: var(--error);
  color: white;
}

/* 判断题按钮 */
.quiz-tf-options {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.quiz-tf-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  border: 3px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  min-height: 120px;
}

.quiz-tf-btn:hover:not(.answered) {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.quiz-tf-btn:active:not(.answered) {
  transform: scale(0.95);
}

.tf-icon {
  font-size: 36px;
  line-height: 1;
}

.quiz-tf-btn.answered {
  cursor: default;
}

.quiz-tf-btn.correct {
  border-color: var(--success);
  background: var(--success-bg);
}

.quiz-tf-btn.wrong {
  border-color: var(--error);
  background: var(--error-bg);
}

/* 图片点击题 */
.quiz-image-area {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--card);
  cursor: crosshair;
}

.quiz-image-area svg {
  width: 100%;
  height: auto;
  display: block;
}

.hotspot-zone {
  animation: pulse-hotspot 1.5s infinite;
  cursor: pointer;
}

.hotspot-zone:hover {
  fill: rgba(239, 68, 68, 0.6) !important;
}

.hotspot-zone.found {
  fill: rgba(34, 197, 94, 0.4) !important;
  stroke: #22C55E !important;
  animation: none;
}

.quiz-hotspot-progress {
  text-align: center;
  padding: 10px;
  font-size: 14px;
  color: var(--text-light);
}

.quiz-hotspot-progress span {
  font-weight: 700;
  color: var(--primary);
}

/* 答题反馈 */
.quiz-feedback {
  margin-top: 16px;
  padding: 20px 16px;
  border-radius: var(--radius-md);
  text-align: center;
  animation: slideUp 0.3s ease-out;
}

.feedback-correct {
  background: var(--success-bg);
  border: 2px solid var(--success);
}

.feedback-wrong {
  background: var(--error-bg);
  border: 2px solid var(--error);
}

.feedback-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.feedback-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feedback-correct .feedback-title {
  color: #15803D;
}

.feedback-wrong .feedback-title {
  color: #B91C1C;
}

.feedback-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  text-align: left;
  padding: 12px;
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

/* ===== 动画关键帧 ===== */
@keyframes pulse-node {
  0%, 100% { box-shadow: 0 0 0 6px rgba(124, 92, 191, 0.2); }
  50% { box-shadow: 0 0 0 14px rgba(124, 92, 191, 0.05); }
}

@keyframes pulse-hotspot {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 响应式：桌面端 ===== */
@media (min-width: 769px) {
  #app {
    border-radius: var(--radius-lg);
    margin: 16px auto;
    min-height: calc(100vh - 32px);
  }

  .tab-bar {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
}
