/* ===== 全局变量 ===== */
:root {
  --neon-pink: #ff0080;
  --neon-purple: #8b00ff;
  --neon-cyan: #00ffff;
  --neon-yellow: #ffdd00;
  --dark-bg: #0a0a0f;
  --card-bg: rgba(20, 20, 30, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);
  --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== 基础重置 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: var(--font-family);
  background: var(--dark-bg);
  color: var(--text-primary);
}

/* ===== 粒子背景 Canvas ===== */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== 页面路由系统 ===== */
.page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 1;
  overflow-y: auto;
}

.page.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

/* ===== 首页 ===== */
.main-header {
  position: relative;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.dot.cyan { background: var(--neon-cyan); box-shadow: 0 0 10px var(--neon-cyan); }
.dot.pink { background: var(--neon-pink); box-shadow: 0 0 10px var(--neon-pink); }

.logo-text {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 6px;
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.member-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 0, 128, 0.15);
  color: var(--neon-pink);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.member-btn:hover {
  background: rgba(255, 0, 128, 0.3);
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.2);
}

.home-main {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
  padding: 20px 40px 40px;
  gap: 40px;
}

/* 标题区域 */
.title-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.main-title {
  font-size: 96px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  gap: 20px;
}

.title-char {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(255, 0, 128, 0.5));
}

.subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  letter-spacing: 8px;
}

/* 音频可视化 */
.audio-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}

.audio-visualizer .bar {
  width: 4px;
  background: linear-gradient(to top, var(--neon-cyan), var(--neon-pink));
  border-radius: 2px;
  animation: soundBar 1.2s ease-in-out infinite;
}

.audio-visualizer .bar:nth-child(1) { height: 20%; animation-delay: 0s; }
.audio-visualizer .bar:nth-child(2) { height: 60%; animation-delay: 0.1s; }
.audio-visualizer .bar:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.audio-visualizer .bar:nth-child(4) { height: 80%; animation-delay: 0.3s; }
.audio-visualizer .bar:nth-child(5) { height: 30%; animation-delay: 0.4s; }
.audio-visualizer .bar:nth-child(6) { height: 70%; animation-delay: 0.5s; }
.audio-visualizer .bar:nth-child(7) { height: 50%; animation-delay: 0.6s; }
.audio-visualizer .bar:nth-child(8) { height: 90%; animation-delay: 0.7s; }
.audio-visualizer .bar:nth-child(9) { height: 35%; animation-delay: 0.8s; }
.audio-visualizer .bar:nth-child(10) { height: 65%; animation-delay: 0.9s; }
.audio-visualizer .bar:nth-child(11) { height: 45%; animation-delay: 1.0s; }
.audio-visualizer .bar:nth-child(12) { height: 75%; animation-delay: 1.1s; }

