/* Generated by Trae Work - 八年级生物知识宇宙 */

:root {
  --cluster-animals: #22c55e;
  --cluster-microbes: #3b82f6;
  --cluster-genetics: #a855f7;
  --cluster-ecosystem: #06b6d4;
  --cluster-immunity: #f97316;
  --cluster-experiments: #6b7280;
  
  --bg-dark: #0a0e27;
  --bg-mid: #1a1f3e;
  --bg-glass: rgba(15, 23, 42, 0.75);
  --border-glass: rgba(255, 255, 255, 0.1);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --nav-height: 56px;
  --toolbar-height: 48px;
  --left-panel-width: 200px;
  --right-panel-width: 340px;
  
  --cubic-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-mid) 100%);
  color: var(--text-primary);
  user-select: none;
}

button {
  transition: transform 0.1s ease;
}

button:active {
  transform: scale(0.95);
}

/* 星空背景 - 增强版 */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, white, transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 90px 40px, white, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 160px 120px, white, transparent),
    radial-gradient(2px 2px at 200px 50px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 250px 200px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 300px 100px, white, transparent),
    radial-gradient(1.5px 1.5px at 350px 180px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 380px 260px, rgba(200,220,255,0.7), transparent),
    radial-gradient(2px 2px at 100px 250px, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 220px 140px, rgba(180,200,255,0.8), transparent),
    radial-gradient(1px 1px at 60px 220px, white, transparent),
    radial-gradient(1.5px 1.5px at 320px 50px, rgba(255,240,200,0.6), transparent),
    radial-gradient(1px 1px at 180px 280px, rgba(255,255,255,0.7), transparent),
    radial-gradient(2px 2px at 40px 300px, rgba(255,255,255,0.35), transparent),
    radial-gradient(1px 1px at 280px 280px, white, transparent),
    radial-gradient(1px 1px at 150px 30px, rgba(220,200,255,0.6), transparent),
    radial-gradient(2.5px 2.5px at 370px 130px, rgba(255,255,255,0.45), transparent);
  background-size: 400px 350px;
  background-repeat: repeat;
  animation: twinkle 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(34, 197, 94, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse at 15% 30%, rgba(6, 182, 212, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 85% 70%, rgba(249, 115, 22, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 40% 10%, rgba(132, 204, 22, 0.05) 0%, transparent 35%);
  pointer-events: none;
  z-index: 0;
  animation: nebulaDrift 60s linear infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@keyframes nebulaDrift {
  0% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-1.5%, 1%) scale(1.04); }
  50% { transform: translate(1%, -0.8%) scale(1); }
  75% { transform: translate(1.5%, 1.5%) scale(0.97); }
  100% { transform: translate(0, 0) scale(1); }
}

/* 顶部导航 */
#top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 100;
  gap: 20px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo {
  font-size: 24px;
}

.nav-title {
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.tab-icon {
  font-size: 16px;
}

.nav-right {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-btn.active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
}

.btn-icon {
  font-size: 14px;
}

/* 主布局 */
#main-layout {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: var(--toolbar-height);
  display: flex;
  z-index: 1;
}

/* 左侧面板 */
#left-panel {
  width: var(--left-panel-width);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--border-glass);
  padding: 16px 12px;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 10;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.select-all-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s ease;
}

.select-all-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.cluster-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cluster-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.cluster-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.cluster-item.disabled {
  opacity: 0.35;
}

.cluster-item input[type="checkbox"] {
  display: none;
}

.cluster-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cluster-item.checked .cluster-checkbox {
  border-color: var(--cluster-color);
  background: var(--cluster-color);
}

.cluster-checkbox::after {
  content: '✓';
  color: white;
  font-size: 11px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cluster-item.checked .cluster-checkbox::after {
  opacity: 1;
}

.cluster-icon {
  font-size: 18px;
}

.cluster-name {
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 58px;
  flex-shrink: 1;
}

.cluster-badges {
  display: flex;
  gap: 3px;
  margin-left: auto;
  flex-shrink: 0;
}

.cluster-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-saved {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.badge-mastered {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.cluster-count {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 16px;
  text-align: right;
}

.panel-tip {
  margin-top: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid var(--border-glass);
}

.panel-tip p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* 可视化容器 */
#visualization-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.view-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  display: none;
}

.view-container.active {
  display: block;
}

.view-container canvas {
  display: block;
}

.view-placeholder {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  text-align: center;
}

.view-placeholder .placeholder-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.view-placeholder h2 {
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--text-secondary);
}

.view-placeholder p {
  font-size: 14px;
  margin: 0;
  opacity: 0.7;
}

/* 占位页面 */
#placeholder-view {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.placeholder-content {
  text-align: center;
  padding: 40px;
}

.placeholder-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.placeholder-content h2 {
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 12px;
  font-weight: 500;
}

.placeholder-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.back-btn {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  color: white;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

/* 右侧详情面板 */
#detail-panel {
  width: var(--right-panel-width);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid var(--border-glass);
  position: fixed;
  right: 0;
  top: var(--nav-height);
  bottom: var(--toolbar-height);
  transform: translateX(100%);
  transition: transform 0.4s var(--cubic-smooth);
  z-index: 50;
  display: flex;
  flex-direction: column;
}

#detail-panel.open {
  transform: translateX(0);
}

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

