/* ==========================================================================
   🥁 鼓韵识谱 · DrumNotes 核心样式表
   录音棚舞台美学、拟真架子鼓材质、打击物理动效与五线谱交互系统
   ========================================================================== */

:root {
  --bg-color: #0b0d13;
  --bg-card: rgba(22, 27, 34, 0.85);
  --bg-card-border: rgba(255, 255, 255, 0.1);
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.5);
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.5);
  --accent-red: #ef4444;
  --accent-red-glow: rgba(239, 68, 68, 0.5);
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  
  --cymbal-gold-start: #ffe066;
  --cymbal-gold-mid: #d4a017;
  --cymbal-gold-end: #8a6508;
  --snare-head: #e2e8f0;
  --tom-head: #cbd5e1;
  --rim-metal: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 50%, #475569 100%);
  --shadow-standard: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(circle at 50% 20%, rgba(30, 41, 59, 0.7) 0%, transparent 70%),
    radial-gradient(circle at 10% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 全屏粒子画布 */
#fx-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

/* 页面主骨架 */
.app-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
}

/* ==========================================================================
   1. 顶部 Header 与 仪表盘
   ========================================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  box-shadow: var(--shadow-standard);
}

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

.brand-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.3));
}

.brand-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.brand-slogan {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 状态仪表盘 */
.stats-dashboard {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 14px;
  border-radius: 12px;
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
  font-size: 1.25rem;
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.streak-card {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
}

.streak-card .stat-value {
  color: #fbbf24;
  text-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.streak-pulse {
  animation: pulseScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pulseScale {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); color: #fff; }
  100% { transform: scale(1); }
}

/* 顶部操作按钮 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

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

.action-btn.active {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.5);
  color: #67e8f9;
}

.action-btn.muted {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
}

/* ==========================================================================
   2. 模式切换栏 (Mode Navigation)
   ========================================================================== */
.mode-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.mode-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(59, 130, 246, 0.25));
  border-color: rgba(6, 182, 212, 0.6);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

.mode-btn.mode-explore.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(236, 72, 153, 0.25));
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
}

/* ==========================================================================
   3. 主内容区域：五线谱展示区
   ========================================================================== */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.notation-section {
  display: flex;
  justify-content: center;
}