@keyframes soundBar {
  0%, 100% { transform: scaleY(0.5); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* 模块卡片网格 */
.modules-grid {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 1000px;
  width: 100%;
}

.module-card {
  position: relative;
  flex: 1;
  min-width: 380px;
  max-width: 460px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 32px;
  cursor: pointer;
  transition: all 0.4s ease;
  overflow: hidden;
}

.module-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 255, 255, 0.3);
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card-glow.pink {
  background: radial-gradient(circle, rgba(255, 0, 128, 0.08) 0%, transparent 70%);
}

.module-card:hover .card-glow {
  opacity: 1;
}

.card-content {
  position: relative;
  z-index: 2;
}

.card-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.badge.hot { background: rgba(255, 100, 0, 0.3); color: #ff8800; border: 1px solid rgba(255, 136, 0, 0.4); }
.badge.new { background: rgba(0, 255, 136, 0.15); color: #00ff88; border: 1px solid rgba(0, 255, 136, 0.3); }
.badge.vip { background: rgba(255, 200, 0, 0.2); color: #ffcc00; border: 1px solid rgba(255, 200, 0, 0.4); }
.badge.ai { background: rgba(139, 0, 255, 0.2); color: #bb66ff; border: 1px solid rgba(139, 0, 255, 0.4); }

.card-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.card-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-title.cyan { color: var(--neon-cyan); text-shadow: 0 0 20px rgba(0, 255, 255, 0.3); }
.card-title.pink { color: var(--neon-pink); text-shadow: 0 0 20px rgba(255, 0, 128, 0.3); }

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.card-stats {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.card-stats strong {
  color: var(--text-primary);
  font-size: 18px;
  margin-right: 4px;
}

.card-stats .free {
  color: var(--neon-cyan);
  font-weight: 700;
}

.card-stats .vip-text {
  color: #ffcc00;
  font-weight: 700;
}

.card-arrow {
  position: absolute;
  right: 24px;
  bottom: 24px;
  font-size: 24px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.module-card:hover .card-arrow {
  color: var(--neon-cyan);
  transform: translateX(4px);
}

/* 首页底部按钮 */
.home-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(0, 255, 255, 0.3);
}

.action-btn.vip {
  background: rgba(255, 200, 0, 0.1);
  border-color: rgba(255, 200, 0, 0.3);
  color: #ffcc00;
}

.action-btn.vip:hover {
  background: rgba(255, 200, 0, 0.2);
}

/* ===== 页面通用头部 ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  position: relative;
  z-index: 20;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.back-btn {
  padding: 8px 20px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.header-spacer {
  width: 80px;
}

/* ===== 暖场闯关 - 动作选择网格 ===== */
.warmup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 20px 40px 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.exercise-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.exercise-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 255, 0.3);
  box-shadow: 0 10px 40px rgba(0, 255, 255, 0.1);
}

.exercise-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.exercise-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.exercise-bpm {
  font-size: 13px;
  color: var(--neon-cyan);
  margin-bottom: 12px;
}

.exercise-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== 舞蹈教学 - 舞蹈选择网格 ===== */
.dance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 20px 40px 40px;
  max-width: 1000px;
  margin: 0 auto;
}

.dance-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dance-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 0, 128, 0.3);
  box-shadow: 0 10px 40px rgba(255, 0, 128, 0.1);
}

.dance-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.dance-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.dance-info {
  font-size: 13px;
  color: var(--neon-pink);
  margin-bottom: 12px;
}

.dance-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 舞蹈空状态 */
.dance-empty {
  text-align: center;
  padding: 80px 40px;
}

.dance-empty .placeholder-icon {
  font-size: 80px;
  margin-bottom: 24px;
  opacity: 0.5;
}

.dance-empty h3 {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.dance-empty p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ===== 暖场闯关 - 游戏覆盖层 ===== */
.warmup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.98);
  z-index: 100;
}

.warmup-overlay.wu-active {
  display: block !important;
}

/* 开始页面 */
.wu-start-screen {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.wu-start-screen.wu-visible {
  display: flex;
  opacity: 1;
}

.wu-start-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.wu-start-emoji {
  font-size: 64px;
}

.wu-start-content h2 {
  font-size: 36px;
  font-weight: 700;
}

.wu-start-content p {
  font-size: 16px;
  color: var(--text-secondary);
}

.wu-start-bpm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 10px 0;
}

.bpm-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 3px;
}

.bpm-value {
  font-size: 48px;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 30px rgba(0, 255, 255, 0.4);
}

.wu-start-actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

/* 按钮 */
.wu-btn {
  padding: 14px 36px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wu-btn.primary {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  box-shadow: 0 4px 20px rgba(255, 0, 128, 0.3);
}

.wu-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 0, 128, 0.5);
}

.wu-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.wu-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* 游戏区域 */
.wu-game-area {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  flex-direction: column;
  padding: 24px 40px;
}

.wu-game-area.wu-running {
  display: flex;
}

.wu-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.wu-timer {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--neon-cyan);
}

.wu-progress {
  flex: 1;
  max-width: 500px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin: 0 24px;
  overflow: hidden;
}

.wu-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.wu-pause-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wu-pause-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* 视频容器 */
.wu-video-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 0, 128, 0.3);
}

.wu-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wu-video-hidden {
  display: none;
}

/* 视频占位动画 */
.wu-video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 0, 128, 0.1), rgba(139, 0, 255, 0.1));
}

.wu-pulse-ring {
  width: 120px;
  height: 120px;
  border: 4px solid var(--neon-pink);
  border-radius: 50%;
  animation: pulse 2s ease-out infinite;
}