.detail-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cluster-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cluster-color, #888);
  box-shadow: 0 0 8px var(--cluster-color, #888);
}

#detail-cluster-name {
  font-size: 12px;
  color: var(--text-secondary);
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.detail-node-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}

.detail-section {
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-definition {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid var(--cluster-color, #888);
}

.detail-definition strong {
  color: var(--text-primary);
}

.svg-diagram-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

.svg-diagram-container svg {
  max-width: 100%;
  height: auto;
  display: block;
}

.svg-diagram-container text {
  user-select: none;
  pointer-events: none;
}

@media (max-width: 768px) {
  .svg-diagram-container {
    padding: 8px;
    margin: 8px 0;
  }
  .svg-diagram-container svg {
    width: 100%;
    max-width: 100%;
  }
}

.key-points-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.key-point-item {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.6;
}

.key-point-item.high-frequency {
  border-left: 2px solid #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.key-point-item.high-frequency::before {
  content: '🔥';
  font-size: 12px;
  flex-shrink: 0;
}

.key-point-item::before {
  content: '✓';
  color: var(--cluster-color, #22c55e);
  font-weight: bold;
  flex-shrink: 0;
}

.examples-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.example-tag {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

.related-nodes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-node {
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.related-node:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--rel-color, rgba(255,255,255,0.2));
  transform: translateX(4px);
}

.related-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rel-color, #888);
  flex-shrink: 0;
}

.related-name {
  color: var(--text-primary);
  flex: 1;
}

.related-arrow {
  color: var(--text-muted);
  font-size: 12px;
}

.detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.action-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.action-btn.saved {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}

.action-btn.mastered {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
}

/* 底部工具栏 */
#bottom-toolbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--toolbar-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  z-index: 100;
}

.tool-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.tool-btn.active {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.1);
}

.tool-icon {
  font-size: 14px;
}

.perf-indicator {
  position: absolute;
  right: 20px;
}

.perf-badge {
  font-size: 11px;
  padding: 3px 10px;
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Tooltip */
#tooltip {
  position: fixed;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 12px 14px;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transform: scale(0.95) translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  max-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#tooltip.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.tooltip-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.tooltip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tt-color, #888);
  box-shadow: 0 0 6px var(--tt-color, #888);
}

.tooltip-cluster {
  font-size: 11px;
  color: var(--text-muted);
}

.tooltip-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tooltip-def {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 加载遮罩 */
#loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ===== DNA螺旋层指示器（增强） ===== */
#helix-layer-indicator {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 20;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
}

.layer-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid var(--text-muted);
  background: rgba(15, 23, 42, 0.6);
  transition: all 0.3s var(--cubic-smooth);
  position: relative;
}

.layer-dot:hover {
  transform: scale(1.15);
  border-color: var(--dot-color, var(--text-secondary));
}

.layer-dot.active {
  transform: scale(1.2);
  background: var(--dot-color, rgba(96,165,250,0.15));
  border-color: var(--dot-color, #60a5fa);
  box-shadow: 0 0 12px var(--dot-color, rgba(96,165,250,0.4));
}

/* ===== 虚拟实验室 ===== */
.lab-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.lab-header {
  text-align: center;
}

.lab-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.lab-icon {
  font-size: 32px;
}

.lab-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 8px;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.lab-card {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s var(--cubic-smooth);
  position: relative;
  overflow: hidden;
}

.lab-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--lab-color), transparent);
  opacity: 0.6;
}