.notation-card-wrapper {
  width: 100%;
  max-width: 620px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: var(--shadow-standard);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.question-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.prompt-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.question-icon {
  font-size: 1.15rem;
}

.btn-skip-next {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.btn-skip-next.visible {
  opacity: 1;
  pointer-events: auto;
  animation: fadeInRight 0.3s ease;
}

.btn-skip-next:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(2px);
}

/* 五线谱 SVG 容器 */
.notation-view {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.notation-svg {
  width: 100%;
  max-width: 520px;
  height: auto;
  color: #f8fafc;
  overflow: visible;
  transition: transform 0.2s ease, filter 0.3s ease;
}

/* 谱表背景面板 */
.staff-card-bg {
  fill: #151a23;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.staff-line {
  stroke: #94a3b8;
  opacity: 0.75;
}

.staff-bar-line {
  stroke: #cbd5e1;
}

.drum-note-group {
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 答对动画效果 */
.notation-svg.animate-correct {
  animation: successBounce 0.5s ease;
}

@keyframes successBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.notation-svg.notation-correct .drum-note-group {
  color: #10b981;
}

/* 答错抖动动画 */
.notation-svg.animate-wrong {
  animation: shakeWrong 0.4s ease;
}

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

.notation-svg.notation-wrong .drum-note-group {
  color: #ef4444;
}

/* 状态与口诀提示区 */
.notation-meta {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.correct-badge {
  color: #34d399;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  animation: fadeInPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wrong-badge {
  color: #f87171;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.15);
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.wrong-tip {
  font-size: 0.8rem;
  color: #fbbf24;
}

/* 自由探索模式详情卡 */
.explore-detail-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 6px 16px;
  border-radius: 12px;
}

.explore-name {
  font-weight: 800;
  font-size: 1rem;
  color: #c084fc;
}

.explore-pos {
  font-size: 0.85rem;
}

.explore-mnemonic {
  font-size: 0.82rem;
  color: #fcd34d;
}

/* ==========================================================================
   4. 架子鼓全景实战舞台 (The Interactive Drum Kit)
   ========================================================================== */
.drum-stage-section {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.drum-kit-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 520px;
  background: radial-gradient(circle at 50% 60%, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.8) 70%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), var(--shadow-standard);
  overflow: hidden;
}

/* 所有鼓件和镲片的通用基类 */
.drum-element {
  position: absolute;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
  touch-action: manipulation;
}

.drum-element:hover {
  transform: scale(1.03);
}

.drum-element:active,
.drum-element.hit-active {
  transform: scale(0.95);
}

/* 当模式不包含该鼓件时半透明置灰 */
.drum-element.drum-disabled {
  opacity: 0.22;
  filter: grayscale(80%);
  pointer-events: none;
}

/* 鼓件标签体系 */
.drum-label {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.drum-label .name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f1f5f9;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

.drum-label .position-tag {
  font-size: 0.68rem;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.65);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
  white-space: nowrap;
}

.key-badge {
  font-size: 0.65rem;
  font-family: inherit;
  font-weight: 800;
  background: linear-gradient(180deg, #334155, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  color: #38bdf8;
  margin-top: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* 隐藏快捷键类 */
body.hide-key-hints .key-badge {
  display: none;
}

/* 打击波纹涟漪动效 (Hit Ripple) */
.hit-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 75%);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

.hit-active .hit-ripple {
  animation: rippleOut 0.35s ease-out;
}

@keyframes rippleOut {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(5); opacity: 0; }
}

/* ==========================================================================
   4.1 拟真镲片 (Cymbals: Crash, Hi-Hat, Ride)
   ========================================================================== */
.cymbal-disk {
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 35%, 
    var(--cymbal-gold-start) 0%, 
    var(--cymbal-gold-mid) 40%, 
    var(--cymbal-gold-end) 95%
  );
  box-shadow: 
    0 12px 24px rgba(0, 0, 0, 0.7),
    inset 0 2px 6px rgba(255, 255, 255, 0.6),
    inset 0 -4px 8px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 160, 23, 0.8);
  transition: transform 0.15s ease;
}

/* 镲片车纹拉丝光泽 (Concentric grooves) */
.cymbal-radial-grooves {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  box-shadow: 
    inset 0 0 0 6px rgba(0, 0, 0, 0.1),
    inset 0 0 0 14px rgba(255, 255, 255, 0.08),
    inset 0 0 0 22px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

/* 镲帽 (Cymbal Bell) */
.cymbal-bell {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #d4a017 60%, #5c4305 100%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.4);
}

/* 吊镲 (Crash) - 130px, 左上 */
.cymbal.crash {
  top: 35px;
  left: 55px;
  z-index: 5;
}
.crash-disk {
  width: 130px;
  height: 130px;
}
.hit-active.crash .crash-disk {
  animation: cymbalWobble 0.6s ease;
}

/* 闭镲 (Hi-Hat Closed) - 110px, 左侧 */
.cymbal.hihat-closed {
  top: 175px;
  left: 30px;
  z-index: 6;
}
.hihat-disk {
  width: 110px;
  height: 110px;
}
.hit-active.hihat-closed .hihat-disk {
  animation: hihatChomp 0.2s ease;
}

/* 开镲 (Hi-Hat Open) - 100px, 闭镲偏上 */
.cymbal.hihat-open {
  top: 135px;
  left: 135px;
  z-index: 7;
}
.hihat-open-disk {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle at 35% 35%, #fff3a8 0%, #e6a71e 50%, #996500 100%);
}

/* 叮叮镲 (Ride) - 145px, 右上 */
.cymbal.ride {
  top: 40px;
  right: 50px;
  z-index: 5;
}
.ride-disk {
  width: 145px;
  height: 145px;
}
.ride-bell {
  width: 36px;
  height: 36px;
}
.hit-active.ride .ride-disk {
  animation: cymbalWobble 0.7s ease;
}

@keyframes cymbalWobble {
  0% { transform: rotate(0deg) scale(0.96); }
  25% { transform: rotate(-3deg) scale(1.02); }
  50% { transform: rotate(2deg) scale(0.99); }
  75% { transform: rotate(-1deg) scale(1.01); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes hihatChomp {
  0% { transform: scale(0.95); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   4.2 拟真通鼓与军鼓 (Drums: Snare, Toms, Kick)
   ========================================================================== */
.drum-body {
  position: relative;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.75);
}

/* 金属电镀压圈 (Chrome Drum Rim) */
.drum-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--rim-metal);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.6),
    inset 0 2px 3px rgba(255, 255, 255, 0.8),
    inset 0 -2px 3px rgba(0, 0, 0, 0.6);
}

/* 鼓皮 (Drumhead) */
.drum-skin {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 军鼓 (Snare) - 125px, 左中下 */
.drum.snare {
  top: 250px;
  left: 170px;
  z-index: 10;
}
.snare-body {
  width: 125px;
  height: 125px;
}
.snare-skin {
  background: radial-gradient(circle at 45% 45%, #ffffff 0%, #e2e8f0 70%, #cbd5e1 100%);
}
.snare-wire-accent {
  width: 80%;
  height: 3px;
  background: repeating-linear-gradient(90deg, #94a3b8, #94a3b8 2px, transparent 2px, transparent 5px);
  opacity: 0.6;
}

/* 军鼓边击 (Side Stick) */
.drum-rim-special.side-stick {
  top: 360px;
  left: 110px;
  z-index: 11;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.stick-icon {
  font-size: 1.1rem;
}

/* 高音通鼓 (High Tom) - 105px, 中偏左上 */
.drum.high-tom {
  top: 90px;
  left: 310px;
  z-index: 8;
}
.high-tom .drum-body {
  width: 105px;
  height: 105px;
}
.tom-skin {
  background: radial-gradient(circle at 45% 45%, #f1f5f9 0%, #cbd5e1 75%, #94a3b8 100%);
}

/* 中音通鼓 (Mid Tom) - 115px, 中偏右上 */
.drum.mid-tom {
  top: 95px;
  left: 440px;
  z-index: 8;
}
.mid-tom .drum-body {
  width: 115px;
  height: 115px;
}

/* 落地通鼓 (Floor Tom) - 140px, 右下侧 */
.drum.floor-tom {
  top: 245px;
  right: 130px;
  z-index: 9;
}
.floor-body {
  width: 140px;
  height: 140px;
}
.floor-skin {
  background: radial-gradient(circle at 45% 45%, #f8fafc 0%, #cbd5e1 70%, #94a3b8 100%);
}

/* ==========================================================================
   4.3 底鼓 (Bass Drum / Kick) - 核心中流砥柱
   ========================================================================== */
.drum.bass-drum {
  top: 195px;
  left: 315px;
  z-index: 7;
}

.bass-drum-outer {
  position: relative;
  width: 185px;
  height: 185px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
}

.bass-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #475569 0%, #1e293b 50%, #0f172a 100%);
  border: 3px solid #64748b;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.bass-skin {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 75%, #020617 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.bass-logo {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  line-height: 1.1;
  transform: translateY(-8px);
}

.bass-hole {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #000;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 1), 0 0 0 2px rgba(255, 255, 255, 0.15);
  transform: translateY(18px) translateX(30px);
}

.bass-pedal-area {
  margin-top: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 3px 10px;
  border-radius: 20px;
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 700;
}

/* 踩镲脚踏板 (Hi-Hat Pedal) */
.drum-element.pedal.hihat-pedal {
  top: 385px;
  left: 20px;
  z-index: 6;
}

.pedal-plate {
  width: 65px;
  height: 90px;
  background: linear-gradient(180deg, #334155 0%, #1e293b 80%, #0f172a 100%);
  border: 2px solid #64748b;
  border-radius: 8px 8px 16px 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pedal-lines {
  width: 75%;
  height: 35px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  background: repeating-linear-gradient(180deg, transparent, transparent 5px, rgba(255, 255, 255, 0.15) 5px, rgba(255, 255, 255, 0.15) 7px);
}

.pedal-label {
  font-size: 0.62rem;
  color: #94a3b8;
  font-weight: 700;
}

/* ==========================================================================
   5. 【核心需求】答对与答错的反馈与高亮系统
   ========================================================================== */

/* 答对击中：爆发出绿色荧光波纹 */
.drum-element.drum-correct-hit {
  filter: drop-shadow(0 0 20px #10b981) brightness(1.2) !important;
}

/* 答错击中：红色警示抖动 */
.drum-element.drum-wrong-hit {
  filter: drop-shadow(0 0 20px #ef4444) brightness(1.1) !important;
  animation: shakeElement 0.35s ease;
}

@keyframes shakeElement {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* 【超级重点】：答错后高亮引导正确的鼓部件！ */
.drum-element.drum-guide-highlight {
  z-index: 99 !important;
  animation: guidePulse 1.2s infinite ease-in-out !important;
}

@keyframes guidePulse {
  0% {
    filter: drop-shadow(0 0 10px #f59e0b) drop-shadow(0 0 25px rgba(245, 158, 11, 0.7)) brightness(1.2);
    transform: scale(1.04);
  }
  50% {
    filter: drop-shadow(0 0 25px #fbbf24) drop-shadow(0 0 45px rgba(251, 191, 36, 0.9)) brightness(1.35);
    transform: scale(1.12);
  }
  100% {
    filter: drop-shadow(0 0 10px #f59e0b) drop-shadow(0 0 25px rgba(245, 158, 11, 0.7)) brightness(1.2);
    transform: scale(1.04);
  }
}

/* 浮动的指引提示气泡 */
.guide-indicator-bubble {
  position: absolute;
  top: -42px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 15px rgba(245, 158, 11, 0.6);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  pointer-events: none;
  animation: floatBounce 1s infinite alternate ease-in-out;
}

.guide-indicator-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: #d97706 transparent transparent transparent;
}

@keyframes floatBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* ==========================================================================
   6. 正向鼓励浮动吐司 (Dynamic Toast Encouragement)
   ========================================================================== */
.encouragement-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.encouragement-toast.toast-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.encouragement-toast.toast-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.encouragement-toast.toast-super {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: #ffffff;
  border: 2px solid #ffd700;
  font-size: 1.2rem;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.6);
  animation: glowPulse 1s infinite alternate;
}

.encouragement-toast.toast-warning {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(185, 28, 28, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes glowPulse {
  0% { transform: translateX(-50%) scale(1); }
  100% { transform: translateX(-50%) scale(1.06); }
}

/* ==========================================================================
   7. 记谱速查秘籍模态弹窗 (Modal Cheat Sheet)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 780px;
  max-height: 85vh;
  background: #161b22;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.visible .modal-card {
  transform: translateY(0) scale(1);
}

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

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title h2 {
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cheat-intro-box {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 12px 16px;
  border-radius: 12px;
}

.rhyme-text {
  font-size: 0.92rem;
  color: #fcd34d;
  font-weight: 600;
  line-height: 1.6;
  margin-top: 4px;
}

.cheat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.cheat-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: background 0.2s;
}

.cheat-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.cheat-item-badge {
  min-width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.cheat-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cheat-item-title strong {
  font-size: 0.95rem;
  color: #f1f5f9;
}

.cheat-en {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cheat-item-pos {
  font-size: 0.82rem;
  color: #e2e8f0;
}

.highlight-tag {
  color: #38bdf8;
  font-weight: 700;
}

.cheat-item-mnemonic {
  font-size: 0.8rem;
  color: #fbbf24;
}

.cheat-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
}

.btn-dialog-close {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #000;
  font-weight: 800;
  padding: 8px 20px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-dialog-close:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* ==========================================================================
   8. 视图模式切换工具条 (View Toolbar: Kit vs Pads)
   ========================================================================== */
.stage-view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: 0 4px;
}

.view-switch-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 3px;
  gap: 4px;
}

.view-switch-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-switch-btn:hover {
  color: #fff;
}

.view-switch-btn.active {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-orient-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ==========================================================================
   9. 拟真架子鼓动态自适应容器 (Dynamic Scaler Wrapper)
   ========================================================================== */
.drum-scaler-wrapper {
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
  position: relative;
  transition: height 0.2s ease;
}

.drum-kit-container {
  width: 900px;
  height: 520px;
  position: relative;
  background: radial-gradient(circle at 50% 60%, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.8) 70%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), var(--shadow-standard);
  overflow: hidden;
  flex-shrink: 0;
  transform-origin: top center;
  transition: transform 0.15s ease-out;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   10. 手机/触控优化大打击垫模式 (Touch Drum Pads View)
   ========================================================================== */
.drum-pads-container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 8px 4px;
}

.pad-item {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 16px 12px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
}

.pad-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--pad-color, #f59e0b);
  box-shadow: 0 0 10px var(--pad-color, #f59e0b);
}

.pad-item:hover {
  transform: translateY(-2px);
  border-color: var(--pad-color, #f59e0b);
}

.pad-item:active,
.pad-item.hit-active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 25px var(--pad-color, #f59e0b);
}

.pad-item.pad-large {
  grid-column: span 2;
  background: linear-gradient(145deg, rgba(231, 76, 60, 0.15), rgba(15, 23, 42, 0.9));
}

.pad-icon {
  font-size: 1.4rem;
}

.pad-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #f8fafc;
  text-align: center;
  line-height: 1.1;
}

.pad-pos {
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 8px;
  border-radius: 10px;
}

.pad-key {
  font-size: 0.65rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

body.hide-key-hints .pad-key {
  display: none;
}

.pad-item.drum-disabled {
  opacity: 0.25;
  filter: grayscale(80%);
  pointer-events: none;
}

.pad-item.drum-correct-hit {
  border-color: #10b981 !important;
  box-shadow: 0 0 30px #10b981 !important;
  background: rgba(16, 185, 129, 0.25) !important;
}

.pad-item.drum-wrong-hit {
  border-color: #ef4444 !important;
  box-shadow: 0 0 25px #ef4444 !important;
  animation: shakeElement 0.35s ease;
}

.pad-item.drum-guide-highlight {
  border-color: #fbbf24 !important;
  animation: padGuidePulse 1s infinite alternate !important;
}

@keyframes padGuidePulse {
  0% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 35px rgba(251, 191, 36, 1);
    transform: scale(1.05);
  }
}

/* ==========================================================================
   11. 深入移动端和桌面端全面兼容响应式 (Full Responsive Rules)
   ========================================================================== */
@media (max-width: 768px) {
  .app-layout {
    padding: 8px 10px 24px;
    gap: 12px;
  }

  .app-header {
    padding: 10px 14px;
    gap: 10px;
  }

  .header-brand {
    gap: 8px;
  }

  .brand-icon {
    font-size: 1.8rem;
  }

  .brand-text h1 {
    font-size: 1.15rem;
  }

  .brand-slogan {
    display: none; /* 移动端隐藏冗长口号，留出屏幕空间 */
  }

  /* 移动端仪表盘采用紧凑网格 */
  .stats-dashboard {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .stat-card {
    padding: 6px 4px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
  }

  .stat-icon {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.6rem;
    white-space: nowrap;
  }

  .stat-value {
    font-size: 1.05rem;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .action-btn {
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  /* 模式选择按钮支持横向平滑滚动 */
  .mode-navigation {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mode-navigation::-webkit-scrollbar {
    display: none;
  }

  .mode-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  /* 五线谱移动端适配 */
  .notation-card-wrapper {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .prompt-text {
    font-size: 0.85rem;
  }

  .notation-meta {
    font-size: 0.8rem;
    min-height: 24px;
  }

  /* 打击垫在小屏上优化 */
  .drum-pads-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .pad-item.pad-large {
    grid-column: span 2;
  }
  .pad-item {
    padding: 12px 8px;
    min-height: 75px;
  }
  .pad-title {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .drum-pads-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .guide-indicator-bubble {
    font-size: 0.7rem;
    padding: 3px 8px;
  }
}

@keyframes fadeInPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeInRight {
  0% { transform: translateX(10px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