.wu-pulse-ring.delay {
  animation-delay: 1s;
  border-color: var(--neon-cyan);
}

@keyframes pulse {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* 场景显示 */
.wu-scene-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.wu-scene-emoji {
  font-size: 80px;
  animation: sceneBounce 0.6s ease;
}

@keyframes sceneBounce {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.wu-scene-name {
  font-size: 36px;
  font-weight: 700;
  color: var(--neon-cyan);
}

.wu-scene-hint {
  font-size: 16px;
  color: var(--text-secondary);
}

/* 反馈 */
.wu-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: 900;
  pointer-events: none;
  opacity: 0;
}

.wu-feedback.show {
  animation: feedbackPop 0.8s ease forwards;
}

.wu-feedback.perfect { color: var(--neon-cyan); text-shadow: 0 0 30px rgba(0, 255, 255, 0.5); }
.wu-feedback.good { color: var(--neon-yellow); text-shadow: 0 0 30px rgba(255, 221, 0, 0.5); }
.wu-feedback.miss { color: #ff4444; text-shadow: 0 0 30px rgba(255, 68, 68, 0.5); }

@keyframes feedbackPop {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  30% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -80%) scale(1); opacity: 0; }
}

/* 统计 */
.wu-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.wu-combo {
  font-size: 20px;
  font-weight: 700;
  color: var(--neon-yellow);
}

.wu-score {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

/* 摄像头预览 */
.wu-camera-preview {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 200px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.5);
}

.wu-camera-preview video,
.wu-camera-preview canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 结算页面 */
.wu-result-screen {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  align-items: center;
  justify-content: center;
}

.wu-result-screen.wu-visible {
  display: flex;
}

.wu-result-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.wu-result-rank {
  font-size: 120px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(0, 255, 255, 0.3));
}

.wu-result-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 280px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 15px;
}

.stat-row span { color: var(--text-secondary); }
.stat-row strong { color: var(--text-primary); font-size: 18px; }

.wu-result-actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

/* 倒计时 */
.wu-countdown {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.9);
}

.wu-countdown.wu-visible {
  display: flex;
}

.countdown-number {
  font-size: 200px;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 60px rgba(0, 255, 255, 0.5);
  animation: countdownPulse 1s ease;
}

@keyframes countdownPulse {
  0% { transform: scale(2); opacity: 0; }
  50% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== 舞蹈教学占位 ===== */
.dance-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 20px;
  text-align: center;
}

.placeholder-icon {
  font-size: 80px;
  opacity: 0.5;
}

.dance-placeholder h3 {
  font-size: 28px;
  color: var(--text-primary);
}

.dance-placeholder p {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ========== 舞蹈游戏覆盖层 ========== */
.dance-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.97);
  z-index: 100;
  overflow-y: auto;
}

.dance-overlay.ds-active {
  display: block;
}

.ds-screen {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ds-screen.ds-visible {
  display: flex;
  opacity: 1;
}

/* 舞蹈选择页 */
#ds-select-screen {
  flex-direction: column;
  padding: 30px;
}

.ds-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.ds-header h2 {
  font-size: 28px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ds-close-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.ds-close-btn:hover {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
}

.ds-dance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.ds-loading, .ds-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: #888;
}

.ds-dance-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
}

.ds-dance-card:hover {
  border-color: var(--neon-pink);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(255, 0, 128, 0.2);
}

.ds-card-cover {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: #111;
}

.ds-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
}

.ds-card-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 0, 128, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}

.ds-dance-card:hover .ds-card-play {
  opacity: 1;
}

.ds-card-info {
  padding: 16px;
}

.ds-card-name {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.ds-card-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: #888;
}

/* 舞蹈开始页 */
#ds-start-screen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.ds-start-content {
  text-align: center;
}

.ds-start-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.ds-start-content h2 {
  font-size: 36px;
  color: #fff;
  margin-bottom: 10px;
}

.ds-start-content p {
  color: #888;
  margin-bottom: 40px;
}