.lab-card:hover {
  transform: translateY(-4px);
  border-color: var(--lab-color);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.lab-card.high-freq {
  border-color: rgba(245, 158, 11, 0.3);
}

.lab-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.lab-card-icon {
  font-size: 32px;
}

.lab-freq-badge {
  font-size: 10px;
  padding: 2px 8px;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-radius: 10px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.lab-card-marks {
  margin-left: auto;
  display: flex;
  gap: 4px;
  font-size: 14px;
}

.lab-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.lab-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.lab-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lab-step-count {
  font-size: 12px;
  color: var(--text-muted);
}

.lab-start-btn {
  font-size: 13px;
  color: var(--lab-color);
  font-weight: 600;
  transition: transform 0.2s;
}

.lab-card:hover .lab-start-btn {
  transform: translateX(4px);
}

/* 实验步骤视图 */
.lab-detail-view {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.lab-step-container {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.lab-step-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
}

.lab-back-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.lab-back-btn:hover {
  color: var(--text-primary);
}

.lab-step-header h3 {
  font-size: 20px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.lab-progress {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.lab-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.lab-step-counter {
  font-size: 12px;
  color: var(--text-muted);
}

.lab-step-body {
  flex: 1;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lab-step-number {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.25;
}

.lab-step-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: -20px;
}

.lab-step-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.lab-step-desc strong {
  color: var(--text-primary);
}

.lab-step-tip {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #93c5fd;
  line-height: 1.6;
}

.lab-step-warning {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: #fca5a5;
  line-height: 1.6;
}

.lab-key-points {
  margin-top: 8px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 16px;
}

.lab-key-points h4 {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.lab-key-points ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.lab-key-points li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 18px;
  position: relative;
  line-height: 1.6;
}

.lab-key-points li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: bold;
}

.lab-step-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.lab-nav-btn {
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.lab-nav-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.lab-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lab-nav-btn.lab-next,
.lab-nav-btn.lab-complete {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-color: transparent;
  color: white;
  margin-left: auto;
}

.lab-nav-btn.lab-next:hover,
.lab-nav-btn.lab-complete:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.lab-nav-btn.lab-complete {
  background: linear-gradient(135deg, #22c55e, #10b981);
}

.lab-nav-btn.lab-complete:hover {
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}

/* ===== 考点刷题集 ===== */
.quiz-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.quiz-header {
  text-align: center;
}

.quiz-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.quiz-icon {
  font-size: 32px;
}

.quiz-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 8px;
}

.quiz-stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.quiz-stat-card {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

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

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

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

.filter-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.quiz-filter-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.quiz-filter-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.quiz-filter-btn.active {
  background: rgba(96,165,250,0.22);
  border-color: rgba(96,165,250,0.5);
  color: #60a5fa;
}

.quiz-filter-btn.active[data-cluster="animals"] {
  background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.4); color: #22c55e;
}
.quiz-filter-btn.active[data-cluster="plants"] {
  background: rgba(132,204,22,0.15); border-color: rgba(132,204,22,0.4); color: #84cc16;
}
.quiz-filter-btn.active[data-cluster="microbes"] {
  background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.4); color: #3b82f6;
}
.quiz-filter-btn.active[data-cluster="genetics"] {
  background: rgba(168,85,247,0.15); border-color: rgba(168,85,247,0.4); color: #a855f7;
}
.quiz-filter-btn.active[data-cluster="ecosystem"] {
  background: rgba(6,182,212,0.15); border-color: rgba(6,182,212,0.4); color: #06b6d4;
}
.quiz-filter-btn.active[data-cluster="immunity"] {
  background: rgba(249,115,22,0.15); border-color: rgba(249,115,22,0.4); color: #f97316;
}
.quiz-filter-btn.active[data-cluster="experiments"] {
  background: rgba(107,114,128,0.15); border-color: rgba(107,114,128,0.4); color: #9ca3af;
}

.quiz-filter-btn.active[data-cluster="all"] {
  background: rgba(96,165,250,0.22);
  border-color: rgba(96,165,250,0.5);
  color: #60a5fa;
}

.quiz-actions {
  display: flex;
  justify-content: center;
}

.quiz-start-btn {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  color: white;
  padding: 16px 48px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s var(--cubic-smooth);
  font-family: inherit;
}

.quiz-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(59,130,246,0.4);
}

.quiz-tips {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
}

.quiz-tips h4 {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.quiz-tips ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.quiz-tips li {
  font-size: 12px;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.quiz-tips li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* 答题视图 */
.quiz-question-container {
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.quiz-back-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.quiz-back-btn:hover { color: var(--text-primary); }

.quiz-q-progress {
  flex: 1;
}

.quiz-q-progress-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.quiz-q-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.quiz-q-progress-bar > div {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.quiz-session-score {
  font-size: 14px;
  white-space: nowrap;
}

.quiz-q-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quiz-cluster-tag,
.quiz-node-tag,
.quiz-hf-tag,
.quiz-exam-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid;
}

.quiz-node-tag {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border-color: var(--border-glass);
}

.quiz-exam-tag {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.3);
  font-weight: 600;
}

.quiz-hf-tag {
  background: rgba(245,158,11,0.15);
  color: #f59e0b;
  border-color: rgba(245,158,11,0.3);
}

.quiz-q-body {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 28px;
}

.quiz-q-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
}

.quiz-option:hover:not(.disabled) {
  background: rgba(255,255,255,0.08);
  border-color: rgba(96,165,250,0.4);
}

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

.option-key {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  transition: all 0.2s;
}

.quiz-option:hover:not(.disabled) .option-key {
  background: rgba(96,165,250,0.2);
  color: #60a5fa;
}

.quiz-option.correct {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.5);
}

.quiz-option.correct .option-key {
  background: #22c55e;
  color: white;
}

.quiz-option.wrong {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.5);
}

.quiz-option.wrong .option-key {
  background: #ef4444;
  color: white;
}

.quiz-q-feedback {
  animation: fadeInUp 0.3s ease;
}

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

.feedback-correct,
.feedback-wrong {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  align-items: flex-start;
}

.feedback-correct {
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
}

.feedback-wrong {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
}

.feedback-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.feedback-text h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  margin-top: 0;
}

.feedback-correct .feedback-text h3 { color: #22c55e; }
.feedback-wrong .feedback-text h3 { color: #ef4444; }

.feedback-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.feedback-text p strong { color: var(--text-primary); }

.feedback-explanation {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.quiz-q-footer {
  display: flex;
  justify-content: flex-end;
}

.quiz-next-btn {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  color: white;
  padding: 10px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
}

.quiz-next-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59,130,246,0.4);
}

/* 结果页 */
.quiz-results {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.results-emoji {
  font-size: 80px;
  animation: bounceIn 0.6s var(--cubic-smooth);
}

@keyframes bounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.quiz-results h2 {
  font-size: 24px;
  color: var(--text-primary);
  margin: 0;
}

.results-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.score-big {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
}

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

.results-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.results-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.results-btn:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

/* 非3D视图（实验室/刷题）布局适配 */
body.view-non-3d #main-layout {
  left: 0;
}
body.view-non-3d #visualization-container {
  margin-left: 0;
  padding: 0;
}
body.view-non-3d #detail-panel {
  display: none !important;
}
body.view-non-3d #graph-wrapper {
  overflow-y: auto;
  overflow-x: hidden;
}

/* lab和quiz容器全宽 */
.lab-container,
.quiz-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* 工具按钮禁用状态 */
.tool-btn:disabled,
.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* 响应式 */
@media (max-width: 1024px) {
  #left-panel {
    width: 160px;
  }
  #detail-panel {
    width: 300px;
  }
  .tab-label {
    display: none;
  }
  .nav-btn .btn-label {
    display: none;
  }
}

@media (max-width: 768px) {
  #left-panel {
    position: fixed;
    left: -200px;
    transition: left 0.3s ease;
    z-index: 60;
    height: calc(100vh - var(--nav-height) - var(--toolbar-height));
  }
  #left-panel.open {
    left: 0;
  }
}

/* ==================== 搜索框 ==================== */
.search-box {
  position: relative;
  margin-right: 8px;
}
.search-box input {
  width: 180px;
  padding: 6px 28px 6px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #f1f5f9;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.search-box input:focus {
  background: rgba(255,255,255,0.12);
  border-color: rgba(96,165,250,0.5);
  width: 220px;
}
.search-box input::placeholder {
  color: rgba(255,255,255,0.4);
}
.search-box #search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
}
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  z-index: 200;
  backdrop-filter: blur(12px);
}
.search-suggestions.show { display: block; }
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.search-item:hover { background: rgba(255,255,255,0.08); }
.search-icon { font-size: 18px; }
.search-text { display: flex; flex-direction: column; gap: 2px; }
.search-name { font-size: 13px; color: #f1f5f9; }
.search-desc { font-size: 11px; color: rgba(255,255,255,0.5); }

/* ==================== Toast通知 ==================== */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f1f5f9;
  font-size: 13px;
  backdrop-filter: blur(12px);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-icon { font-size: 16px; }
.toast-success .toast-icon { color: #22c55e; }
.toast-error .toast-icon { color: #ef4444; }
.toast-info .toast-icon { color: #60a5fa; }

/* ==================== 集群复选框列表 ==================== */
.cluster-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}
.cluster-checkbox:hover { background: rgba(255,255,255,0.06); }
.cluster-checkbox input { accent-color: #60a5fa; cursor: pointer; }
.cluster-checkbox .cluster-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ==================== 模态框基础样式 ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal-content {
  background: var(--bg-glass, rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-glass, rgba(255,255,255,0.1));
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass, rgba(255,255,255,0.08));
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* ==================== 模态框显示状态 ==================== */
.modal-overlay.show {
  display: flex !important;
}

/* Lab和Quiz视图可滚动 */
.lab-view, .quiz-view {
  overflow-y: auto;
  background: var(--bg-primary);
}
.lab-view::-webkit-scrollbar, .quiz-view::-webkit-scrollbar { width: 6px; }
.lab-view::-webkit-scrollbar-thumb, .quiz-view::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* ==================== 移动端响应式布局 ==================== */
:root {
  --mobile-tab-height: 60px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* PC端隐藏移动端专属元素 */
@media (min-width: 769px) {
  #mobile-tab-bar,
  #btn-hamburger,
  #drawer-overlay,
  .bottom-sheet-handle {
    display: none !important;
  }
}

/* 平板适配 (769px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  #left-panel {
    width: 180px;
  }
  #detail-panel {
    width: 300px;
  }
  .nav-tabs .tab-btn {
    padding: 8px 10px;
  }
}

/* 移动端适配 (≤768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--mobile-tab-height) + var(--safe-area-bottom));
  }

  #top-nav {
    height: calc(var(--nav-height) + var(--safe-area-top));
    padding-top: var(--safe-area-top);
    padding: var(--safe-area-top) 12px 0;
    gap: 8px;
  }

  .nav-title {
    font-size: 15px;
  }

  .nav-tabs {
    display: none !important;
  }

  .nav-right {
    gap: 6px;
    margin-left: auto;
  }

  .nav-right .nav-btn:not(.hamburger-btn):not(#btn-help) {
    display: none;
  }

  .search-box {
    margin-right: 0;
  }

  .search-box input {
    width: 120px;
    padding: 8px 28px 8px 10px;
    font-size: 14px;
    min-height: 44px;
  }

  .search-box input:focus {
    width: 160px;
  }

  #btn-hamburger {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 20px;
    flex-shrink: 0;
  }

  #btn-hamburger .btn-icon {
    font-size: 22px;
  }

  #main-layout {
    bottom: var(--mobile-tab-height);
  }

  /* 左侧抽屉面板 */
  #left-panel {
    position: fixed;
    top: calc(var(--nav-height) + var(--safe-area-top));
    left: -280px;
    width: 280px;
    height: calc(100vh - var(--nav-height) - var(--safe-area-top) - var(--mobile-tab-height) - var(--safe-area-bottom));
    z-index: 200;
    transition: left 0.3s var(--cubic-smooth);
    overflow-y: auto;
  }

  #left-panel.open {
    left: 0;
  }

  /* 抽屉遮罩 */
  #drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  #drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  /* 右侧详情面板改为Bottom Sheet */
  #detail-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70vh;
    max-height: calc(100vh - var(--nav-height) - var(--safe-area-top) - 40px);
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-top: 1px solid var(--border-glass);
    z-index: 150;
    transition: transform 0.4s var(--cubic-smooth);
  }

  #detail-panel.open {
    transform: translateY(0);
  }

  .bottom-sheet-handle {
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }

  /* 隐藏底部工具栏 */
  #bottom-toolbar {
    display: none !important;
  }

  /* 移动端底部Tab导航 */
  #mobile-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-tab-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-glass);
    z-index: 100;
  }

  .mobile-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 0;
    min-height: 44px;
    font-family: inherit;
    transition: color 0.2s ease;
  }

  .mobile-tab-item.active {
    color: transparent;
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .mobile-tab-icon {
    font-size: 20px;
  }

  .mobile-tab-label {
    font-size: 10px;
  }

  /* 实验室和刷题容器适配 */
  .lab-container,
  .quiz-container {
    padding: 16px;
    padding-bottom: calc(var(--mobile-tab-height) + 20px);
  }

  .lab-grid {
    grid-template-columns: 1fr;
  }

  .quiz-stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .quiz-q-body {
    padding: 20px 16px;
  }

  .quiz-q-text {
    font-size: 16px;
  }

  .quiz-option {
    padding: 12px 14px;
    min-height: 48px;
    font-size: 14px;
  }

  .detail-content {
    padding: 12px 16px;
  }

  .detail-node-name {
    font-size: 18px;
  }

  /* 触控区域最小44px */
  button,
  .tab-btn,
  .nav-btn,
  .tool-btn,
  .cluster-item,
  .mobile-tab-item,
  .search-item,
  .quiz-option,
  .lab-card,
  .action-btn,
  .related-node {
    min-height: 44px;
  }

  /* Toast适配 */
  #toast-container {
    right: 12px;
    left: 12px;
    top: calc(var(--nav-height) + var(--safe-area-top) + 14px);
  }

  .toast {
    max-width: none;
  }

  /* DNA螺旋层指示器缩小 */
  #helix-layer-indicator {
    right: 8px;
    padding: 8px 6px;
    gap: 6px;
  }

  .layer-dot {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  /* 集群项触控区域 */
  .cluster-item {
    padding: 12px;
  }

  /* 模态框适配 */
  .modal-content {
    margin: 12px;
    max-height: calc(100vh - 100px);
  }

  .compare-modal {
    flex-direction: column;
  }

  /* 导航logo和标题适配 */
  .nav-left {
    gap: 6px;
  }

  .nav-logo {
    font-size: 20px;
  }

  .panel-header h3 {
    font-size: 15px;
  }

  .cluster-name {
    max-width: none;
  }

  /* 关闭按钮触控区域 */
  .close-btn {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  /* 实验步骤视图适配 */
  .lab-step-container {
    min-height: auto;
  }

  .lab-step-header {
    padding: 16px;
  }

  .lab-step-body {
    padding: 20px 16px;
  }

  .lab-step-number {
    font-size: 56px;
  }

  .lab-step-title {
    font-size: 20px;
    margin-top: -12px;
  }

  .lab-step-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .lab-nav-btn {
    min-height: 44px;
    padding: 10px 20px;
  }

  /* 答题页适配 */
  .quiz-q-header {
    gap: 10px;
  }

  .quiz-stat-card {
    padding: 12px;
  }

  .stat-value {
    font-size: 22px;
  }

  .quiz-start-btn {
    padding: 14px 36px;
    font-size: 16px;
    min-height: 48px;
  }

  .quiz-next-btn {
    padding: 12px 24px;
    min-height: 44px;
  }

  .results-btn {
    min-height: 44px;
    padding: 10px 20px;
  }

  .quiz-back-btn {
    min-height: 44px;
    padding: 8px;
  }

  .lab-back-btn {
    min-height: 44px;
    padding: 8px 0;
  }

  /* 帮助模态框适配 */
  .help-body {
    padding: 16px;
  }

  .help-item {
    padding: 10px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* 对比模态框适配 */
  .compare-body {
    padding: 12px;
  }

  /* 筛选按钮适配 */
  .quiz-filter-btn {
    min-height: 44px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
  }

  .select-all-btn {
    min-height: 44px;
    padding: 6px 12px;
    font-size: 12px;
  }

  /* 移动端覆盖view-non-3d样式，允许抽屉和Bottom Sheet正常显示 */
  body.view-non-3d #detail-panel {
    display: flex !important;
  }
}

/* ==================== 移动端2D视图样式 ==================== */
.mobile-2d-view {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: calc(var(--mobile-tab-height, 60px) + 20px);
  -webkit-overflow-scrolling: touch;
}

.mobile-2d-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 20px 0 10px;
}