.ds-start-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.ds-btn-primary {
  padding: 14px 40px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.ds-btn-primary:hover { opacity: 0.85; }

.ds-btn-secondary {
  padding: 14px 40px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  background: transparent;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.ds-btn-secondary:hover { border-color: #666; color: #aaa; }

/* 舞蹈游戏页 */
#ds-game-screen {
  flex-direction: column;
  padding: 20px;
  height: 100vh;
  box-sizing: border-box;
}

.ds-game-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  flex: 1;
  min-height: 0;
}

.ds-video-area {
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ds-info-area {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ds-game-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.ds-progress-section {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 12px 16px;
}

.ds-time-row {
  font-size: 14px;
  color: #888;
  margin-bottom: 8px;
  font-family: monospace;
}

.ds-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.ds-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  border-radius: 2px;
  transition: width 0.1s;
}

/* 即将到来的动作 */
.ds-upcoming {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: rgba(255, 0, 128, 0.1);
  border: 1px solid rgba(255, 0, 128, 0.3);
  border-radius: 12px;
  text-align: center;
}

.ds-upcoming.ds-visible {
  display: flex;
  animation: upcomingPulse 0.5s ease;
}

@keyframes upcomingPulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.ds-action-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.ds-action-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--neon-pink);
}

.ds-hint-text {
  text-align: center;
  color: #666;
  font-size: 14px;
  min-height: 20px;
}

/* 计分 */
.ds-score-section {
  text-align: center;
  padding: 16px;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
}

.ds-score-value {
  font-size: 48px;
  font-weight: 900;
  color: var(--neon-yellow);
  text-shadow: 0 0 20px rgba(255, 221, 0, 0.5);
}

.ds-combo-value {
  font-size: 24px;
  color: var(--neon-cyan);
  font-weight: 700;
  margin-top: 4px;
}

/* 反馈 */
.ds-feedback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 56px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 30px rgba(255,255,255,0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.3s, transform 0.3s;
}

.ds-feedback.ds-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.ds-feedback-show {
  opacity: 1 !important;
  animation: feedbackPop 0.8s ease forwards;
}

@keyframes feedbackPop {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.ds-feedback-perfect { color: var(--neon-yellow); }
.ds-feedback-good { color: var(--neon-cyan); }
.ds-feedback-ok { color: #aaa; }
.ds-feedback-miss { color: #666; }

/* 游戏底部 */
.ds-game-footer {
  padding: 16px 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 16px;
}

.ds-key-hints {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: #555;
}

.ds-key {
  padding: 4px 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #888;
  font-family: monospace;
  font-size: 12px;
}

/* 摄像头预览（舞蹈游戏内嵌） */
.ds-camera-preview {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 200px;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 0, 128, 0.4);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.2);
}

.ds-camera-label {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 11px;
  color: var(--neon-pink);
  z-index: 5;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 0, 128, 0.8);
}

.ds-camera-preview video,
.ds-camera-preview canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* 镜像 */
}

.ds-camera-preview canvas {
  z-index: 2;
}

/* 舞蹈结算页 */
#ds-result-screen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.ds-result-content {
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.ds-result-icon {
  font-size: 80px;
  margin-bottom: 16px;
}

.ds-result-star {
  font-size: 36px;
  margin: 16px 0;
  letter-spacing: 4px;
}

.ds-result-score {
  font-size: 72px;
  font-weight: 900;
  color: var(--neon-yellow);
  text-shadow: 0 0 40px rgba(255, 221, 0, 0.4);
}

.ds-result-label {
  color: #888;
  font-size: 14px;
  margin-bottom: 24px;
}

.ds-result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.ds-stat {
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
}

.ds-stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.ds-stat-label {
  font-size: 12px;
  color: #888;
}

.ds-result-extras {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
}

.ds-extra-stat {
  font-size: 14px;
  color: #888;
}

.ds-extra-stat strong {
  color: #fff;
  font-size: 18px;
  margin-left: 8px;
}

.ds-result-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .warmup-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
  }
  .modules-grid {
    flex-direction: column;
    align-items: center;
  }
  .module-card {
    min-width: 300px;
    max-width: 100%;
  }
  .main-title {
    font-size: 60px;
  }
  .home-main {
    padding: 20px;
  }
}