.mobile-2d-header h2 {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.mobile-2d-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

.cluster-cards-list,
.dna-layers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto;
}

.cluster-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s var(--cubic-smooth);
  position: relative;
  overflow: hidden;
  min-height: 88px;
}

.cluster-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-color, #60a5fa);
  opacity: 0.8;
}

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

.cluster-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.cluster-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}

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

.cluster-card-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.cluster-card-count {
  font-size: 12px;
  color: var(--text-muted);
}

.cluster-card-arrow {
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
}

.cluster-card-nodes {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.cluster-card.expanded .cluster-card-nodes {
  max-height: 500px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-glass);
}

.cluster-card.expanded .cluster-card-arrow {
  transform: rotate(90deg);
}

.node-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 44px;
}

.node-list-item:active {
  background: rgba(255,255,255,0.05);
}

.node-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--card-color, #888);
  flex-shrink: 0;
}

.node-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-secondary);
}

.node-marks {
  display: flex;
  gap: 4px;
  font-size: 12px;
}

.mobile-2d-footer {
  margin-top: 24px;
  padding: 0 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.enter-3d-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.enter-3d-btn:active {
  transform: scale(0.98);
}

.back-2d-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 50;
  padding: 10px 16px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-family: inherit;
  transition: all 0.2s;
}

.back-2d-btn:active {
  background: rgba(0,0,0,0.8);
}

.canvas-3d-container {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-3d-container canvas {
  display: block;
}

/* PC端始终显示3D视图，隐藏移动端2D视图 */
@media (min-width: 769px) {
  .mobile-2d-view {
    display: none !important;
  }
  .back-2d-btn {
    display: none !important;
  }
  #starmap-3d-container,
  #dna-3d-container {
    display: block !important;
  }
}

/* 移动端默认显示2D视图，隐藏3D容器 */
@media (max-width: 768px) {
  #starmap-3d-container,
  #dna-3d-container {
    display: none;
  }
  #starmap-3d-container.active,
  #dna-3d-container.active {
    display: block;
  }
  #starmap-2d-view.hidden,
  #dna-2d-view.hidden {
    display: none;
  }
  /* 3D模式下给容器添加padding避免被Tab栏遮挡 */
  .canvas-3d-container.active {
    padding-bottom: calc(var(--mobile-tab-height, 60px) + var(--safe-area-bottom, 0px));
    box-sizing: border-box;
  }
}

/* ==================== 低性能提示模态框 ==================== */
.low-perf-modal {
  max-width: 360px;
  width: calc(100% - 40px);
}

.low-perf-body {
  padding: 20px;
}

.low-perf-body p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.low-perf-actions {
  display: flex;
  gap: 12px;
}

.low-perf-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  font-family: inherit;
  transition: all 0.2s;
}

.low-perf-btn.primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: white;
}

.low-perf-btn.secondary {
  background: rgba(255,255,255,0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
}

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

/* ==================== FPS显示开关按钮 ==================== */
#btn-fps.active {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
}

/* 移动端FPS按钮默认隐藏 */
@media (max-width: 768px) {
  #btn-fps {
    display: none !important;
  }
}

/* ==================== 错题本样式 ==================== */
.wrong-book-entry {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s var(--cubic-smooth);
  width: 100%;
  text-align: left;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.wrong-book-entry::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #f97316);
  opacity: 0.8;
}

.wrong-book-entry:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 8px 32px rgba(239, 68, 68, 0.15);
  background: rgba(239, 68, 68, 0.05);
}

.wrong-book-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.wrong-book-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wrong-book-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.wrong-book-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.wrong-book-badge {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.wrong-book-arrow {
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.wrong-book-entry:hover .wrong-book-arrow {
  transform: translateX(4px);
  color: var(--text-primary);
}

/* 错题本页面 */
.wrong-book-container {
  gap: 16px;
}

.wrong-book-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.wrong-book-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  flex: 1;
  text-align: center;
  justify-content: center;
}

.wrong-master-all-btn {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.wrong-master-all-btn:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

.wrong-master-all-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wrong-book-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.wrong-filter-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wrong-filter-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

.wrong-filter-btn.active {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.wrong-filter-btn.active[data-filter] {
  background: rgba(var(--cluster-color-rgb, 239, 68, 68), 0.15);
  border-color: var(--cluster-color, rgba(239, 68, 68, 0.4));
  color: var(--cluster-color, #ef4444);
}

.filter-count {
  background: rgba(255,255,255,0.1);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.wrong-book-actions {
  display: flex;
  justify-content: center;
}

.wrong-retry-all-btn {
  background: linear-gradient(135deg, #ef4444, #f97316);
  border: none;
  color: white;
  padding: 14px 40px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s var(--cubic-smooth);
  font-family: inherit;
  min-height: 48px;
}

.wrong-retry-all-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.wrong-retry-all-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wrong-empty {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
}

.wrong-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.wrong-empty p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

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

.wrong-card {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.wrong-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #ef4444, #f97316);
  opacity: 0.6;
}

.wrong-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(239, 68, 68, 0.3);
  transform: translateX(4px);
}

.wrong-card.mastered {
  opacity: 0.6;
}

.wrong-card.mastered::before {
  background: linear-gradient(180deg, #22c55e, #10b981);
}

.wrong-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wrong-times {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.wrong-mastered-tag {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.wrong-cluster-tag {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid;
}

.wrong-question {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.wrong-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.wrong-time {
  font-size: 12px;
  color: var(--text-muted);
}

.wrong-card-actions {
  display: flex;
  gap: 8px;
}

.wrong-master-btn,
.wrong-detail-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  border: 1px solid;
}

.wrong-master-btn {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.wrong-master-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

.wrong-detail-btn {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.3);
  color: #60a5fa;
}

.wrong-detail-btn:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgba(96, 165, 250, 0.5);
}

/* 错题详情页 */
.wrong-detail-container {
  gap: 20px;
}

.wrong-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.wrong-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wrong-detail-master-btn,
.wrong-detail-retry-btn {
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  border: 1px solid;
  white-space: nowrap;
}

.wrong-detail-master-btn {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.wrong-detail-master-btn:hover {
  background: rgba(34, 197, 94, 0.2);
}

.wrong-detail-retry-btn {
  background: linear-gradient(135deg, #ef4444, #f97316);
  border-color: transparent;
  color: white;
}

.wrong-detail-retry-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.wrong-detail-card {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wrong-detail-question {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
}

.wrong-answer-compare {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
}

.answer-row.user-answer {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.answer-row.correct-answer {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.answer-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.answer-content {
  flex: 1;
}

.answer-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.answer-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.answer-row.user-answer .answer-text {
  color: #fca5a5;
}

.answer-row.correct-answer .answer-text {
  color: #86efac;
}

.wrong-explanation {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
}

.wrong-explanation h4 {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wrong-explanation p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.wrong-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border-glass);
}

/* 答题页标记已掌握按钮 */
.quiz-q-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quiz-mark-mastered-btn {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
}

.quiz-mark-mastered-btn:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
}

.quiz-mark-mastered-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quiz-wrong-tag {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
  font-weight: 600;
}

/* 错题本移动端适配 */
@media (max-width: 768px) {
  .wrong-book-entry {
    padding: 16px;
    gap: 12px;
  }
  
  .wrong-book-icon {
    font-size: 28px;
  }
  
  .wrong-book-title {
    font-size: 15px;
  }
  
  .wrong-book-desc {
    font-size: 12px;
  }
  
  .wrong-book-header {
    flex-direction: row;
    align-items: center;
  }
  
  .wrong-book-header h2 {
    font-size: 18px;
    order: 2;
    flex: 1;
    text-align: center;
  }
  
  .wrong-master-all-btn {
    order: 3;
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .quiz-back-btn {
    order: 1;
  }
  
  .wrong-card {
    padding: 14px;
  }
  
  .wrong-question {
    font-size: 14px;
  }
  
  .wrong-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .wrong-card-actions {
    width: 100%;
  }
  
  .wrong-master-btn,
  .wrong-detail-btn {
    flex: 1;
    justify-content: center;
    min-height: 40px;
  }
  
  .wrong-detail-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .wrong-detail-actions {
    justify-content: center;
  }
  
  .wrong-detail-card {
    padding: 16px;
  }
  
  .wrong-detail-question {
    font-size: 17px;
  }
  
  .answer-text {
    font-size: 15px;
  }
  
  .wrong-retry-all-btn {
    width: 100%;
    justify-content: center;
  }
  
  .wrong-filter-btn {
    min-height: 36px;
    padding: 6px 12px;
  }
  
  .quiz-q-footer {
    flex-direction: column-reverse;
  }
  
  .quiz-mark-mastered-btn,
  .quiz-next-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==================== 朗读按钮样式 ==================== */
.action-btn.speak {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.4);
}

.action-btn.speak:hover {
  background: rgba(96, 165, 250, 0.1);
}

.action-btn.speak.speaking {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  animation: pulse-speaking 1s ease-in-out infinite;
}

@keyframes pulse-speaking {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.quiz-q-text-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.quiz-q-text-wrap .quiz-q-text {
  flex: 1;
  margin-bottom: 0;
}

.quiz-speak-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
}

.quiz-speak-btn:hover {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.5);
  color: #60a5fa;
}

.quiz-speak-btn.speaking {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  animation: pulse-speaking 1s ease-in-out infinite;
}

/* ==================== 笔记区域样式 ==================== */
.note-marker {
  font-size: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.note-indicator {
  font-size: 12px;
  margin-left: 4px;
}

.note-section {
  margin-top: 4px;
}

.note-area {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--border-glass);
}

.note-textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  border-radius: 6px;
  padding: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.note-textarea:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.5);
}

.note-textarea::placeholder {
  color: var(--text-dim);
}

.note-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: flex-end;
}

.note-save-btn,
.note-delete-btn {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid var(--border-glass);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.note-save-btn {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}

.note-save-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  color: #d8b4fe;
}

.note-delete-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.note-delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* ==================== 顶部学习状态指示器 ==================== */
.learning-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  font-size: 12px;
  margin-right: 8px;
}

.level-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.level-badge {
  background: linear-gradient(135deg, #60a5fa, #a855f7);
  color: white;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

.xp-bar-wrap {
  width: 50px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.xp-bar {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #a855f7, #ec4899);
  border-radius: 3px;
  transition: width 0.5s ease;
  min-width: 0;
}

.daily-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
}

.daily-count {
  color: #fbbf24;
  font-weight: 600;
}

.daily-goal {
  color: var(--text-dim);
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {
  .action-btn {
    min-height: 44px;
    font-size: 11px;
    padding: 8px 4px;
  }
  
  .detail-actions {
    flex-wrap: wrap;
  }
  
  .note-marker {
    width: 44px;
    height: 44px;
  }
  
  .note-textarea {
    min-height: 80px;
    font-size: 16px;
  }
  
  .note-actions {
    flex-direction: column;
  }
  
  .note-save-btn,
  .note-delete-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  
  .quiz-speak-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
  
  .learning-status {
    padding: 4px 8px;
    gap: 8px;
    font-size: 11px;
    margin-right: 4px;
  }
  
  .level-badge {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .xp-bar-wrap {
    width: 35px;
  }
  
  .quiz-q-text-wrap {
    gap: 8px;
  }
}

/* ==================== 今日复习入口按钮 ==================== */
.review-entry {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s var(--cubic-smooth);
  width: 100%;
  text-align: left;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

.review-entry::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #a855f7, #60a5fa);
  opacity: 0.8;
}

.review-entry:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.15);
  background: rgba(168, 85, 247, 0.05);
}

.review-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.review-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.review-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.review-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.review-badge {
  background: linear-gradient(135deg, #a855f7, #60a5fa);
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.review-arrow {
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.review-entry:hover .review-arrow {
  transform: translateX(4px);
  color: var(--text-primary);
}

/* 复习完成页面 */
.review-complete-tip {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ==================== 复习质量反馈按钮 ==================== */
.review-quality-buttons {
  animation: fadeInUp 0.3s ease;
}

.review-quality-hint {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 16px;
}

.quality-btn-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.quality-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
  color: var(--text-primary);
}

.quality-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.quality-btn.quality-forgot:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
}

.quality-btn.quality-fuzzy:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.1);
}

.quality-btn.quality-remember:hover {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
}

.quality-emoji {
  font-size: 28px;
}

.quality-text {
  font-size: 13px;
  font-weight: 600;
}

.quality-interval {
  font-size: 11px;
  color: var(--text-muted);
}

/* 复习模式标签 */
.review-tag {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
  font-weight: 600;
}

/* ==================== 对比模态框样式 ==================== */
.compare-modal {
  max-width: 900px;
  width: calc(100% - 40px);
  max-height: 85vh;
}

.compare-body {
  padding: 24px;
}

.compare-preset-section {
  margin-bottom: 20px;
}

.compare-preset-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.compare-preset-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.compare-preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: inherit;
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
}

.compare-preset-btn:hover {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-1px);
}

.compare-preset-vs {
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.compare-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.compare-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: 20px;
  position: relative;
}

.compare-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.compare-item-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
}

.compare-item-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.compare-section {
  margin-bottom: 16px;
}

.compare-section:last-child {
  margin-bottom: 0;
}

.compare-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.compare-definition {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid;
}

.compare-keypoints {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compare-keypoint {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  line-height: 1.5;
  padding-left: 24px;
  position: relative;
}

.compare-keypoint::before {
  content: '✓';
  position: absolute;
  left: 10px;
  color: var(--cluster-color, #22c55e);
  font-weight: bold;
}

.compare-vs-divider {
  display: none;
}

/* 对比模式提示 */
.compare-mode-hint {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: #c084fc;
  font-size: 14px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .review-entry {
    padding: 16px;
    gap: 12px;
  }
  
  .review-icon {
    font-size: 28px;
  }
  
  .review-title {
    font-size: 15px;
  }
  
  .review-desc {
    font-size: 12px;
  }
  
  .quality-btn-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .quality-btn {
    flex-direction: row;
    justify-content: center;
    padding: 12px;
  }
  
  .compare-modal {
    width: calc(100% - 24px);
    margin: 12px;
    max-height: 90vh;
  }
  
  .compare-body {
    padding: 16px;
  }
  
  .compare-preset-list {
    grid-template-columns: 1fr;
  }
  
  .compare-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .compare-vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 18px;
  }
}

/* ==================== 学习统计模态框样式 ==================== */
.stats-modal {
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
}

.stats-body {
  padding: 20px;
  overflow-y: auto;
}

.stats-body::-webkit-scrollbar {
  width: 6px;
}

.stats-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

.stats-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
}

.stat-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat-streak {
  background: linear-gradient(135deg, #f97316, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.stat-level {
  margin-bottom: 8px;
}

.stat-level-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: white;
  font-weight: 700;
  font-size: 16px;
  padding: 4px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.stat-xp-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 4px;
}

.stat-xp-bar {
  height: 100%;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  border-radius: 4px;
  transition: width 0.5s ease;
  min-width: 0;
}

.stats-section {
  margin-bottom: 24px;
}

.stats-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cluster-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cluster-stat-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  padding: 12px;
}

.cluster-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cluster-stat-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.cluster-stat-info {
  font-size: 11px;
  color: var(--text-muted);
}

.cluster-stat-bar-wrap {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}

.cluster-stat-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  min-width: 0;
}

.chart-container {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 16px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 120px;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 8px;
}

.chart-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.chart-bar {
  width: 100%;
  max-width: 32px;
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: height 0.5s ease;
  min-height: 4px;
}

.chart-bar-value {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.chart-label {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

.stats-footer {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.stats-continue-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.stats-continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.4);
}

.stats-continue-btn:active {
  transform: scale(0.98);
}

/* 统计面板移动端适配 */
@media (max-width: 768px) {
  .stats-modal {
    width: calc(100% - 24px);
    max-height: 90vh;
  }
  
  .stats-body {
    padding: 16px;
  }
  
  .stats-overview {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-value {
    font-size: 24px;
  }
  
  .chart-bars {
    height: 100px;
    gap: 4px;
  }
  
  .chart-bar {
    max-width: 28px;
  }
}


