/* ========================================
   VINYL RECORD PLAYBACK BAR - ULTRA FANCY
======================================== */
.playback-bar-fixed {
  position: fixed;
  bottom: 0.8rem;
  left: 50%;
  transform: translateX(-50%) scale(0.75);
  z-index: 1000;
}

.playback-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, 
    rgba(10, 10, 15, 0.99) 0%,
    rgba(20, 15, 25, 0.99) 50%,
    rgba(10, 10, 15, 0.99) 100%);
  backdrop-filter: blur(40px) saturate(180%);
  border-radius: 80px;
  border: 2px solid rgba(255, 110, 199, 0.35);
  box-shadow: 
    0 30px 90px rgba(0, 0, 0, 0.9),
    0 0 120px rgba(255, 110, 199, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 30px rgba(255, 110, 199, 0.12);
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.playback-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(255, 110, 199, 0.08) 50%,
    transparent 70%);
  animation: shimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-150%) skewX(-15deg); }
  50% { transform: translateX(150%) skewX(-15deg); }
}

.playback-container:hover {
  box-shadow: 
    0 40px 110px rgba(0, 0, 0, 0.95),
    0 0 150px rgba(255, 110, 199, 0.35),
    inset 0 2px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 35px rgba(255, 110, 199, 0.18);
  border-color: rgba(255, 110, 199, 0.5);
  transform: translateY(-3px);
}

/* ===== VINYL RECORD PLAY BUTTON ===== */
.play-btn-main {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 50%),
    conic-gradient(from 0deg,
      #1a1a1a 0deg,
      #0f0f0f 45deg,
      #1a1a1a 90deg,
      #0f0f0f 135deg,
      #1a1a1a 180deg,
      #0f0f0f 225deg,
      #1a1a1a 270deg,
      #0f0f0f 315deg,
      #1a1a1a 360deg);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 0 0 4px rgba(255, 110, 199, 0.5),
    0 10px 35px rgba(0, 0, 0, 0.8),
    inset 0 3px 15px rgba(255, 255, 255, 0.1),
    inset 0 -3px 15px rgba(0, 0, 0, 0.6);
  position: relative;
  flex-shrink: 0;
  animation: vinyl-idle 8s linear infinite;
}

/* Vinyl center label */
.play-btn-main::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6ec7, #ff8cd9, #ffb347);
  box-shadow: 
    inset 0 2px 10px rgba(0, 0, 0, 0.3),
    inset 0 -2px 10px rgba(255, 255, 255, 0.2);
}

/* Vinyl center hole */
.play-btn-main::after {
  content: '';
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #050505 40%, #1a1a1a 100%);
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(0, 0, 0, 0.5);
}

.play-btn-main i {
  position: relative;
  z-index: 2;
  margin-left: 4px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

@keyframes vinyl-idle {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.play-btn-main:hover {
  animation: vinyl-spin 1s linear infinite;
  box-shadow: 
    0 0 0 4px rgba(255, 110, 199, 0.7),
    0 15px 50px rgba(255, 110, 199, 0.6),
    0 0 80px rgba(255, 110, 199, 0.4),
    inset 0 3px 20px rgba(255, 255, 255, 0.15),
    inset 0 -3px 20px rgba(0, 0, 0, 0.7);
  transform: scale(1.12);
}

@keyframes vinyl-spin {
  0% { transform: rotate(0deg) scale(1.12); }
  100% { transform: rotate(360deg) scale(1.12); }
}

/* ===== STOP BUTTON ===== */
.stop-btn-main {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 100%);
  border: 2px solid rgba(255, 110, 199, 0.25);
  color: #ff6ec7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  backdrop-filter: blur(10px);
  box-shadow: 
    0 5px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.stop-btn-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 12px;
}

.stop-btn-main i {
  position: relative;
  z-index: 1;
}

.stop-btn-main:hover {
  border-color: transparent;
  transform: scale(1.15) rotate(8deg);
  box-shadow: 
    0 8px 30px rgba(255, 110, 199, 0.6),
    0 0 50px rgba(255, 110, 199, 0.3);
  color: white;
}

.stop-btn-main:hover::before {
  opacity: 1;
}

/* ===== RETRO DIGITAL TIME DISPLAY ===== */
.time-display-main {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.2rem;
  font-weight: 900;
  color: #ff6ec7;
  font-family: 'Courier New', 'Monaco', monospace;
  letter-spacing: 0.1em;
  min-width: 120px;
  padding: 0.6rem 1.3rem;
  background: 
    linear-gradient(135deg,
      rgba(0, 0, 0, 0.5) 0%,
      rgba(0, 0, 0, 0.7) 100%);
  border-radius: 10px;
  border: 2px solid rgba(255, 110, 199, 0.3);
  box-shadow: 
    inset 0 3px 15px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(255, 110, 199, 0.2);
  text-shadow: 
    0 0 15px rgba(255, 110, 199, 0.8),
    0 0 30px rgba(255, 110, 199, 0.5);
  flex-shrink: 0;
  position: relative;
}

.time-display-main::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.2), transparent);
  opacity: 0.5;
  pointer-events: none;
}

.time-display-main .separator {
  color: rgba(255, 110, 199, 0.6);
  animation: blink-separator 1.5s ease-in-out infinite;
}

@keyframes blink-separator {
  0%, 49%, 100% { opacity: 1; }
  50%, 99% { opacity: 0.2; }
}

/* ===== WAVEFORM PROGRESS BAR ===== */
.progress-container {
  flex: 1;
  min-width: 320px;
  max-width: 550px;
  position: relative;
  height: 55px;
  display: flex;
  align-items: center;
}

.seek-slider-main {
  width: 100%;
  height: 10px;
  -webkit-appearance: none;
  appearance: none;
  background: 
    linear-gradient(90deg,
      rgba(255, 110, 199, 0.2) 0%,
      rgba(255, 140, 217, 0.2) 50%,
      rgba(255, 179, 71, 0.2) 100%);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1.5px solid rgba(255, 110, 199, 0.25);
  box-shadow: 
    inset 0 3px 12px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(255, 110, 199, 0.15);
}

.seek-slider-main:hover {
  height: 12px;
  border-color: rgba(255, 110, 199, 0.4);
  box-shadow: 
    inset 0 3px 15px rgba(0, 0, 0, 0.7),
    0 0 35px rgba(255, 110, 199, 0.25);
}

.seek-slider-main::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), transparent 60%),
    linear-gradient(135deg, #ff6ec7, #ff8cd9, #ffb347);
  cursor: pointer;
  box-shadow: 
    0 5px 20px rgba(255, 110, 199, 0.7),
    0 0 30px rgba(255, 110, 199, 0.5),
    inset 0 2px 8px rgba(255, 255, 255, 0.4),
    inset 0 -2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 3px solid rgba(255, 255, 255, 0.5);
}

.seek-slider-main::-webkit-slider-thumb:hover {
  transform: scale(1.35);
  box-shadow: 
    0 8px 30px rgba(255, 110, 199, 0.9),
    0 0 50px rgba(255, 110, 199, 0.7),
    inset 0 2px 10px rgba(255, 255, 255, 0.5),
    inset 0 -2px 10px rgba(0, 0, 0, 0.5);
  border-width: 4px;
}

.seek-slider-main::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  cursor: pointer;
  border: 3px solid rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 5px 20px rgba(255, 110, 199, 0.7),
    0 0 30px rgba(255, 110, 199, 0.5);
}

.progress-glow {
  display: none;
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] .playback-container {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(250, 248, 255, 0.98) 50%,
    rgba(255, 255, 255, 0.98) 100%);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 
    0 30px 90px rgba(0, 0, 0, 0.15),
    0 0 120px rgba(139, 92, 246, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 30px rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .playback-container::before {
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(139, 92, 246, 0.12) 50%,
    transparent 70%);
}

[data-theme="light"] .playback-container:hover {
  box-shadow: 
    0 35px 100px rgba(0, 0, 0, 0.2),
    0 0 140px rgba(139, 92, 246, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 35px rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.65);
}

[data-theme="light"] .play-btn-main {
  background: 
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 50%),
    conic-gradient(from 0deg,
      #d8d8d8 0deg,
      #c0c0c0 45deg,
      #d8d8d8 90deg,
      #c0c0c0 135deg,
      #d8d8d8 180deg,
      #c0c0c0 225deg,
      #d8d8d8 270deg,
      #c0c0c0 315deg,
      #d8d8d8 360deg);
  box-shadow: 
    0 0 0 4px rgba(139, 92, 246, 0.6),
    0 10px 35px rgba(0, 0, 0, 0.15),
    inset 0 3px 15px rgba(255, 255, 255, 0.3),
    inset 0 -3px 15px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .play-btn-main::before {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa, #c4b5fd);
}

[data-theme="light"] .play-btn-main::after {
  background: radial-gradient(circle, #e0e0e0 40%, #f5f5f5 100%);
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.2),
    0 0 15px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .play-btn-main:hover {
  box-shadow: 
    0 0 0 4px rgba(139, 92, 246, 0.8),
    0 15px 50px rgba(139, 92, 246, 0.4),
    0 0 80px rgba(139, 92, 246, 0.3),
    inset 0 3px 20px rgba(255, 255, 255, 0.4),
    inset 0 -3px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .stop-btn-main {
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.1) 0%,
    rgba(139, 92, 246, 0.05) 100%);
  border-color: rgba(139, 92, 246, 0.4);
  color: #8b5cf6;
  box-shadow: 
    0 5px 20px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .stop-btn-main:hover {
  box-shadow: 
    0 8px 30px rgba(139, 92, 246, 0.4),
    0 0 50px rgba(139, 92, 246, 0.2);
}

[data-theme="light"] .time-display-main {
  color: #8b5cf6;
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.15) 0%,
    rgba(139, 92, 246, 0.22) 100%);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 
    inset 0 3px 15px rgba(139, 92, 246, 0.2),
    0 0 30px rgba(139, 92, 246, 0.15);
  text-shadow: 
    0 0 15px rgba(139, 92, 246, 0.5),
    0 0 30px rgba(139, 92, 246, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .time-display-main::before {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), transparent);
}

[data-theme="light"] .seek-slider-main {
  background: linear-gradient(90deg,
    rgba(139, 92, 246, 0.25) 0%,
    rgba(167, 139, 250, 0.25) 50%,
    rgba(196, 181, 253, 0.25) 100%);
  border-color: rgba(139, 92, 246, 0.45);
  box-shadow: 
    inset 0 3px 12px rgba(139, 92, 246, 0.2),
    0 0 25px rgba(139, 92, 246, 0.12);
}

[data-theme="light"] .seek-slider-main:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 
    inset 0 3px 15px rgba(139, 92, 246, 0.25),
    0 0 35px rgba(139, 92, 246, 0.18);
}

[data-theme="light"] .seek-slider-main::-webkit-slider-thumb {
  background: 
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 1), transparent 60%),
    linear-gradient(135deg, #8b5cf6, #a78bfa, #c4b5fd);
  box-shadow: 
    0 5px 20px rgba(139, 92, 246, 0.5),
    0 0 30px rgba(139, 92, 246, 0.35),
    inset 0 2px 8px rgba(255, 255, 255, 0.6),
    inset 0 -2px 8px rgba(139, 92, 246, 0.3);
  border-color: rgba(139, 92, 246, 0.6);
}

[data-theme="light"] .seek-slider-main::-webkit-slider-thumb:hover {
  box-shadow: 
    0 8px 30px rgba(139, 92, 246, 0.7),
    0 0 50px rgba(139, 92, 246, 0.5),
    inset 0 2px 10px rgba(255, 255, 255, 0.7),
    inset 0 -2px 10px rgba(139, 92, 246, 0.4);
}

[data-theme="light"] .seek-slider-main::-moz-range-thumb {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa, #c4b5fd);
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 
    0 5px 20px rgba(139, 92, 246, 0.5),
    0 0 30px rgba(139, 92, 246, 0.35);
}

/* ========================================
   INSTRUMENT SELECTOR BAR (TOP CENTER)
======================================== */
.instrument-selector-bar {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 1rem 2rem;
  margin: 2rem auto 1.5rem;
  max-width: fit-content;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1),
              0 0 40px rgba(255, 110, 199, 0.1);
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: center;
}

.instrument-selector {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.instrument-btn {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border: 2px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 2rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Background icon buttons */
.instrument-btn.has-bg-icon,
.instrument-btn.has-bg-icon:hover,
.instrument-btn.has-bg-icon.active {
  background-color: #ffffff !important;
  background-image: var(--bg-icon-url) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

.instrument-btn.has-bg-icon::before {
  display: none;
}

.instrument-btn.has-bg-icon:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 30px rgba(255, 255, 255, 0.1);
}

.instrument-btn.has-bg-icon.active {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 40px var(--inst-color);
}

/* Dark theme for background icon buttons */
[data-theme="dark"] .instrument-btn.has-bg-icon,
[data-theme="dark"] .instrument-btn.has-bg-icon:hover,
[data-theme="dark"] .instrument-btn.has-bg-icon.active {
  background-color: #2d2d2d !important;
}

[data-theme="dark"] .instrument-btn.has-bg-icon:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .instrument-btn.has-bg-icon.active {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 40px var(--inst-color);
}

/* TUTTI INTEGRATION */
.instrument-btn[data-instrument="tutti"] {
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body:not(.focus-mode) .instrument-btn[data-instrument="tutti"] {
  display: none;
}

/* Emoji icon buttons */
.instrument-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--inst-color), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.instrument-btn:hover {
  transform: translateY(-5px) scale(1.05);
  border-color: var(--inst-color);
  box-shadow: 0 8px 25px rgba(255, 110, 199, 0.3), 0 0 30px var(--inst-color);
}

.instrument-btn:hover::before {
  opacity: 0.2;
}

.instrument-btn.active {
  background: linear-gradient(135deg, var(--inst-color), var(--bg-secondary));
  border-color: var(--inst-color);
  box-shadow: 0 6px 20px var(--inst-color), 0 0 40px var(--inst-color);
  transform: translateY(-3px);
}

.instrument-btn.active::before {
  opacity: 0.3;
}

/* ========================================
   NOTATION VIEWER CONTAINER
======================================== */
.notation-viewer-container {
  position: relative;
  background: white !important;
  border: 2px solid var(--border-color);
  border-radius: 20px;
  margin: 0 2rem 140px;
  min-height: calc(100vh - 350px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

[data-theme="dark"] .notation-viewer-container {
  background: white !important;
  border-color: rgba(200, 200, 200, 0.3);
}

.notation-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  justify-content: center;
  padding-left: 1.5rem;
  flex-wrap: wrap;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-right: 0.75rem;
  margin-right: 0.75rem;
  border-right: 1.5px solid rgba(139, 92, 246, 0.2);
}

.action-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.control-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.control-btn:hover {
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.control-btn:hover::before {
  opacity: 0.3;
}

.control-btn:hover i {
  color: white;
  position: relative;
  z-index: 1;
}

.zoom-slider {
  width: 90px;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, 
    rgba(139, 92, 246, 0.18) 0%,
    rgba(139, 92, 246, 0.28) 100%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.4),
              0 0 0 2.5px rgba(255, 255, 255, 0.95);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.zoom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 12px rgba(139, 92, 246, 0.6),
              0 0 0 3px rgba(255, 255, 255, 1);
}

.notation-display {
  padding: 0;
  overflow: auto;
  max-height: calc(100vh - 380px);
  flex: 1;
  width: 100%;
}

/* Light theme for notation controls */


[data-theme="light"] body.focus-mode .notation-viewer-container {
  background: #fafafa !important;
}

/* ========================================
   ORCHESTRA FLOATING MENU - ISOLATED STYLES
======================================== */
.orchestra-floating-menu {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 1500;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

/* Floating menu toggle button */
.orchestra-menu-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: linear-gradient(135deg,
    #8b5cf6 0%,
    #7c3aed 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 
    0 8px 32px rgba(139, 92, 246, 0.5),
    0 2px 8px rgba(139, 92, 246, 0.3);
  backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 901;
  overflow: visible;
}

.orchestra-menu-toggle-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.25), transparent 50%, rgba(0, 0, 0, 0.1));
  pointer-events: none;
}

.orchestra-menu-toggle-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.5), rgba(139, 92, 246, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.7;
}

.orchestra-menu-toggle-btn i {
  font-size: 1.3rem;
  color: white;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}

.orchestra-menu-toggle-btn:hover {
  transform: scale(1.1) translateX(-6px);
  box-shadow: 
    0 12px 40px rgba(139, 92, 246, 0.7),
    0 4px 12px rgba(139, 92, 246, 0.4),
    0 0 60px rgba(139, 92, 246, 0.3);
}

.orchestra-menu-toggle-btn:active {
  transform: scale(1.02) translateX(-2px);
}

.orchestra-menu-toggle-btn.active {
  background: linear-gradient(135deg,
    rgba(167, 139, 250, 0.98) 0%,
    rgba(139, 92, 246, 0.98) 100%);
  animation: pulse-menu 2s ease-in-out infinite;
}

.orchestra-menu-toggle-btn.active i {
  transform: rotate(90deg);
}

@keyframes pulse-menu {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.5), 0 2px 8px rgba(139, 92, 246, 0.3);
  }
  50% {
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.7), 0 4px 12px rgba(139, 92, 246, 0.5);
  }
}

/* Floating buttons container - Radial Expansion */
.orchestra-floating-buttons {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 500px;
  pointer-events: none;
}

.orchestra-floating-buttons > button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Radial positions when expanded */
.orchestra-floating-buttons.open > button {
  opacity: 1;
  pointer-events: all;
}

/* Position buttons in a vertical arc to the left */
.orchestra-floating-buttons.open > button:nth-child(1) {
  transform: translate(calc(-50% - 0px), calc(-50% - 110px)) scale(1);
  transition-delay: 0.05s;
}

.orchestra-floating-buttons.open > button:nth-child(2) {
  transform: translate(calc(-50% - 20px), calc(-50% - 220px)) scale(1);
  transition-delay: 0.1s;
}

.orchestra-floating-buttons.open > button:nth-child(3) {
  transform: translate(calc(-50% - 0px), calc(-50% + 110px)) scale(1);
  transition-delay: 0.15s;
}

.orchestra-floating-buttons.open > button:nth-child(4) {
  transform: translate(calc(-50% - 20px), calc(-50% + 220px)) scale(1);
  transition-delay: 0.2s;
}

/* Auto-collapse animation */
.orchestra-floating-buttons.collapsing > button {
  transition: all 0.4s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}

/* Base button styling for all orchestra floating buttons */
.orchestra-theme-btn,
.orchestra-practice-btn,
.orchestra-mixer-btn,
.orchestra-language-btn {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  border-radius: 22px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: visible;
}

.orchestra-theme-btn i,
.orchestra-practice-btn i,
.orchestra-mixer-btn i {
  font-size: 1.5rem;
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.orchestra-theme-btn::before,
.orchestra-practice-btn::before,
.orchestra-language-btn::before,
.orchestra-mixer-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(to bottom,
    rgba(255, 255, 255, 0.25),
    transparent 50%,
    rgba(0, 0, 0, 0.1));
  pointer-events: none;
  z-index: 1;
}

.orchestra-theme-btn::after,
.orchestra-practice-btn::after,
.orchestra-mixer-btn::after,
.orchestra-language-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  padding: 2px;
  background: transparent;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.7;
  z-index: 0;
}

.orchestra-theme-btn:hover,
.orchestra-practice-btn:hover,
.orchestra-mixer-btn:hover,
.orchestra-language-btn:hover {
  transform: scale(1.08) translateX(-6px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.25);
}

.orchestra-theme-btn:hover::after,
.orchestra-practice-btn:hover::after,
.orchestra-mixer-btn:hover::after,
.orchestra-language-btn:hover::after {
  opacity: 1;
}

.orchestra-theme-btn:active,
.orchestra-practice-btn:active,
.orchestra-mixer-btn:active,
.orchestra-language-btn:active {
  transform: scale(0.98) translateX(-3px);
}

/* Theme Toggle Button */
.orchestra-theme-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: white;
  box-shadow: 
    0 8px 32px rgba(245, 158, 11, 0.5),
    0 2px 8px rgba(245, 158, 11, 0.3);
}

.orchestra-theme-btn i {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.orchestra-theme-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.25), transparent 50%, rgba(0, 0, 0, 0.1));
  pointer-events: none;
}

.orchestra-theme-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.5), rgba(245, 158, 11, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.7;
}

.orchestra-theme-btn:hover {
  transform: scale(1.1) translateX(-6px) rotate(-5deg);
  box-shadow: 
    0 12px 40px rgba(245, 158, 11, 0.7),
    0 4px 12px rgba(245, 158, 11, 0.4),
    0 0 60px rgba(245, 158, 11, 0.3);
}

.orchestra-theme-btn:hover::after {
  opacity: 1;
}

.orchestra-theme-btn .fa-moon {
  display: none;
}

.orchestra-theme-btn .fa-sun {
  display: block;
  animation: orchestra-rotate-sun 20s linear infinite;
}

@keyframes orchestra-rotate-sun {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

[data-theme="light"] .orchestra-theme-btn {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  box-shadow: 
    0 8px 32px rgba(99, 102, 241, 0.5),
    0 2px 8px rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .orchestra-theme-btn::after {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.6), rgba(99, 102, 241, 0.6));
}

[data-theme="light"] .orchestra-theme-btn:hover {
  box-shadow: 
    0 12px 40px rgba(99, 102, 241, 0.7),
    0 4px 12px rgba(99, 102, 241, 0.4),
    0 0 60px rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .orchestra-theme-btn .fa-moon {
  display: block;
  animation: orchestra-float-moon 3s ease-in-out infinite;
}

[data-theme="light"] .orchestra-theme-btn .fa-sun {
  display: none;
}

@keyframes orchestra-float-moon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Language Button */
.orchestra-language-btn {
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.1);
}

.orchestra-language-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(0, 0, 0, 0.05));
  pointer-events: none;
}

.orchestra-language-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(156, 163, 175, 0.4), rgba(209, 213, 219, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
}

.orchestra-language-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #e5e7eb 100%);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.25),
    0 4px 12px rgba(0, 0, 0, 0.15);
}

.orchestra-language-btn .flag-icon {
  width: 38px;
  height: 38px;
  display: none;
  position: relative;
  z-index: 3;
  border-radius: 4px;
  pointer-events: none;
}

.orchestra-language-btn .flag-icon[style*="display: block"] {
  display: block !important;
}

/* Practice Button */
.orchestra-practice-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 
    0 8px 24px rgba(239, 68, 68, 0.4),
    0 2px 6px rgba(239, 68, 68, 0.25);
}

.orchestra-practice-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.25), transparent 50%, rgba(0, 0, 0, 0.1));
  pointer-events: none;
}

.orchestra-practice-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.4), rgba(239, 68, 68, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
}

.orchestra-practice-btn:hover {
  box-shadow: 
    0 12px 36px rgba(239, 68, 68, 0.6),
    0 4px 10px rgba(239, 68, 68, 0.35),
    0 0 50px rgba(239, 68, 68, 0.25);
}

.orchestra-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #6b7280, #9ca3af);
  color: white;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 
    0 4px 15px rgba(107, 114, 128, 0.5),
    0 0 0 2px var(--bg-primary);
  border: 2px solid rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 10;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  white-space: nowrap;
  overflow: visible;
  transition: all 0.3s ease;
}

.orchestra-badge.badge-active {
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 
    0 4px 15px rgba(16, 185, 129, 0.6),
    0 0 0 3px var(--bg-primary);
  animation: orchestra-badge-pulse 1.5s ease-in-out infinite;
}

.orchestra-practice-btn.practice-active .orchestra-badge {
  background: linear-gradient(135deg, #ef4444, #f87171);
  box-shadow: 
    0 4px 15px rgba(239, 68, 68, 0.6),
    0 0 0 3px var(--bg-primary);
  animation: orchestra-badge-pulse 1.5s ease-in-out infinite;
}

@keyframes orchestra-badge-pulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 
      0 4px 15px rgba(239, 68, 68, 0.6),
      0 0 0 3px var(--bg-primary);
  }
  50% { 
    transform: scale(1.08);
    box-shadow: 
      0 6px 20px rgba(239, 68, 68, 0.8),
      0 0 0 3px var(--bg-primary),
      0 0 30px rgba(239, 68, 68, 0.4);
  }
}

/* Mixer Button */
.orchestra-mixer-btn {
  background: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
  color: white;
  box-shadow: 
    0 8px 32px rgba(236, 72, 153, 0.5),
    0 2px 8px rgba(236, 72, 153, 0.3);
}

.orchestra-mixer-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.25), transparent 50%, rgba(0, 0, 0, 0.1));
  pointer-events: none;
}

.orchestra-mixer-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.5), rgba(251, 146, 60, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.7;
}

.orchestra-mixer-btn:hover {
  box-shadow: 
    0 12px 40px rgba(236, 72, 153, 0.7),
    0 4px 12px rgba(236, 72, 153, 0.4),
    0 0 60px rgba(236, 72, 153, 0.3);
}

/* ========================================
   FLOATING STUDIO MODE TOGGLE
======================================== */
.studio-mode-toggle-container {
  position: fixed;
  bottom: 8rem;
  right: 1.5rem;
  z-index: 2000;
  animation: floatIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.studio-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(250, 250, 255, 0.98) 100%);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.studio-toggle-label:hover {
  transform: scale(1.05);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 
    0 12px 40px rgba(139, 92, 246, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}

.studio-label-text {
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
  transition: color 0.3s ease;
}

.studio-toggle-input {
  display: none;
}

.studio-toggle-slider {
  position: relative;
  width: 54px;
  height: 28px;
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  border-radius: 50px;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.15),
    0 1px 2px rgba(255, 255, 255, 0.8);
}

.studio-toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

.studio-toggle-slider::after {
  content: '○';
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  font-size: 14px;
  color: #9ca3af;
  transition: all 0.3s ease;
}

/* Checked state */
.studio-toggle-input:checked + .studio-toggle-slider {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(139, 92, 246, 0.4);
}

.studio-toggle-input:checked + .studio-toggle-slider::before {
  left: 29px;
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 12px rgba(139, 92, 246, 0.6);
}

.studio-toggle-input:checked + .studio-toggle-slider::after {
  content: '●';
  left: auto;
  right: 8px;
  color: #e9d5ff;
}

.studio-toggle-input:checked ~ .studio-label-text {
  color: #8b5cf6;
}

/* Dark theme */
[data-theme="dark"] .studio-toggle-label {
  background: linear-gradient(135deg,
    rgba(30, 30, 40, 0.95) 0%,
    rgba(25, 25, 35, 0.98) 100%);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

[data-theme="dark"] .studio-toggle-label:hover {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 
    0 12px 40px rgba(139, 92, 246, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

[data-theme="dark"] .studio-label-text {
  color: #9ca3af;
}

[data-theme="dark"] .studio-toggle-input:checked ~ .studio-label-text {
  color: #a78bfa;
}

/* Extra small screens */
@media (max-width: 480px) {
  .instrument-selector-bar {
    padding: 0.6rem 0.8rem;
    gap: 0.8rem;
  }

  .instrument-selector {
    gap: 0.5rem;
  }

  .instrument-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1.3rem;
  }

  body.focus-mode .instrument-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.2rem;
  }
}

/* Mobile positioning */
@media (max-width: 768px) {
  .studio-mode-toggle-container {
    top: auto;
    bottom: 10rem;
    right: 1rem;
  }
  
  .studio-toggle-label {
    padding: 0.6rem 1rem;
    gap: 0.6rem;
  }
  
  .studio-label-text {
    font-size: 0.75rem;
  }
  
  .studio-toggle-slider {
    width: 48px;
    height: 24px;
  }
  
  .studio-toggle-slider::before {
    width: 18px;
    height: 18px;
  }
  
  .studio-toggle-input:checked + .studio-toggle-slider::before {
    left: 26px;
  }

  /* Instrument selector responsive adjustments */
  .instrument-selector-bar {
    padding: 0.8rem 1rem;
    margin: 1.5rem auto 1rem;
    gap: 1rem;
    max-width: 95vw;
  }

  .instrument-selector {
    gap: 0.6rem;
  }

  .instrument-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.5rem;
  }
}

/* ========================================
   FOCUS MODE STYLES
======================================== */

@keyframes focusPulse {
  0%, 100% { 
    opacity: 0.6;
    transform: scale(0.95);
  }
  50% { 
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes focusRotate {
  from { 
    transform: rotate(0deg);
  }
  to { 
    transform: rotate(360deg);
  }
}

@keyframes focusActiveGlow {
  0%, 100% { 
    opacity: 0.7;
    filter: blur(12px);
  }
  50% { 
    opacity: 1;
    filter: blur(16px);
  }
}

@keyframes iconBounce {
  0%, 100% { 
    transform: translateY(0px);
  }
  50% { 
    transform: translateY(-3px);
  }
}

@keyframes textPulse {
  0% { 
    transform: scale(1);
    letter-spacing: 0.15em;
  }
  50% { 
    transform: scale(1.1);
    letter-spacing: 0.2em;
  }
  100% { 
    transform: scale(1);
    letter-spacing: 0.15em;
  }
}

@keyframes checkmarkPop {
  0% { 
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% { 
    transform: scale(1.3) rotate(5deg);
  }
  100% { 
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* When body has focus-mode class, hide unnecessary elements */
body.focus-mode .nav-container,
body.focus-mode .back-button,
body.focus-mode .song-info,
body.focus-mode footer {
  display: none !important;
}

/* Adjust layout in focus mode - FULL SCREEN WITH SIDEBAR */
body.focus-mode {
  overflow: hidden !important;
  height: 100vh;
  position: fixed;
  width: 100%;
}

body.focus-mode .player-container {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Flexbox handles spacing automatically - no manual margins needed */

body.focus-mode .instrument-selector-bar {
  position: fixed;
  top: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  flex-shrink: 0;
  z-index: 1000;
  max-width: fit-content;
  padding: 0.8rem 1.5rem 1rem 1.5rem;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(250, 250, 255, 0.98) 100%);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(139, 92, 246, 0.25);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
              0 0 0 1px rgba(255, 255, 255, 0.8) inset;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body.focus-mode .instrument-selector-bar.hidden {
  transform: translateX(-50%) translateY(-120%);
}

/* Control Bar Toggle Button - Fancy Floating Eye */
.control-bar-toggle {
  display: none;
}

body.focus-mode .control-bar-toggle {
  display: flex;
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.98) 0%,
    rgba(99, 62, 226, 0.98) 100%);
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  z-index: 1001;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 
    0 8px 32px rgba(139, 92, 246, 0.5),
    0 0 0 0 rgba(139, 92, 246, 0.5),
    inset 0 -2px 8px rgba(0, 0, 0, 0.2);
  animation: controlBarPulse 2.5s ease-in-out infinite;
}

/* When menu is hidden, add bounce animation to draw attention */
body.focus-mode .control-bar-toggle.bar-hidden {
  animation: controlBarPulse 2.5s ease-in-out infinite, bounceInvite 2s ease-in-out infinite;
}

/* When menu is revealed, move to top-right and become close button */
body.focus-mode .control-bar-toggle:not(.bar-hidden) {
  left: auto;
  right: 1rem;
  transform: translateX(0);
  animation: controlBarPulse 2.5s ease-in-out infinite;
}

body.focus-mode .control-bar-toggle::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent 70%);
  opacity: 0;
  animation: ripple 2.5s ease-in-out infinite;
}

body.focus-mode .control-bar-toggle:hover {
  box-shadow: 
    0 12px 40px rgba(139, 92, 246, 0.7),
    0 0 0 4px rgba(139, 92, 246, 0.3),
    inset 0 -2px 8px rgba(0, 0, 0, 0.2);
  animation: none;
}

/* Hover when menu hidden (centered) */
body.focus-mode .control-bar-toggle.bar-hidden:hover {
  transform: translateX(-50%) scale(1.15);
}

/* Hover when menu revealed (right side) */
body.focus-mode .control-bar-toggle:not(.bar-hidden):hover {
  transform: scale(1.15) rotate(90deg);
}

body.focus-mode .control-bar-toggle i {
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* When menu hidden (.bar-hidden), show chevron down - default state */
body.focus-mode .control-bar-toggle.bar-hidden i {
  transform: rotate(180deg);
}

/* When menu visible (not .bar-hidden), change to X icon */
body.focus-mode .control-bar-toggle:not(.bar-hidden) i {
  font-size: 1.3rem;
}

body.focus-mode .control-bar-toggle:not(.bar-hidden) i::after {
  content: '\f00d';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

body.focus-mode .control-bar-toggle:not(.bar-hidden) i::before {
  content: '';
  opacity: 0;
}

@keyframes controlBarPulse {
  0%, 100% {
    box-shadow: 
      0 8px 32px rgba(139, 92, 246, 0.5),
      0 0 0 0 rgba(139, 92, 246, 0.5),
      inset 0 -2px 8px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 
      0 12px 40px rgba(139, 92, 246, 0.6),
      0 0 0 12px rgba(139, 92, 246, 0),
      inset 0 -2px 8px rgba(0, 0, 0, 0.2);
  }
}

@keyframes ripple {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

@keyframes bounceInvite {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

body.focus-mode .control-bar-toggle:hover {
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 1) 0%,
    rgba(99, 62, 226, 1) 100%);
  transform: scale(1.15);
  box-shadow: 
    0 12px 32px rgba(139, 92, 246, 0.6),
    0 0 0 12px rgba(139, 92, 246, 0);
}

body.focus-mode .control-bar-toggle i {
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body.focus-mode .control-bar-toggle.bar-hidden i {
  transform: rotate(180deg);
}

[data-theme="dark"] body.focus-mode .control-bar-toggle {
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.9) 0%,
    rgba(99, 62, 226, 0.9) 100%);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Show control bar toggle only in focus mode */
body:not(.focus-mode) .control-bar-toggle {
  display: none !important;
}

[data-theme="dark"] body.focus-mode .instrument-selector-bar {
  background: linear-gradient(135deg,
    rgba(30, 30, 40, 0.98) 0%,
    rgba(25, 25, 35, 0.98) 100%);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

body.focus-mode .instrument-selector {
  padding-right: 1.5rem;
  margin-right: 1.5rem;
  border-right: 2px solid rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] body.focus-mode .instrument-selector {
  border-right-color: rgba(139, 92, 246, 0.3);
}





body.focus-mode .zoom-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 0;
  gap: 0.6rem;
}

[data-theme="dark"] body.focus-mode .zoom-controls {
  border-right-color: rgba(139, 92, 246, 0.3);
}

body.focus-mode .zoom-slider {
  width: 90px;
  transform: none;
  margin: 0;
}

body.focus-mode .control-btn {
  width: 34px;
  height: 34px;
  font-size: 0.9rem;
}

body.focus-mode .content-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  z-index: 100;
}

/* Sidebar stays on the left in focus mode */
body.focus-mode #toolsSidebar {
  position: relative;
  width: 400px;
  min-width: 400px;
  max-width: 400px;
  height: 100vh;
  border-radius: 0;
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
}

body.focus-mode #toolsSidebar.open {
  display: flex;
}

/* Notation viewer takes remaining space */
body.focus-mode .notation-viewer {
  position: relative;
  flex: 1;
  width: auto !important;
  height: 100vh !important;
  max-height: 100vh !important;
  min-height: 100vh !important;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: white !important;
  overflow: auto;
}

[data-theme="dark"] body.focus-mode .notation-viewer {
  background: white !important;
}

body.focus-mode .notation-display {
  flex: 1 !important;
  width: 100% !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
}

body.focus-mode .notation-display > div {
  width: 100% !important;
  height: auto !important;
}

body.focus-mode .notation-display svg {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}

body.focus-mode .notation-container {
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh !important;
  overflow-y: auto !important;
}

/* Optimize floating menu position in focus mode - move to right side */
body.focus-mode .orchestra-floating-menu {
  right: 1.5rem;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  gap: 0;
  align-items: center;
  justify-content: center;
}

body.focus-mode .orchestra-theme-btn,
body.focus-mode .orchestra-practice-btn,
body.focus-mode .orchestra-mixer-btn,
body.focus-mode .orchestra-language-btn {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.15);
}

body.focus-mode .orchestra-theme-btn i,
body.focus-mode .orchestra-practice-btn i,
body.focus-mode .orchestra-mixer-btn i {
  font-size: 1.5rem;
}

body.focus-mode .orchestra-language-btn .flag-icon {
  width: 38px;
  height: 38px;
}

body.focus-mode .orchestra-theme-btn:hover,
body.focus-mode .orchestra-practice-btn:hover,
body.focus-mode .orchestra-mixer-btn:hover,
body.focus-mode .orchestra-language-btn:hover {
  transform: scale(1.06) translateX(-2px);
  box-shadow: 
    0 12px 36px rgba(0, 0, 0, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Playback bar in focus mode - keep same style as normal mode */


/* Make sidebar more accessible in focus mode - flexbox layout */

/* No need for margin adjustments - flexbox handles it */

/* Smooth transitions for focus mode - exclude notation elements */
body.focus-mode * {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Disable transitions for notation viewer elements for instant highlight */
body.focus-mode .notation-viewer *,
body.focus-mode .notation-viewer svg *,
body.focus-mode #notationDisplay *,
body.focus-mode .notation-container * {
  transition: none !important;
}

/* Mobile optimizations for focus mode */
@media (max-width: 768px) {
  body.focus-mode .instrument-selector-bar {
    flex-direction: column;
    padding: 0.6rem 0.8rem;
    gap: 0.8rem;
    top: 0.5rem;
    max-width: 95vw;
  }
  
  body.focus-mode .instrument-selector {
    padding-right: 0;
    margin-right: 0;
    border-right: none;
    border-bottom: 2px solid rgba(139, 92, 246, 0.2);
    padding-bottom: 0.8rem;
    margin-bottom: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  body.focus-mode .instrument-btn {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    font-size: 1.4rem;
  }
  
  [data-theme="dark"] body.focus-mode .instrument-selector {
    border-bottom-color: rgba(139, 92, 246, 0.3);
  }
  
 
  
  body.focus-mode .zoom-controls {
    gap: 0.4rem;
  }
  
  body.focus-mode .control-btn {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  
  body.focus-mode .zoom-slider {
    width: 70px;
  }
  
  body.focus-mode .notation-viewer {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body.focus-mode .notation-viewer-container {
    margin: 0;
    padding-top: 160px !important;
    padding-bottom: 90px;
  }
  
  body.focus-mode .orchestra-floating-menu {
    right: 0.5rem;
    gap: 0;
  }

  body.focus-mode .orchestra-floating-buttons.open > button:nth-child(1) {
    transform: translate(calc(-50% - 0px), calc(-50% - 75px)) scale(1);
  }

  body.focus-mode .orchestra-floating-buttons.open > button:nth-child(2) {
    transform: translate(calc(-50% - 15px), calc(-50% - 150px)) scale(1);
  }

  body.focus-mode .orchestra-floating-buttons.open > button:nth-child(3) {
    transform: translate(calc(-50% - 0px), calc(-50% + 75px)) scale(1);
  }

  body.focus-mode .orchestra-floating-buttons.open > button:nth-child(4) {
    transform: translate(calc(-50% - 15px), calc(-50% + 150px)) scale(1);
  }
  
  body.focus-mode .orchestra-theme-btn,
  body.focus-mode .orchestra-practice-btn,
  body.focus-mode .orchestra-mixer-btn,
  body.focus-mode .orchestra-language-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  body.focus-mode .orchestra-language-btn .flag-icon {
    width: 30px;
    height: 30px;
  }

}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  body.focus-mode .instrument-selector-bar {
    padding: 0.7rem 1.2rem 0.9rem 1.2rem;
    gap: 1.2rem;
  }
  
 
  
  body.focus-mode .control-btn {
    width: 34px;
    height: 34px;
  }
  
  body.focus-mode .zoom-slider {
    width: 80px;
  }
  
  body.focus-mode .notation-viewer-container {
    padding-top: 100px !important;
    padding-bottom: 100px;
  }
}

/* ========================================
   MOROCCO ANTHEM SIDEBAR (#toolsSidebar)
======================================== */
#toolsSidebar {
  width: 0;
  min-width: 0;
  max-width: 400px;
  overflow: hidden;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  box-shadow: none;
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
  transition: all 0.3s ease;
  flex-direction: column;
  display: none;
  flex-shrink: 0;
}

#toolsSidebar.open { 
  display: flex;
  width: 400px;
  box-shadow: 10px 0 30px rgba(0,0,0,0.25);
}

#toolsSidebar .sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  border-top-right-radius: 16px;
  flex-shrink: 0;
  position: relative;
  gap: 1rem;
}

#toolsSidebar .sidebar-tabs { display: flex; gap: 0.5rem; background: var(--bg-tertiary); padding: 0.25rem; border-radius: 12px; flex: 1; }
#toolsSidebar .sidebar-tab { 
  flex: 1;
  display: inline-flex; 
  align-items: center; 
  gap: 0.4rem; 
  padding: 0.75rem 1rem; 
  border-radius: 10px; 
  border: none;
  background: transparent; 
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 0.875rem;
}
#toolsSidebar .sidebar-tab:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
}
#toolsSidebar .sidebar-tab.active { 
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}
#toolsSidebar .close-btn { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  width: 36px; 
  height: 36px; 
  border-radius: 10px; 
  border: 1px solid var(--border-color); 
  background: var(--bg-card); 
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
#toolsSidebar .close-btn:hover {
  background: var(--danger-bg);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

#toolsSidebar .sidebar-content { flex: 1; display: grid; overflow: hidden; }
#toolsSidebar .tab-panel { height: 100%; overflow-y: auto; overflow-x: hidden; padding: 1rem 1.5rem; display: none; position: relative; }
#toolsSidebar .tab-panel.active { display: block; }
#toolsSidebar .tab-panel::-webkit-scrollbar { width: 6px; }

/* Practice Mode Overlay */
.practice-mode-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 15, 23, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.practice-mode-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.practice-mode-overlay .overlay-content {
  text-align: center;
  padding: 2rem;
  max-width: 300px;
}

.practice-mode-overlay .overlay-content i {
  font-size: 3rem;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.practice-mode-overlay .overlay-content h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.practice-mode-overlay .overlay-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.practice-mode-overlay .btn-primary {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.practice-mode-overlay .btn-primary:hover {
  background: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.practice-mode-overlay .btn-primary i {
  font-size: 1rem;
  margin: 0;
}

/* Light Theme for Overlay */
[data-theme="light"] .practice-mode-overlay {
  background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .practice-mode-overlay .overlay-content h3 {
  color: #1a1a1a;
}

[data-theme="light"] .practice-mode-overlay .overlay-content p {
  color: #666666;
}

/* Light Theme Adjustments for Sidebar */
[data-theme="light"] #toolsSidebar {
  background: #ffffff;
  border-right-color: rgba(0, 0, 0, 0.15);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] #toolsSidebar .sidebar-header {
  background: #f8f8f8;
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] #toolsSidebar .sidebar-tabs {
  background: #f0f0f0;
}

[data-theme="light"] #toolsSidebar .sidebar-tab {
  color: #4a4a4a;
}

[data-theme="light"] #toolsSidebar .sidebar-tab:hover {
  color: #1a1a1a;
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] #toolsSidebar .sidebar-tab.active {
  background: #8b5cf6;
  color: #ffffff;
}

[data-theme="light"] #toolsSidebar .close-btn {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #4a4a4a;
}

[data-theme="light"] #toolsSidebar .close-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

/* Light Mode: Practice Content */
[data-theme="light"] .practice-section {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
  border: 2px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .practice-section:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .practice-label {
  color: #1a1a1a;
  text-shadow: none;
}

[data-theme="light"] .practice-label i {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .tempo-btn {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
  border: 2px solid rgba(139, 92, 246, 0.3);
  color: #1a1a1a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .tempo-btn:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.1));
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .practice-slider {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.2));
}

[data-theme="light"] .practice-slider::-webkit-slider-thumb {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4), 0 0 0 4px rgba(139, 92, 246, 0.1);
}

[data-theme="light"] .preset-btn {
  background: rgba(139, 92, 246, 0.08);
  border: 2px solid rgba(139, 92, 246, 0.2);
  color: #1a1a1a;
}

[data-theme="light"] .preset-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .preset-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #ffffff;
  border-color: #8b5cf6;
}

[data-theme="light"] .mode-btn {
  background: rgba(139, 92, 246, 0.05);
  border: 2px solid rgba(139, 92, 246, 0.2);
  color: #1a1a1a;
}

[data-theme="light"] .mode-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .mode-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #ffffff;
  border-color: #8b5cf6;
}

[data-theme="light"] .mode-hint {
  background: rgba(59, 130, 246, 0.08);
  border-left-color: #3b82f6;
  color: #1a1a1a;
}

[data-theme="light"] .loop-btn {
  background: rgba(139, 92, 246, 0.08);
  border: 2px solid rgba(139, 92, 246, 0.2);
  color: #1a1a1a;
}

[data-theme="light"] .loop-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

[data-theme="light"] .loop-btn.active {
  background: linear-gradient(135deg, #10b981, #34d399);
  border-color: #10b981;
  color: #ffffff;
}

[data-theme="light"] .toggle-btn,
[data-theme="light"] .practice-mode-toggle-btn {
  background: rgba(139, 92, 246, 0.08);
  border: 2px solid rgba(139, 92, 246, 0.2);
  color: #1a1a1a;
  font-weight: 600;
}

[data-theme="light"] .toggle-btn:hover,
[data-theme="light"] .practice-mode-toggle-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #1a1a1a;
}

[data-theme="light"] .toggle-btn.active,
[data-theme="light"] .practice-mode-toggle-btn.active {
  background: linear-gradient(135deg, #10b981, #34d399);
  border-color: #10b981;
  color: #ffffff;
  font-weight: 700;
}
/******************************************
 ORCHESTRA STUDIO STYLES
 Matching Vivace Music theme with dark/light modes
*******************************************/

/* Ensure body inherits properly */
body {
  min-height: 100vh;
}

/* Override main.css section animation - make sections visible immediately */
section.hero-orchestra,
section.songs-library,
section.piece-info {
  opacity: 1 !important;
  transform: none !important;
  max-width: none !important;
}

/* Ensure player page elements are visible */
.player-page .player-container,
.player-page .mixer-panel,
.player-page .notation-viewer,
.player-page .playback-panel,
.player-page section.piece-info {
  opacity: 1 !important;
  transform: none !important;
}

/* ========================================
   HERO SECTION
======================================== */
.hero-orchestra {
  padding: 140px 2rem 80px;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 60vh;
}

.hero-orchestra::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 110, 199, 0.15) 0%,
    rgba(255, 179, 71, 0.1) 30%,
    transparent 70%
  );
  animation: rotateGlow 25s ease-in-out infinite;
}

@keyframes rotateGlow {
  0%, 100% { 
    transform: rotate(0deg) scale(1);
    opacity: 0.6;
  }
  50% { 
    transform: rotate(180deg) scale(1.1);
    opacity: 0.8;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero-orchestra h1 {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  display: inline-block;
  color: #ff6ec7; /* Fallback for browsers that don't support background-clip */
}

.hero-orchestra h1 i {
  margin-right: 1rem;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #ff6ec7; /* Fallback */
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.hero-features {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.feature-tag {
  background: var(--bg-tertiary);
  backdrop-filter: blur(10px);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.feature-tag:hover {
  background: var(--hover-bg);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow-glow);
  border-color: rgba(255, 110, 199, 0.4);
}

.feature-tag:hover i {
  animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.feature-tag i {
  color: #ff6ec7;
  font-size: 1.1rem;
}

/* ========================================
   SONGS LIBRARY
======================================== */
.songs-library {
  padding: 80px 2rem;
  background: var(--bg-primary);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeInDown 0.8s ease-out;
}

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

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: #ff6ec7;
  display: inline-block;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.song-card {
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 20px var(--shadow-color);
}

.song-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 12px 40px rgba(255, 110, 199, 0.5), 
              0 8px 30px var(--shadow-glow), 
              0 4px 20px var(--shadow-color);
  background: var(--bg-card-hover);
  border-color: rgba(255, 110, 199, 0.5);
}

.song-thumbnail {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.song-thumbnail i {
  font-size: 5rem;
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.song-card:hover .song-thumbnail i {
  transform: scale(1.2) rotate(10deg);
}

.song-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 1rem;
}

.instrument-count {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.song-info {
  padding: 1.5rem;
}

.song-info h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.song-title-ar {
  font-size: 1.1rem;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
  direction: rtl;
}

.song-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.song-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.song-meta i {
  color: #ff6ec7;
  width: 16px;
}

.song-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.tag.genre {
  background: rgba(255, 110, 199, 0.1);
  color: #ff6ec7;
}

.tag.difficulty {
  background: rgba(255, 179, 71, 0.1);
  color: #ffb347;
}

.btn-play {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-play:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(255, 110, 199, 0.6), 
              0 0 20px rgba(255, 179, 71, 0.4);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 6px 30px rgba(255, 110, 199, 0.6), 
                0 0 20px rgba(255, 179, 71, 0.4);
  }
  50% {
    box-shadow: 0 8px 40px rgba(255, 110, 199, 0.8), 
                0 0 30px rgba(255, 179, 71, 0.6);
  }
}

.btn-play i {
  font-size: 1.2rem;
}

/* ========================================
   PLAYER PAGE
======================================== */
.player-page {
  background: var(--bg-primary);
  min-height: 100vh;
}

/* ========================================
   PLAYER CONTAINER
======================================== */
.player-container {
  padding: 2rem;
  max-width: 1800px;
  margin: 0 auto;
}

/* Content container for sidebar + notation viewer */
.content-container {
  display: flex;
  gap: 0;
  width: 100%;
  align-items: flex-start;
  position: relative;
  min-height: 500px;
}

.player-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  margin-bottom: 1.5rem;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.back-link:hover {
  background: var(--hover-bg);
  transform: translateX(-4px);
}

.song-info-bar {
  flex: 1;
  text-align: center;
}

.song-info-bar h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.3rem 0;
}

.song-info-bar p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

.btn-download {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-download:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(255, 110, 199, 0.5);
}

/* ========================================
   PLAYER MAIN - THREE COLUMN LAYOUT
======================================== */
/* ===== CLEAN PLAYER LAYOUT ===== */
.player-main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  gap: 0;
}

/* Control Bar at Top */
.control-bar {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 15px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  order: 1;
}

.progress-wrapper {
  flex: 1;
  max-width: 600px;
  order: 2;
}

.control-actions {
  order: 3;
  position: absolute;
  right: 1.5rem;
}

.play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(255, 110, 199, 0.4);
  position: relative;
}

.play-btn i {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn .fa-play {
  margin-left: 2px; /* Optical centering for play icon */
}

.play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(255, 110, 199, 0.6);
}

.stop-btn {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.stop-btn:hover {
  background: var(--hover-bg);
  border-color: #ff6ec7;
}

.time-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Poppins', monospace;
}

.time-info .separator {
  color: var(--text-secondary);
}

.progress-wrapper {
  flex: 1;
}

.seek-slider {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-tertiary);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.seek-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(255, 110, 199, 0.5);
  transition: all 0.2s ease;
}

.seek-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.seek-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 10px rgba(255, 110, 199, 0.5);
}

.control-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.notation-layout-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 2px solid var(--border-color);
}

.control-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.control-label i {
  color: #ff6ec7;
}

.measures-input {
  width: 60px;
  padding: 0.5rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  text-align: center;
  transition: all 0.3s ease;
}

.measures-input:hover,
.measures-input:focus {
  border-color: #ff6ec7;
  outline: none;
}

.compact-select {
  padding: 0.7rem 1rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  min-width: 200px;
  transition: all 0.3s ease;
}

.compact-select:hover {
  border-color: #ff6ec7;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  /* Enhanced control button look */
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-tertiary));
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  font-size: 1.2rem;
  position: relative;
  box-shadow: 0 6px 18px var(--shadow-color), inset 0 1px 0 rgba(255,255,255,0.06);
}

.action-btn::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.action-btn:hover {
  background: linear-gradient(180deg, var(--bg-tertiary), var(--bg-secondary));
  border-color: #ff6ec7;
  color: #ff6ec7;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(255, 110, 199, 0.25), 0 6px 16px var(--shadow-color);
}

.action-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px var(--shadow-color) inset;
}

.action-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 110, 199, 0.35), 0 6px 18px var(--shadow-color);
}

.mixer-toggle.active {
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  color: white;
  border-color: transparent;
}

/* Practice Tools — cleaner layered look */
#practiceToggle {
  background: linear-gradient(135deg, #ff5a7a, #ff6b6b);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 32px rgba(255, 91, 122, 0.35);
}

/* Soft circles removed - using .orchestra-practice-btn styling instead */

/* Floating label bubble */
#practiceToggle[data-label]::marker { content: ''; }
#practiceToggle[data-label] span{ pointer-events:none; }
#practiceToggle[data-label]::selection{ background:transparent; }
#practiceToggle[data-label]::part(label){ }
#practiceToggle[data-label]:not(.active)::after {
  content: attr(data-label);
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff7893, #ff6b6b);
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(255, 107, 107, 0.35);
}

#practiceToggle:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(255, 91, 122, 0.45);
}

#practiceToggle.active {
  box-shadow: 0 14px 44px rgba(255, 91, 122, 0.5);
}

@media (max-width: 768px) {
  #practiceToggle[data-label]::after { display: none; }
}

/* Full Width Notation Viewer */
.notation-viewer-main {
  flex: 1;
  min-height: 500px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 15px;
  overflow: hidden;
  position: relative;
}

.notation-display {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 0;
  position: relative; /* For cursor positioning */
}

/* Make sure OSMD renders properly */
.notation-display > div {
  width: 100% !important;
  min-height: 400px;
}

.notation-display svg {
  max-width: 100%;
  height: auto;
}

/* OSMD Cursor styling */
.cursorImg-0 {
  fill: #ff6ec7 !important;
  fill-opacity: 0.4 !important;
}

.cursorImg-1,
.cursorImg-2,
.cursorImg-3 {
  fill: #ff6ec7 !important;
  fill-opacity: 0.3 !important;
}

/* View Tabs (Desktop) */
.view-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  padding: 1rem 2rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
  position: relative;
  bottom: -2px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.tab-btn.active {
  color: #ff6ec7;
  border-bottom-color: #ff6ec7;
}

.tab-btn i {
  font-size: 1.2rem;
}

/* Mobile Tabs */
.mobile-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 2px solid var(--border-color);
  padding: 0.5rem;
  z-index: 1000;
  box-shadow: 0 -4px 20px var(--shadow-color);
}

.mobile-tab {
  flex: 1;
  padding: 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
}

.mobile-tab i {
  font-size: 1.4rem;
}

.mobile-tab.active {
  color: #ff6ec7;
}

.mobile-tab.active i {
  transform: scale(1.2);
}

/* View Panels */
.view-panel {
  display: none;
}

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

/* Notation View */
.notation-view {
  height: calc(100vh - 300px);
  display: flex;
  flex-direction: column;
}

.notation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 15px;
  margin-bottom: 1.5rem;
}

.instrument-select {
  flex: 1;
  max-width: 300px;
  padding: 0.8rem 1.2rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.instrument-select:hover {
  border-color: #ff6ec7;
}

.notation-actions {
  display: flex;
  gap: 0.8rem;
}

.icon-btn {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.icon-btn:hover {
  background: var(--hover-bg);
  border-color: #ff6ec7;
  color: #ff6ec7;
  transform: translateY(-2px);
}

.notation-container {
  flex: 1;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 15px;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 50px 0;
  position: relative;
  height: 100%;
  scroll-behavior: smooth;
}

body.focus-mode .notation-container {
  overflow-y: auto;
}

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

/* Overlay Controls */
.overlay-controls {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 110, 199, 0.3);
  border-radius: 20px;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.toggle-mixer-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: #ff6ec7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.toggle-mixer-btn:hover {
  background: #ff6ec7;
  color: white;
  transform: scale(1.1);
}

/* Mixer View (Desktop: Drawer) */
.mixer-view {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 60vh;
  background: var(--bg-primary);
  border-top: 3px solid #ff6ec7;
  border-radius: 25px 25px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
  z-index: 90;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mixer-view.active {
  transform: translateY(0);
}

.mixer-content {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Playback View (Mobile) */
.playback-view {
  padding: 2rem;
  padding-bottom: 6rem;
}

/* ========================================
   MIXER PANEL (LEFT) - DEPRECATED
   Note: Using new right-sidebar mixer panel instead
======================================== */
/* Removed - see MIXER PANEL section below */

/* panel-header - deprecated */

.master-controls {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border: 2px solid var(--border-color);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.control-row {
  margin-bottom: 1.5rem;
}

.control-row:last-child {
  margin-bottom: 0;
}

.control-row label {
  display: block;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.volume-control input[type="range"] {
  flex: 1;
}

.volume-control span {
  min-width: 45px;
  text-align: right;
  font-weight: 600;
  color: #ff6ec7;
}

.tempo-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tempo-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.tempo-btn:hover {
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  color: white;
  transform: scale(1.1);
}

.tempo-display {
  flex: 1;
  text-align: center;
  padding: 0.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ff6ec7;
}

.instruments-section {
  margin-top: 1.5rem;
}

.section-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-subheader h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.quick-actions {
  display: flex;
  gap: 0.5rem;
}

.quick-btn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.quick-btn:hover {
  background: var(--hover-bg);
  color: #ff6ec7;
  transform: scale(1.1);
}

.instruments-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.instrument-track {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
}

.instrument-track:hover {
  background: var(--bg-tertiary);
  border-color: rgba(255, 110, 199, 0.3);
  box-shadow: 0 4px 15px rgba(255, 110, 199, 0.1);
  transform: translateY(-2px);
}

.instrument-track.muted,
.mixer-track.muted,
.sub-track.muted {
  opacity: 0.4;
  filter: grayscale(100%) brightness(0.7);
  position: relative;
  border: 2px dashed rgba(100, 100, 100, 0.4);
  background: rgba(0, 0, 0, 0.15);
}

.instrument-track.muted::before,
.mixer-track.muted::before,
.sub-track.muted::before {
  content: 'MUTED';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(150, 150, 150, 0.35);
  letter-spacing: 0.3em;
  pointer-events: none;
  z-index: 200;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.instrument-track.muted::after,
.mixer-track.muted::after,
.sub-track.muted::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 15px,
    rgba(100, 100, 100, 0.1) 15px,
    rgba(100, 100, 100, 0.1) 17px
  );
  pointer-events: none;
  border-radius: 12px;
  z-index: 150;
}

.track-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.instrument-color {
  width: 8px;
  height: 40px;
  border-radius: 4px;
  background: var(--instrument-color, #888);
}

.instrument-info {
  flex: 1;
}

.instrument-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.instrument-name-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--track-icon-bg, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.instrument-name-icon .icon-emoji {
  font-size: 2rem;
  line-height: 1;
}

.instrument-name-icon .icon-image {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: brightness(1.2);
}

[data-theme="light"] .instrument-name-icon .icon-image {
  filter: brightness(0.9);
}

.instrument-family {
  font-size: 0.55rem;
  color: var(--text-tertiary);
  text-transform: capitalize;
}

.track-controls {
  display: flex;
  gap: 0.5rem;
}

.track-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.75rem;
}

.track-btn:hover {
  background: var(--hover-bg);
  color: #ff6ec7;
}

.track-btn.active {
  background: #ff6ec7;
  color: white;
  border-color: #ff6ec7;
}

.track-btn.mute-btn.active {
  background: #666;
  color: white;
  border-color: #666;
  opacity: 0.9;
}

.track-btn.mute-btn.active i::before {
  content: '\f6a9';
}

.track-btn.mute-btn.active:hover {
  background: #555;
  border-color: #555;
}

.track-volume {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.track-volume input[type="range"] {
  flex: 1;
}

.track-volume-value {
  min-width: 40px;
  text-align: right;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ========================================
   NOTATION VIEWER (CENTER)
======================================== */
.notation-viewer {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  height: 600px;
  max-height: 70vh;
  overflow: hidden;
}

.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 1rem;
}

.viewer-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.viewer-header i {
  color: #ff6ec7;
}

.viewer-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.instrument-selector {
  padding: 0.8rem 1.2rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
}

.instrument-selector:hover {
  background: var(--hover-bg);
  border-color: #ff6ec7;
}

.instrument-selector:focus {
  outline: none;
  border-color: #ff6ec7;
  box-shadow: 0 0 0 3px rgba(255, 110, 199, 0.2);
}

/* Duplicate removed - consolidated in main notation-container rule */

.notation-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-tertiary);
  gap: 1rem;
}

.notation-placeholder i {
  font-size: 5rem;
  opacity: 0.3;
}

.notation-placeholder p {
  font-size: 1.1rem;
}

#osmdContainer {
  min-height: 600px;
}

/* ========================================
   PLAYBACK PANEL (RIGHT)
======================================== */
.playback-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(100vh - 140px);
  position: sticky;
  top: 120px;
}

.transport-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.transport-btn {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  border: 3px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 2rem;
  box-shadow: 0 6px 25px rgba(255, 110, 199, 0.4), 0 0 40px rgba(255, 110, 199, 0.2);
}

.transport-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 35px rgba(255, 110, 199, 0.6), 0 0 60px rgba(255, 110, 199, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
}

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

.transport-btn.secondary {
  width: 55px;
  height: 55px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1.3rem;
  box-shadow: 0 2px 10px var(--shadow-color);
  border: 2px solid var(--border-color);
}

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

.progress-section {
  margin-bottom: 2rem;
}

.time-display {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-bar {
  position: relative;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar input[type="range"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff6ec7, #ffb347);
  border-radius: 10px;
  transition: width 0.1s linear;
  width: 0%;
}

.markers-section {
  margin-bottom: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.markers-section h3,
.loop-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.markers-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.marker-btn {
  padding: 1rem 1.2rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.marker-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #ff6ec7, #ffb347);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.marker-btn:hover {
  background: var(--hover-bg);
  border-color: #ff6ec7;
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(255, 110, 199, 0.2);
}

.marker-btn:hover::before {
  opacity: 1;
}

.marker-time {
  font-weight: 700;
  color: #ff6ec7;
  font-size: 0.85rem;
}

.loop-section {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.loop-instruction {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(79, 70, 229, 0.15));
  border: 1px solid rgba(147, 51, 234, 0.3);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.loop-instruction i {
  color: var(--primary-color);
  font-size: 1rem;
}

.loop-display {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.loop-display.hidden {
  display: none;
}

/* Interactive sheet music cursor */
/* Duplicate removed - these styles moved to main notation-container rule */

.notation-container.dragging {
  cursor: col-resize;
}

/* Loop selection overlay on sheet music */
.loop-selection-overlay {
  position: absolute;
  background: linear-gradient(180deg, 
    rgba(147, 51, 234, 0.25) 0%, 
    rgba(147, 51, 234, 0.15) 50%,
    rgba(147, 51, 234, 0.25) 100%);
  border-left: 3px solid var(--primary-color);
  border-right: 3px solid var(--primary-color);
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.2s;
}

.loop-selection-overlay::before,
.loop-selection-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, 
    transparent 0%,
    rgba(147, 51, 234, 0.5) 20%,
    rgba(147, 51, 234, 0.5) 80%,
    transparent 100%);
}

.loop-selection-overlay::before {
  left: 20%;
}

.loop-selection-overlay::after {
  right: 20%;
}

/* Loop boundary markers */
.loop-marker {
  position: absolute;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg,
    var(--primary-color) 0%,
    rgba(147, 51, 234, 0.8) 50%,
    var(--primary-color) 100%);
  pointer-events: none;
  z-index: 6;
  animation: pulse-marker 2s ease-in-out infinite;
}

@keyframes pulse-marker {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(147, 51, 234, 0.8); }
  50% { opacity: 0.7; box-shadow: 0 0 20px rgba(147, 51, 234, 1); }
}

.loop-marker.start {
  border-radius: 4px 0 0 4px;
}

.loop-marker.end {
  border-radius: 0 4px 4px 0;
}

/* Marker labels */
.loop-marker::after {
  content: attr(data-label);
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.loop-marker.start::after {
  content: 'START';
}

.loop-marker.end::after {
  content: 'END';
}

/* Measure highlighting for OSMD */
.notation-container svg .measure-highlight {
  fill: rgba(147, 51, 234, 0.15);
  stroke: rgba(147, 51, 234, 0.4);
  stroke-width: 2;
  rx: 4;
  ry: 4;
  pointer-events: none;
}

/* Click feedback indicator */
.jump-indicator {
  position: absolute;
  width: 3px;
  background: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.6);
  pointer-events: none;
  z-index: 7;
  animation: jump-flash 0.6s ease-out;
}

@keyframes jump-flash {
  0% { opacity: 0; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); }
}

.loop-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.loop-btn {
  flex: 1;
  padding: 0.8rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.loop-btn:hover {
  background: var(--hover-bg);
  border-color: #ff6ec7;
}

.loop-btn.clear {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

.loop-btn.clear:hover {
  background: rgba(231, 76, 60, 0.2);
}

.loop-display {
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-align: center;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.loop-display.active {
  background: rgba(255, 110, 199, 0.1);
  border-color: #ff6ec7;
  color: #ff6ec7;
  font-weight: 600;
}

/* ========================================
   RANGE INPUTS (SLIDERS)
======================================== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 110, 199, 0.4);
  transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 12px rgba(255, 110, 199, 0.6);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(255, 110, 199, 0.4);
  transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 12px rgba(255, 110, 199, 0.6);
}

/* ========================================
   LOADING OVERLAY
======================================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--modal-bg);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

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

.loading-spinner {
  text-align: center;
  color: var(--text-primary);
}

.loading-spinner i {
  font-size: 4rem;
  color: #ff6ec7;
  margin-bottom: 1rem;
}

.loading-spinner p {
  font-size: 1.2rem;
  font-weight: 500;
}

/* ========================================
   ERROR MESSAGE
======================================== */
.error-message {
  text-align: center;
  padding: 3rem;
  color: var(--text-tertiary);
}

.error-message i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: #e74c3c;
}

.error-message p {
  font-size: 1.1rem;
}

/* ========================================
   FOOTER
======================================== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 4rem;
}

.footer-content {
  margin-bottom: 1rem;
}

.footer-content p {
  color: var(--text-secondary);
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.creator-link {
  color: #ff6ec7;
  font-weight: 600;
  transition: color 0.3s ease;
}

.creator-link:hover {
  color: #ffb347;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.footer-social a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  color: #ff6ec7;
  transform: translateY(-3px);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 1400px) {
  .player-main {
    grid-template-columns: 280px 1fr 280px;
    gap: 1.5rem;
  }
}

@media (max-width: 1200px) {
  .player-main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .player-top-bar {
    flex-direction: column;
    text-align: center;
  }
  
  .back-link,
  .btn-download {
    width: 100%;
    justify-content: center;
  }
  
  .mixer-panel,
  .playback-panel {
    max-height: none;
    position: static;
  }
}

@media (max-width: 768px) {
  .hero-orchestra {
    padding: 120px 1.5rem 60px;
  }
  
  .hero-orchestra h1 {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-features {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .feature-tag {
    padding: 1rem 1.5rem;
    justify-content: center;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .songs-grid {
    grid-template-columns: 1fr;
  }
  
  .player-container {
    padding: 1rem;
  }
  
  .header-content {
    flex-wrap: wrap;
  }
  
  .song-title-header h1 {
    font-size: 1.3rem;
  }
  
  .viewer-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .instrument-selector {
    width: 100%;
  }
  
  .transport-controls {
    gap: 0.8rem;
  }
  
  .transport-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .transport-btn.secondary {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .hero-orchestra {
    padding: 120px 1rem 60px;
  }
  
  .hero-orchestra h1 {
    font-size: 2rem;
  }
  
  .back-button span {
    display: none;
  }
  
  .loop-controls {
    flex-direction: column;
  }
}

/* ========================================
   SCROLLBAR
======================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff8cd9;
}

/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.song-card {
  animation: fadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

.song-card:nth-child(1) { animation-delay: 0.1s; }
.song-card:nth-child(2) { animation-delay: 0.2s; }
.song-card:nth-child(3) { animation-delay: 0.3s; }
.song-card:nth-child(4) { animation-delay: 0.4s; }
.song-card:nth-child(5) { animation-delay: 0.5s; }
.song-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== NEW TAB-BASED RESPONSIVE LAYOUT ===== */

/* Mobile/Desktop Visibility */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none !important;
}

/* Progress Bar in Overlay */
.overlay-controls .progress-section {
  flex: 1;
  min-width: 300px;
}

.overlay-controls .time-display {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
}

.overlay-controls .progress-bar {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
}

.overlay-controls .progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 110, 199, 0.5);
}

.overlay-controls .progress-bar::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  cursor: pointer;
  border: none;
}

/* Master Controls */
.master-controls {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border: 2px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.control-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.control-row label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.volume-control,
.tempo-control {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.volume-control input[type="range"] {
  flex: 1;
}

.volume-control span {
  font-weight: 700;
  color: #ff6ec7;
  min-width: 50px;
  text-align: right;
}

/* Tempo Control */
.tempo-control {
  justify-content: space-between;
}

.tempo-btn {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.tempo-btn:hover {
  background: #ff6ec7;
  color: white;
  border-color: #ff6ec7;
  transform: scale(1.1);
}

.tempo-display {
  font-size: 2rem;
  font-weight: 700;
  color: #ff6ec7;
}

/* Instruments Section */
.instruments-section {
  margin-top: 2rem;
}

.section-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.section-subheader h3 {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}

.quick-actions {
  display: flex;
  gap: 0.8rem;
}

.quick-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.quick-btn:hover {
  background: var(--hover-bg);
  border-color: #ff6ec7;
  color: #ff6ec7;
  transform: translateY(-2px);
}

.instruments-list {
  display: grid;
  gap: 1rem;
}

/* Notation Placeholder */
.notation-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  gap: 1.5rem;
}

.notation-placeholder i {
  font-size: 4rem;
  color: #ff6ec7;
  opacity: 0.3;
}

.notation-placeholder p {
  font-size: 1.1rem;
  font-weight: 500;
}

/* Markers & Loop Sections */
.markers-section,
.loop-section {
  margin-top: 2rem;
}

.markers-section h3,
.loop-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.markers-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.loop-controls {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.loop-btn {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.loop-btn:hover {
  background: var(--hover-bg);
  border-color: #ff6ec7;
  color: #ff6ec7;
}

.loop-btn.clear {
  background: rgba(255, 110, 199, 0.1);
  border-color: rgba(255, 110, 199, 0.3);
  color: #ff6ec7;
}

.loop-btn.clear:hover {
  background: rgba(255, 110, 199, 0.2);
}

.loop-display {
  padding: 0.8rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  
  .mobile-only {
    display: flex !important;
  }
  
  .overlay-controls {
    bottom: 5rem;
    left: 1rem;
    right: 1rem;
    transform: none;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
  }
  
  .notation-view {
    height: calc(100vh - 350px);
  }
  
  .notation-header {
    flex-direction: column;
    gap: 1rem;
  }
  
  .instrument-select {
    max-width: 100%;
  }
  
  .notation-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .mixer-content {
    padding: 1.5rem;
  }
  
  .master-controls {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .playback-view {
    padding: 1.5rem;
    padding-bottom: 5rem;
  }
  
  .mixer-view.active {
    max-height: 80vh;
  }
}

@media (max-width: 480px) {
  .transport-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .transport-btn.secondary {
    width: 45px;
    height: 45px;
  }
  
  .tempo-display {
    font-size: 1.5rem;
  }
  
  .tempo-btn {
    width: 40px;
    height: 40px;
  }
}

/* Mixer Side Drawer */
.mixer-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  background: var(--bg-primary);
  border-left: 3px solid #ff6ec7;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.mixer-drawer.open {
  transform: translateX(0);
}

.mixer-header {
  padding: 2rem;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.1), transparent);
}

.mixer-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.mixer-header i {
  color: #ff6ec7;
}

.close-mixer {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.close-mixer:hover {
  background: var(--hover-bg);
  border-color: #ff6ec7;
  color: #ff6ec7;
}

.mixer-scroll {
  flex: 1;
  overflow-y: auto;
}

.mixer-content {
  padding: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .mixer-drawer {
    width: 360px;
  }
}

@media (max-width: 768px) {
  .control-bar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .progress-wrapper {
    max-width: 100%;
    order: 2;
  }
  
  .playback-controls {
    justify-content: center;
    order: 1;
  }
  
  .control-actions {
    flex-direction: column;
    width: 100%;
    position: static;
    order: 3;
  }
  
  .compact-select {
    width: 100%;
  }
  
  .action-buttons {
    width: 100%;
    justify-content: space-between;
  }
  
  .mixer-drawer {
    width: 100%;
  }
  
  .notation-viewer-main {
    height: calc(100vh - 400px);
  }
}

@media (max-width: 480px) {
  .play-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .stop-btn {
    width: 40px;
    height: 40px;
  }
  
  .action-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
}

/* Override OSMD Cursor - Make it SUPER visible */

/* Playback Cursor - Visual overlay to track music position */
.playback-cursor {
  position: absolute !important;
  top: 0 !important;
  width: 3px !important;
  height: 100% !important;
  background: linear-gradient(to bottom, 
    rgba(255, 110, 199, 0.9) 0%,
    rgba(255, 110, 199, 0.7) 50%,
    rgba(255, 110, 199, 0.9) 100%) !important;
  pointer-events: none !important;
  z-index: 9999 !important;
  box-shadow: 0 0 15px rgba(255, 110, 199, 0.6) !important;
  transition: left 0.1s linear !important;
}


/* OSMD Cursor Styling - Make it visible and beautiful */
.notation-display svg .cursor,
.notation-display svg [id*="cursor"],
.notation-display svg rect[class*="cursor"] {
  fill: rgba(255, 110, 199, 0.4) !important;
  stroke: #ff6ec7 !important;
  stroke-width: 3px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Playing Note Highlight - OPTIMIZED with CSS only */
.playing-note path,
.playing-note circle,
.playing-note ellipse,
.playing-note rect,
.playing-note line,
.playing-note polygon {
  fill: #ff6ec7 !important;
  stroke: #ff6ec7 !important;
}

/* Keep text elements readable */
.playing-note text {
  fill: #ff6ec7 !important;
}

/* Add glow effect efficiently with filter */
.playing-note {
  filter: drop-shadow(0 0 3px rgba(255, 110, 199, 0.6));
  will-change: opacity;
  transform: translateZ(0);
}

/* ========================================
   PLAYER PAGE ADJUSTMENTS
======================================== */

/* Adjust player container to account for fixed nav */

/* Footer */
footer {
  background: var(--bg-primary);
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

.footer-content {
  margin-bottom: 1.5rem;
}

.footer-content p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.footer-content .creator-link {
  color: #ff6ec7;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-content .creator-link:hover {
  color: #ffb347;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.footer-social a {
  color: var(--text-secondary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  color: #ff6ec7;
  transform: translateY(-3px);
}

/* ========================================
   DEDICATED PAGE ENHANCEMENTS
======================================== */

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #ff6ec7;
}

.breadcrumb i {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.breadcrumb span {
  color: var(--text-primary);
  font-weight: 600;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
  justify-content: center;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.share-btn:hover {
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(255, 110, 199, 0.4);
}

/* Volume Control in Control Bar */
.control-actions .volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 2px solid var(--border-color);
}

.control-actions .volume-control label {
  color: #ff6ec7;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.control-actions .volume-control .volume-slider {
  width: 100px;
}

.control-actions .volume-control .volume-value {
  min-width: 45px;
  text-align: right;
  font-weight: 600;
  color: #ff6ec7;
  font-size: 0.9rem;
}

/* Tempo Control in Control Bar */
.control-actions .tempo-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-tertiary);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 2px solid var(--border-color);
}

.control-actions .tempo-control .tempo-btn {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.control-actions .tempo-control .tempo-btn:hover {
  background: #ff6ec7;
  color: white;
  border-color: #ff6ec7;
}

.control-actions .tempo-control .tempo-value {
  min-width: 55px;
  text-align: center;
  font-weight: 600;
  color: #ff6ec7;
  font-size: 1rem;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.info-card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.info-card:hover {
  border-color: rgba(255, 110, 199, 0.5);
  box-shadow: 0 8px 30px rgba(255, 110, 199, 0.2);
  transform: translateY(-5px);
}

.info-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.info-card h3 i {
  color: #ff6ec7;
  font-size: 1.3rem;
}

.info-card ul,
.info-card ol {
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 1.5rem;
}

.info-card li {
  margin-bottom: 0.5rem;
}

.info-card strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Tips Section */
.tips-section {
  background: linear-gradient(135deg, rgba(255, 110, 199, 0.1), rgba(255, 179, 71, 0.1));
  border: 2px solid var(--border-color);
  border-radius: 15px;
  padding: 2rem;
  margin-top: 2rem;
}

.tips-section h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.tips-section h3 i {
  color: #ffb347;
  font-size: 1.4rem;
}

.tips-section ul {
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 1.5rem;
}

.tips-section li {
  margin-bottom: 1rem;
}

.tips-section strong {
  color: #ff6ec7;
  font-weight: 600;
}

/* Piece Info Section */
.piece-info {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 3rem;
  margin-top: 3rem;
}

.piece-info h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.piece-info > p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .piece-info {
    padding: 2rem 1.5rem;
  }

  .piece-info h2 {
    font-size: 1.6rem;
  }

  .control-actions {
    gap: 0.5rem;
  }

  .control-actions .volume-control .volume-slider {
    width: 80px;
  }

  .control-actions .tempo-control .tempo-value {
    min-width: 50px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .breadcrumb {
    font-size: 0.8rem;
  }

  .share-buttons {
    margin-top: 0.8rem;
  }

  .share-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .control-actions .volume-control,
  .control-actions .tempo-control {
    padding: 0.4rem 0.8rem;
  }

  .info-card {
    padding: 1.5rem;
  }

  .tips-section {
    padding: 1.5rem;
  }
}

/* ========================================
   MOROCCO ANTHEM PAGE SPECIFIC
======================================== */

/* Remove excess spacing */
.player-container {
  padding-bottom: 2rem;
}

/* MOROCCO ANTHEM - Override duplicate styles */
.piece-info {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 3rem;
  margin: 3rem auto 2rem auto;
  max-width: 1400px;
  width: calc(100% - 4rem);
  overflow-x: hidden;
}

/* Back button styling */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
}

.back-button:hover {
  background: var(--hover-bg);
  border-color: #ff6ec7;
  color: #ff6ec7;
  transform: translateX(-5px);
}

.back-button i {
  font-size: 1rem;
}

/* Song info styling */
.song-info {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.song-info h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.song-info p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Playback section */
.playback-section {
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-bottom: 2rem;
  background: var(--bg-primary);
  padding: 0.75rem 0;
}



/* Duplicate removed - overflow controlled by main rule */

/* Control bar adjustments */
.control-bar {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.playback-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

/* Instrument selector */
.instrument-selector {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-tertiary);
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 2px solid var(--border-color);
}

.instrument-selector label {
  color: #ff6ec7;
  font-size: 1.1rem;
}

.instrument-selector select {
  padding: 0.5rem 1rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  min-width: 150px;
}

/* Zoom controls */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-tertiary);
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  border: 2px solid var(--border-color);
}

.zoom-label {
  color: #ff6ec7;
  font-size: 1.1rem;
}

.zoom-slider {
  width: 80px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .control-bar {
    padding: 1.25rem;
  }

  .control-actions {
    gap: 0.8rem;
  }
}

@media (max-width: 768px) {
  .player-container {
    padding: 1.5rem 1rem;
  }

  .song-info h1 {
    font-size: 1.8rem;
  }

  .song-info p {
    font-size: 1rem;
  }

  .control-bar {
    padding: 1rem;
    gap: 1rem;
  }

  .playback-controls {
    flex-wrap: wrap;
  }

  .control-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.8rem;
  }

  .instrument-selector,
  .zoom-controls {
    width: 100%;
    justify-content: space-between;
  }

  .instrument-selector select {
    flex: 1;
  }

  .zoom-slider {
    flex: 1;
  }

  .action-btn {
    width: 100%;
  }

  .notation-viewer {
    padding: 0;
    min-height: 400px;
  }

  .info-grid {
    gap: 1rem;
  }

  .back-button span {
    display: none;
  }

  .back-button {
    width: 45px;
    height: 45px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .player-container {
    padding: 1rem 0.75rem;
  }

  .song-info h1 {
    font-size: 1.5rem;
  }

  .song-info p {
    font-size: 0.9rem;
  }

  .play-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .stop-btn {
    width: 40px;
    height: 40px;
  }

  .time-info {
    font-size: 0.9rem;
  }

  .notation-viewer {
    padding: 0;
    min-height: 350px;
  }

  .piece-info {
    padding: 1.5rem;
  }

  .piece-info h2 {
    font-size: 1.4rem;
  }
}

/* Dark mode adjustments - Keep sheet music light */
:root[data-theme="dark"] .notation-viewer,
.dark-theme .notation-viewer {
  background: white !important;
}

:root[data-theme="dark"] .notation-container,
.dark-theme .notation-container {
  background: white !important;
}

:root[data-theme="dark"] .notation-container svg,
.dark-theme .notation-container svg {
  filter: none !important;
}

/* ========================================
   FANCY INSTRUMENT SELECTOR
======================================== */

.instrument-selector select {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-tertiary));
  border: 2px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  min-width: 150px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.instrument-selector select:hover {
  border-color: #ff6ec7;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 110, 199, 0.3);
}

.instrument-selector select:focus {
  outline: none;
  border-color: #ff6ec7;
  box-shadow: 0 0 0 3px rgba(255, 110, 199, 0.2);
}

.instrument-selector select option {
  padding: 0.8rem;
  background: var(--bg-primary);
  font-size: 1rem;
}

/* Animate icon on selection change */
.instrument-selector label {
  color: #ff6ec7;
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.instrument-selector:hover label {
  transform: scale(1.2) rotate(10deg);
}

/* Settings button functionality */
#settingsBtn.active {
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  color: white;
  border-color: transparent;
}

/* Hide horizontal scrollbar on body */
body {
  overflow-x: hidden;
}

.player-container {
  overflow-x: hidden;
}

/* ========================================
   MIXER PANEL
======================================== */

.mixer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  width: 420px;
  max-width: 90vw;
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
  border-left: 3px solid #ff6ec7;
  box-shadow: -20px 0 60px rgba(255, 110, 199, 0.2), -10px 0 40px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.mixer-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 110, 199, 0.05), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.mixer-panel.open {
  transform: translateX(0);
  box-shadow: -20px 0 80px rgba(255, 110, 199, 0.3), -10px 0 50px rgba(0, 0, 0, 0.5);
}

.mixer-panel.hidden {
  display: none;
}

.mixer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 1.5rem;
  border-bottom: 2px solid rgba(255, 110, 199, 0.2);
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.mixer-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.mixer-header i {
  color: #ff6ec7;
  font-size: 1.3rem;
}

.close-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid rgba(255, 110, 199, 0.3);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-size: 1.3rem;
}

.close-btn:hover {
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  color: white;
  border-color: #ff6ec7;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 20px rgba(255, 110, 199, 0.6);
}

.close-btn:active {
  transform: rotate(90deg) scale(0.95);
}

.mixer-content {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

.mixer-content::-webkit-scrollbar {
  width: 8px;
}

.mixer-content::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

.mixer-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff6ec7, #ffb347);
  border-radius: 4px;
}

.mixer-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ffb347, #ff6ec7);
}

.instruments-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  animation: slide-in-items 0.6s ease-out;
}

@keyframes slide-in-items {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

#mixerToggle.active {
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(255, 110, 199, 0.6);
  animation: pulse-button 2s ease-in-out infinite;
}

@keyframes pulse-button {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .mixer-panel {
    width: 100vw;
    max-width: 100vw;
  }

  .mixer-content {
    padding: 1rem;
  }
}

/* ========================================
   MIXER TRACKS - Modern Clean Design
======================================== */

.mixer-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin-bottom: 0.75rem;
}

.mixer-track::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.6), rgba(59, 130, 246, 0.5));
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.mixer-track.muted::before {
  content: 'MUTED' !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  opacity: 1 !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) rotate(-15deg) !important;
  font-size: 2rem !important;
  font-weight: 900 !important;
  color: rgba(150, 150, 150, 0.35) !important;
  letter-spacing: 0.3em !important;
  pointer-events: none !important;
  z-index: 200 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  white-space: nowrap !important;
}

.mixer-track:hover::before {
  opacity: 1;
}

.mixer-track:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(-3px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.2);
}

.track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.track-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
}

.track-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: var(--track-icon-bg, rgba(255, 255, 255, 0.05));
  color: var(--track-icon-color, inherit);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.track-name {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.track-icon .icon-emoji {
  font-size: 2rem;
  line-height: 1;
}

.track-icon .icon-image {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: brightness(1.2);
}

[data-theme="light"] .track-icon .icon-image {
  filter: brightness(0.9);
}

.track-name .name {
  font-weight: 600;
  font-size: 0.45rem; /* 50% of previous 0.9rem */
  color: rgba(255, 255, 255, 0.95);
}

.track-name .family {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

.track-controls {
  display: flex;
  gap: 0.4rem;
}

.track-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  font-size: 0.75rem;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.track-btn:hover {
  border-color: rgba(139, 92, 246, 0.4);
  color: rgba(139, 92, 246, 0.9);
  transform: scale(1.05);
  background: rgba(139, 92, 246, 0.1);
}

.track-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  border-color: rgba(139, 92, 246, 0.6);
  color: white;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.track-volume {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.volume-slider {
  flex: 1;
  height: 5px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
  transition: all 0.2s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.5);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
  transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.5);
}

.volume-value {
  min-width: 40px;
  text-align: right;
  font-weight: 600;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .mixer-track {
    padding: 1rem;
  }

  .track-icon {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  .track-btn {
    width: 30px;
    height: 30px;
    font-size: 0.7rem;
  }
}

/* ========================================
   EAR TRAINING STYLE BUTTONS
======================================== */

.btn-secondary { 
  background: var(--bg-secondary); 
  color: var(--text-primary); 
  padding: 0.6rem 0.95rem; 
  font-family: 'Poppins', sans-serif;
  cursor: pointer; 
  border-radius: 12px; 
  border: 2px solid var(--border-color); 
  font-weight: 600; 
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-secondary:hover { 
  background: var(--bg-tertiary);
  border-color: #ff6ec7;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 110, 199, 0.3);
}

.btn-secondary.has-bg-icon:hover {
  background-color: var(--bg-tertiary);
}

.btn-icon-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
}

.btn-icon-text .btn-icon {
  font-size: 1.7em;
  margin: 0;
}

.btn-secondary.active,
.instrument-btn.active {
  background: linear-gradient(135deg, var(--inst-color, #ff6ec7), rgba(255, 110, 199, 0.6));
  color: white;
  border-color: var(--inst-color, #ff6ec7);
  box-shadow: 0 4px 20px var(--inst-color, rgba(255, 110, 199, 0.6));
  transform: translateY(-2px);
}

.instrument-selector {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 1rem;
  margin: 0.5rem 0;
}

@media (max-width: 768px) {
  .btn-icon-text {
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
  }
  
  .btn-icon-text .btn-icon {
    font-size: 1.1em;
  }
}

@media (max-width: 480px) {
  .instrument-selector {
    gap: 0.3rem;
  }
  
  .btn-icon-text {
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
  }
  
  .btn-icon-text span:not(.btn-icon) {
    display: none;
  }
  
  .btn-icon-text .btn-icon {
    font-size: 1.3em;
  }
}

/* ========================================
   INSTRUMENT CHANGE ANIMATION
======================================== */

.instrument-change-animation {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.instrument-change-animation.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.instrument-icon-large {
  font-size: 8rem;
  line-height: 1;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.4));
  animation: instrument-bounce 0.6s ease-out;
}

.instrument-change-animation .instrument-name {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 
    0 2px 12px rgba(0,0,0,0.6),
    0 0 30px #ff6ec7;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: instrument-glow 0.6s ease-out;
}

.instrument-change-animation .loading-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 1.2rem;
  color: var(--text-secondary);
  animation: fadeInUp 0.4s ease-out 0.3s both;
}

.instrument-change-animation .loading-indicator i {
  font-size: 1.5rem;
  color: var(--primary);
}

.instrument-change-animation .loading-indicator span {
  font-weight: 500;
  letter-spacing: 0.03em;
}

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

@keyframes instrument-bounce {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(10deg);
  }
  70% {
    transform: scale(0.9) rotate(-5deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes instrument-glow {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  50% {
    opacity: 1;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .instrument-icon-large {
    font-size: 6rem;
  }

  .instrument-name {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .instrument-icon-large {
    font-size: 5rem;
  }

  .instrument-name {
    font-size: 1.2rem;
  }
}

/* ========================================
   PERCUSSION GROUP - Modern Collapsible Design
======================================== */

.mixer-group {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 1.15rem;
  border: 1px solid rgba(234, 179, 8, 0.2);
  margin-bottom: 0.9rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.mixer-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.7), rgba(202, 138, 4, 0.6));
  z-index: 1;
}

.mixer-group:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(234, 179, 8, 0.3);
  box-shadow: 0 4px 16px rgba(234, 179, 8, 0.1);
}

/* Muted group styling */
.mixer-group.muted {
  opacity: 0.5;
  filter: grayscale(100%) brightness(0.7);
  border: 2px dashed rgba(100, 100, 100, 0.4);
  background: rgba(0, 0, 0, 0.2);
}

.mixer-group.muted::after {
  content: 'GROUP MUTED';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 2.5rem;
  font-weight: 900;
  color: rgba(150, 150, 150, 0.15);
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.mixer-group.muted .sub-track {
  opacity: 0.6;
}

.mixer-group.muted .sub-track .mute-btn {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Keep solo button clickable on muted tracks */
.mixer-track.muted .solo-btn,
.sub-track.muted .solo-btn,
.mixer-group.muted .solo-btn,
.mixer-group.muted .sub-track .solo-btn {
  pointer-events: auto !important;
  position: relative;
  z-index: 100;
  opacity: 1 !important;
  cursor: pointer !important;
}

/* Also keep group solo button clickable */
.mixer-group.muted .group-solo-btn {
  pointer-events: auto !important;
  position: relative;
  z-index: 100;
  opacity: 1 !important;
  cursor: pointer !important;
}

/* Ensure solo buttons in regular muted tracks are clickable */
.instrument-track.muted .solo-btn,
.mixer-track.muted .solo-btn {
  pointer-events: auto !important;
  z-index: 100;
  opacity: 1 !important;
  cursor: pointer !important;
}

/* Mixer header with reset button */
.mixer-header {
  display: flex;
  justify-content: flex-end;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
}

.mixer-reset-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(239, 68, 68, 0.15));
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 12px;
  color: #ec4899;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mixer-reset-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(135deg, #ec4899, #ef4444);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.mixer-reset-btn:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(239, 68, 68, 0.25));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
  color: #f472b6;
}

.mixer-reset-btn:hover::before {
  opacity: 1;
}

.mixer-reset-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.2);
}

.mixer-reset-btn i {
  font-size: 1.1rem;
  animation: rotate-reset 0.6s ease-in-out;
}

.mixer-reset-btn:hover i {
  animation: rotate-reset 0.6s ease-in-out infinite;
}

@keyframes rotate-reset {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

/* Solo group styling */
.mixer-group.soloed {
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.05);
}

/* Solo button styling */
.solo-btn,
.group-solo-btn {
  position: relative;
}

.solo-btn.active,
.group-solo-btn.active {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #22c55e !important;
  border-color: rgba(34, 197, 94, 0.4) !important;
}

.solo-btn.active i,
.group-solo-btn.active i {
  color: #22c55e;
}

.mixer-track.soloed {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.03);
}

.group-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0;
  position: relative;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.group-header:hover {
  background: rgba(255, 255, 255, 0.04);
}

.group-toggle {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(234, 179, 8, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.group-toggle:hover {
  border-color: rgba(234, 179, 8, 0.4);
  color: rgba(234, 179, 8, 1);
  transform: scale(1.05);
  background: rgba(234, 179, 8, 0.1);
}

.group-toggle i {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.85rem;
}

.group-toggle.collapsed i {
  transform: rotate(-90deg);
}

.group-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.group-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(234, 179, 8, 0.15);
  font-size: 1.1rem;
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.group-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.3px;
}

.group-volume {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0.9rem 0 0.6rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.group-items {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 500px;
  overflow: visible;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.group-items.collapsed {
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

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

.group-items:not(.collapsed) {
  animation: expandItems 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sub-track {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 11px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.sub-track:hover {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.08);
}

.sub-track .track-header {
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.sub-track.muted .track-header,
.sub-track.muted .track-volume,
.sub-track.muted .track-controls,
.sub-track.muted .track-info {
  position: relative;
  z-index: 1;
}

.sub-track .track-name .name {
  font-size: 0.425rem; /* 50% of previous 0.85rem */
}

.sub-track .track-icon {
  width: 46px;
  height: 46px;
  font-size: 1.6rem;
}

.sub-track .track-icon .icon-emoji {
  font-size: 1.7rem;
  line-height: 1;
}

.sub-track .track-icon .icon-image {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: brightness(1.2);
}

[data-theme="light"] .sub-track .track-icon .icon-image {
  filter: brightness(0.9);
}

.group-mute-btn {
  margin-left: auto;
}

/* Better button styling */
.track-btn i {
  transition: all 0.2s ease;
}

.track-btn.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-color: rgba(239, 68, 68, 0.5);
  color: white;
}

.track-btn.active i {
  animation: gentle-pulse-icon 0.5s ease;
}

@keyframes gentle-pulse-icon {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

.solo-btn.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: rgba(59, 130, 246, 0.5);
  color: white;
}

@media (max-width: 768px) {
  .mixer-group {
    padding: 0.9rem;
  }

  .sub-track {
    padding: 0.75rem;
  }
  
  .group-toggle {
    width: 28px;
    height: 28px;
  }
}

/* ============================================
   PRACTICE PANEL STYLES
   ============================================ */

.practice-panel {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 420px;
  max-height: 70vh;
  background: linear-gradient(135deg, rgba(88, 86, 214, 0.96) 0%, rgba(58, 134, 255, 0.96) 50%, rgba(0, 210, 255, 0.96) 100%);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 1000;
  transform: translateX(-150%) scale(0.9);
  transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  opacity: 0;
}

.practice-panel.hidden {
  transform: translateX(-150%) scale(0.9);
  opacity: 0;
  pointer-events: none;
}

.practice-panel:not(.hidden) {
  transform: translateX(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.practice-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(88, 86, 214, 0.15) 0%, 
    rgba(58, 134, 255, 0.15) 50%,
    rgba(0, 210, 255, 0.15) 100%);
  z-index: -1;
}

.practice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 1.5rem;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2));
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  cursor: move; /* draggable on desktop */
}

.practice-header h3 {
  margin: 0;
  color: white;
  font-size: 1.6rem;
  font-weight: 800;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: 0.5px;
}

.practice-header h3 i {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6b6b, #f06595);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
  font-size: 1.2rem;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 25px rgba(255, 107, 107, 0.8);
    transform: scale(1.05);
  }
}

.practice-content {
  height: 100%;
  overflow-y: auto;
  z-index: 1;
  position: relative;
}

@media (max-width: 768px) {
  .practice-header { cursor: default; }
}

/* Custom Scrollbar for Practice Panel */
.practice-content::-webkit-scrollbar {
  width: 12px;
}

.practice-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  margin: 8px 0;
}

.practice-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff6b6b 0%, #f06595 100%);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.practice-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff8787 0%, #ff6ba7 100%);
  background-clip: padding-box;
}

/* Practice Sections */
.practice-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.practice-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
}

.practice-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.3px;
}

.practice-label i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6b6b, #f06595);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
  font-size: 1rem;
}

/* Tempo Controls */
.tempo-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tempo-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 0.7rem 1.4rem;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  min-width: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.tempo-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

.tempo-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.practice-slider {
  flex: 1;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.35));
  outline: none;
  -webkit-appearance: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.practice-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #f06595);
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(255, 107, 107, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid white;
}

.practice-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.7), 0 0 0 6px rgba(255, 255, 255, 0.3);
}

.practice-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #f06595);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 3px 12px rgba(255, 107, 107, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.tempo-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.preset-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.preset-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.preset-btn.active {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #f06595 100%);
  color: white;
  border-color: #ff6b6b;
  box-shadow: 0 0 25px rgba(255, 107, 107, 0.6), 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

/* Practice Mode Buttons */
.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.mode-btn i {
  font-size: 1.6rem;
  min-width: 36px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mode-btn span {
  flex: 1;
  font-size: 0.95rem;
}

.mode-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
  transform: translateX(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.mode-btn.active {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 50%, #f06595 100%);
  color: white;
  border-color: #ff6b6b;
  box-shadow: 0 0 30px rgba(255, 107, 107, 0.6), 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateX(6px);
}

.mode-btn.active i {
  animation: pulse-icon 1.5s ease-in-out infinite;
}

/* Loop Controls */
.loop-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.loop-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  padding: 0.8rem;
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.loop-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.loop-btn.active {
  background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
  border-color: #51cf66;
  box-shadow: 0 0 20px rgba(81, 207, 102, 0.6), 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.loop-btn.secondary {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(240, 101, 149, 0.3));
  border-color: rgba(255, 107, 107, 0.6);
}

.loop-btn.secondary:hover {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.5), rgba(240, 101, 149, 0.5));
  border-color: rgba(255, 107, 107, 0.8);
}

.loop-display {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  color: white;
  margin-bottom: 1rem;
}

.loop-display strong {
  color: #ffd700;
}

/* Metronome Controls */
.metronome-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toggle-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  padding: 1rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.1rem;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.toggle-btn.active {
  background: #2ed573;
  border-color: #2ed573;
  box-shadow: 0 0 20px rgba(46, 213, 115, 0.5);
}

.toggle-btn.active i {
  animation: swing 1s ease-in-out infinite;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.volume-control i {
  color: white;
  font-size: 1.2rem;
}

.volume-control span {
  min-width: 50px;
  color: white;
  font-weight: 600;
  text-align: center;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.action-btn-practice {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.75rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.action-btn-practice:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.action-btn-practice.secondary {
  grid-column: 1 / -1;
  background: rgba(231, 76, 60, 0.3);
  border-color: rgba(231, 76, 60, 0.5);
}

.action-btn-practice.secondary:hover {
  background: rgba(231, 76, 60, 0.5);
}

/* Mode Hints */
.mode-hint {
  background: rgba(0, 0, 0, 0.2);
  border-left: 3px solid #ffd700;
  border-radius: 4px;
  padding: 0.75rem;
  margin-top: 1rem;
  color: white;
}

.mode-hint i {
  color: #ffd700;
  margin-right: 0.5rem;
}

.mode-hint small {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 300px;
  animation: slideIn 0.3s ease-out;
  border-left: 4px solid #2ed573;
}

.toast.success {
  border-left-color: #2ed573;
}

.toast.warning {
  border-left-color: #ffd700;
}

.toast.info {
  border-left-color: #1e90ff;
}

.toast i {
  font-size: 1.5rem;
}

.toast.success i {
  color: #2ed573;
}

.toast.warning i {
  color: #ffd700;
}

.toast.info i {
  color: #1e90ff;
}

@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes swing {
  0%, 100% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(10deg);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Tempo slider enhanced styling */
.practice-slider:active::-webkit-slider-thumb {
  transform: scale(1.3);
  box-shadow: 0 0 20px rgba(46, 213, 115, 0.6);
}

/* Mode button enhanced hover */
.mode-btn:not(.active):hover {
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

/* Loop button active state enhancement */
.loop-btn.active i {
  animation: pulse-icon 2s ease-in-out infinite;
}

/* Preset button glow effect */
.preset-btn.active {
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6), 0 4px 15px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 0 35px rgba(255, 107, 107, 0.9), 0 6px 20px rgba(0, 0, 0, 0.3);
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .practice-panel {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 65vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  
  .practice-panel.hidden {
    transform: translateY(100%);
  }
  
  .practice-panel:not(.hidden) {
    transform: translateY(0);
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }
  
  .action-btn-practice.secondary {
    grid-column: 1;
  }
  
  .toast-container {
    left: 10px;
    right: 10px;
  }
  
  .toast {
    min-width: auto;
  }
}

/* ============================================
   REMOVED: Duplicate .tools-sidebar class rules
   Using #toolsSidebar ID selector instead
   ============================================ */

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 10px;
}

.sidebar-content {
  flex: 1;
  display: grid;
  overflow: hidden;
}

.tab-panel {

  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem 1.5rem;
  padding-top: 0px!important;
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================
   PRACTICE SECTION CARDS
   ============================================ */

.practice-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: all 0.2s ease;
}

.practice-section:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.practice-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.practice-label i {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: white;
  border-radius: 8px;
  font-size: 0.875rem;
}

/* ============================================
   TEMPO CONTROLS
   ============================================ */

.tempo-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.tempo-btn {
  padding: 0.625rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  white-space: nowrap;
}

.tempo-btn:hover {
  background: var(--hover-bg);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.practice-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-tertiary);
  border-radius: 10px;
  outline: none;
  cursor: pointer;
}

.practice-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent-primary);
  border-radius: 50%;
  cursor: grab;
  transition: all 0.2s ease;
}

.practice-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.practice-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
}

.practice-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent-primary);
  border-radius: 50%;
  border: none;
  cursor: grab;
  transition: all 0.2s ease;
}

.tempo-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.preset-btn {
  padding: 0.625rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

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

/* ============================================
   MODE BUTTONS
   ============================================ */

.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.mode-btn {
  padding: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.mode-btn i {
  font-size: 1.25rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.mode-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

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

.mode-btn.active i {
  background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   TOGGLE BUTTONS
   ============================================ */

.toggle-btn {
  padding: 0.875rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  justify-content: center;
}

.toggle-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.toggle-btn.active {
  background: var(--success-bg);
  border-color: var(--success-color);
  color: var(--success-color);
}

.loop-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin-top: 0.75rem;
}

.loop-btn {
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.loop-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

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

.loop-btn.secondary {
  background: transparent;
}

/* ============================================
   MIXER TRACKS
   ============================================ */

.mixer-track {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.mixer-track:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.track-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.track-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  background: var(--bg-tertiary);
}

.track-name {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.track-name .name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.track-name .family {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.track-controls {
  display: flex;
  gap: 0.375rem;
}

.track-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 0.75rem;
}

.track-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.track-btn.active {
  background: var(--danger-bg);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

.solo-btn.active {
  background: var(--info-bg);
  border-color: var(--info-color);
  color: var(--info-color);
}

.track-volume {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.volume-slider {
  flex: 1;
  height: 5px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--accent-primary);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.volume-value {
  min-width: 38px;
  text-align: right;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ============================================
   PERCUSSION GROUP
   ============================================ */

.mixer-group {
  background: var(--bg-secondary);
  border: 1px solid var(--warning-color);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.875rem;
}

.group-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
  padding: 0.375rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.group-header:hover {
  background: var(--hover-bg);
}

.group-toggle {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--warning-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.group-toggle i {
  transition: transform 0.2s ease;
}

.group-toggle.collapsed i {
  transform: rotate(-90deg);
}

.group-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.group-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--warning-bg);
  color: var(--warning-color);
  font-size: 1rem;
}

.group-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.group-volume {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0.625rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.group-items {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.group-items.collapsed {
  max-height: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.sub-track {
  padding: 0.875rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

/* ============================================
   UTILITY HELPERS
   ============================================ */

.mode-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--info-bg);
  border-radius: 8px;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.mode-hint i {
  color: var(--info-color);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.loop-display {
  padding: 0.625rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
}

.loop-display.hidden {
  display: none;
}

.loop-instruction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.metronome-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.volume-control i {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Mode badge on practice toggle button */
.action-btn.toggle-mode {
  position: relative;
}

.mode-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger-color);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  pointer-events: none;
  letter-spacing: 0.3px;
}

.action-btn.toggle-mode.practice-active .mode-badge {
  background: var(--success-color);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .tools-sidebar {
    width: 100%;
  }
  
  .sidebar-header {
    padding: 1.25rem;
  }
  
  .sidebar-tab {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
  }
  
  .sidebar-content {
    padding: 1.25rem;
  }
  
  .tempo-presets {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .loop-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .sidebar-tab span {
    display: none;
  }
  
  .sidebar-tab i {
    margin-right: 0;
    font-size: 1.125rem;
  }
}



.practice-label i {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, 
    rgba(139, 92, 246, 0.25),
    rgba(59, 130, 246, 0.2));
  border-radius: 8px;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
}

/* Practice Mode Toggle Badge */
.action-btn.toggle-mode {
  position: relative;
  overflow: visible;
}

.mode-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 8px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-btn.toggle-mode.practice-active .mode-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.5);
  animation: gentle-pulse 2s ease-in-out infinite;
}

@keyframes gentle-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 2px 14px rgba(16, 185, 129, 0.6);
  }
}

.action-btn.toggle-mode.practice-active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

/* Hide practice features when practice mode is off */
body:not(.practice-mode-active) .practice-only {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(0.8);
}

/* Enhanced Practice Controls - Cleaner Style */
.tempo-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.tempo-btn {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.tempo-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  color: white;
}

.tempo-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.practice-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  outline: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.practice-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4),
              inset 0 1px 2px rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.practice-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 12px rgba(139, 92, 246, 0.5);
}

.practice-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
}

.practice-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4),
              inset 0 1px 2px rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.tempo-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.preset-btn {
  padding: 0.75rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.preset-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.15),
    rgba(59, 130, 246, 0.15));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.preset-btn:hover {
  border-color: rgba(139, 92, 246, 0.3);
  color: white;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.preset-btn:hover::before {
  opacity: 1;
}

.preset-btn.active {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  border-color: rgba(139, 92, 246, 0.5);
  color: white;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35),
              inset 0 1px 1px rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.preset-btn.active::before {
  opacity: 1;
}

/* Mode Buttons - Cleaner Design */
.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.mode-btn {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
  font-size: 0.9rem;
}

.mode-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.12),
    rgba(59, 130, 246, 0.12));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mode-btn i {
  font-size: 1.15rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mode-btn span {
  flex: 1;
  font-size: 0.88rem;
}

.mode-btn:hover {
  border-color: rgba(139, 92, 246, 0.25);
  color: white;
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.06);
}

.mode-btn:hover::before {
  opacity: 0.4;
}

.mode-btn:hover i {
  background: rgba(139, 92, 246, 0.18);
  transform: scale(1.05);
}

.mode-btn.active {
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.2),
    rgba(59, 130, 246, 0.18));
  border-color: rgba(139, 92, 246, 0.4);
  color: white;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25),
              inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transform: translateX(3px);
}

.mode-btn.active::before {
  opacity: 1;
}

.mode-btn.active i {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* Toggle Buttons (Metronome, Loop, Practice Mode) - Cleaner Style */
.toggle-btn,
.practice-mode-toggle-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  width: 100%;
}

.toggle-btn::before,
.practice-mode-toggle-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(46, 213, 115, 0.15),
    rgba(0, 200, 83, 0.15));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toggle-btn i,
.practice-mode-toggle-btn i {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.toggle-btn:hover,
.practice-mode-toggle-btn:hover {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.05));
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-2px);
}

.toggle-btn:hover::before,
.practice-mode-toggle-btn:hover::before {
  opacity: 0.3;
}

.toggle-btn.active,
.practice-mode-toggle-btn.active {
  background: linear-gradient(135deg, #2ed573, #00c853);
  border-color: rgba(46, 213, 115, 0.6);
  color: white;
  box-shadow: 0 8px 24px rgba(46, 213, 115, 0.4),
              inset 0 1px 2px rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.toggle-btn.active::before,
.practice-mode-toggle-btn.active::before {
  opacity: 1;
}

.toggle-btn.active i,
.practice-mode-toggle-btn.active i {
  animation: togglePulse 2s ease-in-out infinite;
}

@keyframes togglePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* Loop Controls */
.loop-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.loop-btn {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.12),
    rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.loop-btn:hover {
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.25),
    rgba(59, 130, 246, 0.25));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  color: white;
}

.loop-btn.secondary {
  background: linear-gradient(135deg,
    rgba(255, 77, 77, 0.12),
    rgba(255, 59, 59, 0.12));
  border-color: rgba(255, 77, 77, 0.25);
}

.loop-btn.secondary:hover {
  background: linear-gradient(135deg,
    rgba(255, 77, 77, 0.25),
    rgba(255, 59, 59, 0.25));
  box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
}

/* Hints and Tips */
.mode-hint {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg,
    rgba(59, 130, 246, 0.08),
    rgba(37, 99, 235, 0.08));
  border-left: 3px solid rgba(59, 130, 246, 0.5);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.mode-hint i {
  color: rgba(59, 130, 246, 0.8);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.mode-hint strong {
  color: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .mode-hint strong {
  color: #1a1a1a;
  font-weight: 700;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .tools-sidebar {
    width: 100%;
  }
  
  .sidebar-header {
    padding: 1.25rem;
  }
  
  .sidebar-tabs {
    flex: 1;
    gap: 0.4rem;
    padding: 0.35rem;
  }
  
  .sidebar-tab {
    padding: 0.75rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .sidebar-tab i {
    margin-right: 0.4rem;
    font-size: 0.95rem;
  }
  
  .close-btn {
    width: 34px;
    height: 34px;
    top: 1.25rem;
    right: 1.25rem;
  }
  
  .sidebar-content {
    padding: 1.25rem;
  }
  
  .practice-section {
    padding: 1.15rem;
    margin-bottom: 1rem;
  }
  
  .practice-label {
    font-size: 0.75rem;
    gap: 0.5rem;
  }
  
  .practice-label i {
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
  }
  
  .tempo-controls {
    gap: 0.6rem;
  }
  
  .tempo-btn {
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
  }
  
  .tempo-presets {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .preset-btn {
    padding: 0.65rem 0.4rem;
    font-size: 0.85rem;
  }
  
  .mode-btn {
    padding: 0.9rem 1rem;
    gap: 0.75rem;
  }
  
  .mode-btn i {
    width: 30px;
    height: 30px;
    font-size: 1rem;
  }
  
  .mode-btn span {
    font-size: 0.85rem;
  }
  
  .loop-controls {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  
  .loop-btn {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
  }
  
  .mixer-track {
    padding: 1.1rem;
  }
  
  .track-name .name {
    font-size: 0.85rem;
  }
  
  .track-name .family {
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .sidebar-header {
    padding: 1rem;
  }
  
  .sidebar-tabs {
    gap: 0.3rem;
    padding: 0.3rem;
  }
  
  .sidebar-tab {
    padding: 0.65rem 0.6rem;
    font-size: 0.75rem;
  }
  
  .sidebar-tab span {
    display: none; /* Hide text on very small screens, show only icons */
  }
  
  .sidebar-tab i {
    margin-right: 0;
    font-size: 1.1rem;
  }
  
  .sidebar-content {
    padding: 1rem;
  }
  
  .practice-section {
    padding: 1rem;
    border-radius: 14px;
  }
  
  .tempo-presets {
    gap: 0.4rem;
  }
}

/* Smooth Transitions & Micro-interactions */
* {
  -webkit-tap-highlight-color: transparent;
}

button, input[type="range"], .track-btn, .mode-btn, .preset-btn, .tempo-btn {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================================
   COMPREHENSIVE RESPONSIVE DESIGN
   Mobile, Tablet, Desktop optimizations
=========================================== */

/* Mobile First - Base styles (320px - 480px) */
@media (max-width: 480px) {
  /* Normal Mode - Mobile Small */
  .player-container {
    padding: 0.5rem;
  }
  
  .song-info {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .song-info h1 {
    font-size: 1rem;
    line-height: 1.2;
  }
  
  .song-info p {
    font-size: 0.7rem;
  }
  
  .instrument-selector-bar {
    padding: 0.4rem;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .instrument-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  .notation-controls {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem;
    border-left: none;
    padding-left: 0;
    width: 100%;
    align-items: stretch;
  }
}

/* Very Small Screens (< 600px) */
@media (max-width: 600px) {
  .notation-controls {
    padding: 0 0.5rem;
    border-left: none;
  }

  .zoom-controls {
    padding: 0.3rem 0;
    padding-right: 0.5rem;
    margin-right: 0.5rem;
  }

  .action-controls {
    padding: 0.3rem 0;
  }
}
  
  .control-btn {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  
  .zoom-controls {
    gap: 0.3rem;
  }
  
  .zoom-slider {
    width: 50px;
  }
  
  .orchestra-floating-menu {
    right: 0.4rem;
    gap: 0;
  }

  .orchestra-floating-buttons.open > button:nth-child(1) {
    transform: translate(calc(-50% - 0px), calc(-50% - 70px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(2) {
    transform: translate(calc(-50% - 10px), calc(-50% - 140px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(3) {
    transform: translate(calc(-50% - 0px), calc(-50% + 70px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(4) {
    transform: translate(calc(-50% - 10px), calc(-50% + 140px)) scale(1) !important;
  }
  
  .orchestra-theme-btn,
  .orchestra-practice-btn,
  .orchestra-mixer-btn,
  .orchestra-language-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .orchestra-theme-btn i,
  .orchestra-practice-btn i,
  .orchestra-mixer-btn i {
    font-size: 1.1rem;
  }

  .orchestra-language-btn .flag-icon {
    width: 28px;
    height: 28px;
  }
  
  .orchestra-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
  
  /* Sidebar Mobile */
  
  .sidebar-tabs {
    gap: 0.3rem;
  }
  
  .sidebar-tab {
    font-size: 0.75rem;
    padding: 0.6rem;
  }
  
  /* Focus Mode - Mobile Small */
  body.focus-mode .instrument-selector-bar {
    width: 96vw;
    max-width: 96vw;
    padding: 0.4rem;
    gap: 0.5rem;
    flex-direction: column;
  }
  
  body.focus-mode .instrument-selector {
    gap: 0.3rem;
    border-right: none;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding-right: 0;
    padding-bottom: 0.5rem;
    margin-right: 0;
    margin-bottom: 0.5rem;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  [data-theme="dark"] body.focus-mode .instrument-selector {
    border-bottom-color: rgba(139, 92, 246, 0.3);
  }
  

  
  body.focus-mode .control-btn {
    width: 30px;
    height: 30px;
  }
  
  body.focus-mode .notation-viewer {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body.focus-mode .notation-viewer-container {
    padding-top: 200px !important;
    padding-bottom: 120px !important;
  }
  
  body.focus-mode .control-bar-toggle {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }



/* Mobile Medium (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  /* Normal Mode */
  .player-container {
    padding: 0.75rem;
  }
  
  .song-info {
    padding: 1rem;
  }
  
  .song-info h1 {
    font-size: 1.3rem;
  }
  
  .instrument-selector-bar {
    padding: 0.6rem 0.8rem;
    gap: 0.6rem;
  }
  
  .instrument-btn {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
  
  .control-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .zoom-slider {
    width: 80px;
  }
  
  .orchestra-floating-menu {
    right: 0.75rem;
    gap: 0;
  }

  .orchestra-floating-buttons.open > button:nth-child(1) {
    transform: translate(calc(-50% - 0px), calc(-50% - 90px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(2) {
    transform: translate(calc(-50% - 15px), calc(-50% - 180px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(3) {
    transform: translate(calc(-50% - 0px), calc(-50% + 90px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(4) {
    transform: translate(calc(-50% - 15px), calc(-50% + 180px)) scale(1) !important;
  }
  
  .orchestra-theme-btn,
  .orchestra-practice-btn,
  .orchestra-mixer-btn,
  .orchestra-language-btn {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }

  .orchestra-theme-btn i,
  .orchestra-practice-btn i,
  .orchestra-mixer-btn i {
    font-size: 1.4rem;
  }

  .orchestra-language-btn .flag-icon {
    width: 36px;
    height: 36px;
  }
}

/* Tablet Portrait (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Normal Mode */
  .player-container {
    padding: 1rem;
  }
  
  .song-info h1 {
    font-size: 1.5rem;
  }
  
  .instrument-selector-bar {
    padding: 0.7rem 1rem;
    gap: 0.8rem;
  }
  
  .instrument-btn {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
  }
  
  .control-btn {
    width: 36px;
    height: 36px;
  }
  
  .zoom-slider {
    width: 85px;
  }
  
  .orchestra-floating-menu {
    right: 1rem;
    gap: 0;
  }

  .orchestra-floating-buttons.open > button:nth-child(1) {
    transform: translate(calc(-50% - 0px), calc(-50% - 95px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(2) {
    transform: translate(calc(-50% - 18px), calc(-50% - 190px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(3) {
    transform: translate(calc(-50% - 0px), calc(-50% + 95px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(4) {
    transform: translate(calc(-50% - 18px), calc(-50% + 190px)) scale(1) !important;
  }
  
  .orchestra-theme-btn,
  .orchestra-practice-btn,
  .orchestra-mixer-btn,
  .orchestra-language-btn {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
  }

  .orchestra-theme-btn i,
  .orchestra-practice-btn i,
  .orchestra-mixer-btn i {
    font-size: 1.45rem;
  }

  .orchestra-language-btn .flag-icon {
    width: 37px;
    height: 37px;
  }
  
  /* Focus Mode Tablet */
  body.focus-mode .instrument-selector-bar {
    padding: 0.6rem 1rem 0.8rem;
    gap: 1rem;
  }
  

  
  body.focus-mode .notation-viewer {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body.focus-mode .notation-viewer-container {
    padding-top: 110px !important;
  }
}

/* Desktop Small (1025px - 1366px) */
@media (min-width: 1025px) and (max-width: 1366px) {
  .player-container {
    max-width: 1280px;
    margin: 0 auto;
  }
  
  .instrument-selector-bar {
    padding: 0.8rem 1.2rem;
  }
  
  body.focus-mode .instrument-selector-bar {
    max-width: 95vw;
    padding: 0.7rem 1.5rem 0.9rem;
    gap: 1.2rem;
  }
  
  body.focus-mode .instrument-selector {
    flex-wrap: nowrap;
    gap: 0.6rem;
  }
  

  
  body.focus-mode .zoom-controls {
    gap: 0.5rem;
  }
}

/* Desktop Large (1367px+) */
@media (min-width: 1367px) {
  .player-container {
    max-width: 1600px;
    margin: 0 auto;
  }
  
  body.focus-mode .instrument-selector-bar {
    max-width: 85vw;
  }
}

/* Landscape Mobile (max-height: 500px) */
@media (max-height: 500px) and (orientation: landscape) {
  .song-info {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .song-info h1 {
    font-size: 1rem;
  }
  
  .song-info p {
    font-size: 0.7rem;
  }
  
  .instrument-selector-bar {
    padding: 0.4rem 0.6rem;
  }
  
  .instrument-btn {
    width: 38px;
    height: 38px;
  }
  
  .control-btn {
    width: 30px;
    height: 30px;
  }
  
  .orchestra-floating-menu {
    gap: 0;
  }

  .orchestra-floating-buttons.open > button:nth-child(1) {
    transform: translate(calc(-50% - 0px), calc(-50% - 70px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(2) {
    transform: translate(calc(-50% - 10px), calc(-50% - 140px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(3) {
    transform: translate(calc(-50% - 0px), calc(-50% + 70px)) scale(1) !important;
  }

  .orchestra-floating-buttons.open > button:nth-child(4) {
    transform: translate(calc(-50% - 10px), calc(-50% + 140px)) scale(1) !important;
  }
  
  .orchestra-theme-btn,
  .orchestra-practice-btn,
  .orchestra-mixer-btn,
  .orchestra-language-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .orchestra-theme-btn i,
  .orchestra-practice-btn i,
  .orchestra-mixer-btn i {
    font-size: 1.1rem;
  }

  .orchestra-language-btn .flag-icon {
    width: 28px;
    height: 28px;
  }
  

  
  body.focus-mode .instrument-selector-bar {
    padding: 0.3rem 0.5rem;
    gap: 0.5rem;
  }
  


  
  body.focus-mode .notation-viewer {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body.focus-mode .notation-viewer-container {
    padding-top: 70px !important;
    padding-bottom: 60px !important;
  }
}

/* Touch-specific optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .instrument-btn,
  .control-btn,
  .mode-btn,
  .tempo-btn,
  .preset-btn {
    min-width: 44px;
    min-height: 44px;
  }
  
  .sidebar-tab {
    min-height: 48px;
  }
  
  body.focus-mode .control-bar-toggle {
    min-width: 48px;
    min-height: 48px;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .instrument-selector-bar,
  .notation-controls,
  .orchestra-floating-menu button {
    border-width: 1.5px;
  }
  
  body.focus-mode .instrument-selector-bar {
    border-width: 2px;
  }
}

/* ========================================
   RTL LANGUAGE SUPPORT (ARABIC)
======================================== */

/* Language Toggle Button (matches theme toggle style) */
.language-toggle {
  position: fixed;
  top: 4.5rem;
  right: 1rem;
  z-index: 10001;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.9), rgba(255, 140, 107, 0.9));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.4);
  backdrop-filter: blur(10px);
}

.language-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 25px rgba(255, 107, 107, 0.5);
}

.language-toggle:active {
  transform: translateY(0) scale(0.98);
}

.language-toggle .lang-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

/* Show graduation cap icon with OFF label when not active */
.language-toggle .lang-label {
  position: relative;
  display: none;
}

.language-toggle .lang-label[style*="display: block"] {
  display: block !important;
}

/* RTL Layout */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] body {
  direction: rtl;
}
#zoomOut,#zoomIn{
  margin-left: 5px;
}
/* Exclude nav-container and all its children from RTL direction */
[dir="rtl"] .nav-container,
[dir="rtl"] .nav-container * {
  direction: ltr;
  text-align: left;
}

/* Hero section */
[dir="rtl"] .hero-features {
  direction: rtl;
}

/* Language toggle position for RTL */
[dir="rtl"] .language-toggle {
  right: auto;
  left: 1rem;
}

/* Song cards */
[dir="rtl"] .song-meta {
  flex-direction: row-reverse;
}

[dir="rtl"] .song-tags {
  flex-direction: row-reverse;
}

/* Player controls */
[dir="rtl"] .player-top-bar {
  flex-direction: row-reverse;
}

[dir="rtl"] .back-link {
  margin-right: 0;
  margin-left: auto;
}

[dir="rtl"] .back-link i {
  margin-right: 0;
  margin-left: 0.5rem;
  transform: scaleX(-1);
}

/* Keep playback controls LTR in Arabic */

/* Side drawer */
[dir="rtl"] .side-drawer {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

[dir="rtl"] .side-drawer.open {
  transform: translateX(0);
}

[dir="rtl"] .drawer-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .drawer-tabs {
  flex-direction: row-reverse;
}

[dir="rtl"] .drawer-close {
  left: auto;
  right: 1rem;
}

/* Keep mixer and practice controls in LTR for consistency */
[dir="rtl"] .instrument-info {
  text-align: right;
}

/* Force playback bar to stay LTR */
[dir="rtl"] .playback-bar-fixed {
  direction: ltr;
}

/* Force all volume sliders and instrument tracks to stay LTR */
[dir="rtl"] .instrument-track {
  direction: ltr;
}

[dir="rtl"] .volume-slider,
[dir="rtl"] input[type="range"] {
  direction: ltr;
}

[dir="rtl"] .practice-slider {
  direction: ltr;
}

[dir="rtl"] .seek-slider-main {
  direction: ltr;
}

/* Loop controls */
[dir="rtl"] .loop-controls {
  flex-direction: row-reverse;
}

/* Footer */
[dir="rtl"] .footer-content {
  text-align: center;
}

[dir="rtl"] .footer-social {
  flex-direction: row-reverse;
}

/* Icons that should flip for RTL */
[dir="rtl"] .fa-arrow-left,
[dir="rtl"] .fa-arrow-right {
  transform: scaleX(-1);
}

/* Text alignment for RTL */
[dir="rtl"] .hero-subtitle,
[dir="rtl"] .section-header p,
[dir="rtl"] .song-info h3,
[dir="rtl"] .song-info p {
  text-align: right;
}

/* Feature tags */
[dir="rtl"] .feature-tag {
  flex-direction: row-reverse;
}

/* Ensure proper spacing for RTL */
[dir="rtl"] .nav-links li {
  margin-left: 0;
  margin-right: 2rem;
}

[dir="rtl"] .nav-links li:last-child {
  margin-right: 0;
}

/* Sidebar RTL fixes */
[dir="rtl"] #toolsSidebar .sidebar-header {
  flex-direction: row-reverse;
}

[dir="rtl"] #toolsSidebar .sidebar-tabs {
  flex-direction: row-reverse;
}

/* ========================================
   RESPONSIVE NAVIGATION - MOBILE (max-width: 768px)
======================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    cursor: pointer;
    z-index: 10001;
  }

  .hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  .mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    right: 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1rem;
    z-index: 10000;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    min-width: 200px;
  }

  .mobile-nav.show {
    display: block;
    animation: slideDown 0.3s ease;
  }

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

  .mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .mobile-nav a {
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: block;
  }

  .mobile-nav a:hover {
    background-color: rgba(255, 110, 199, 0.15);
    transform: translateX(5px);
  }

  .mobile-nav a.active {
    background: linear-gradient(135deg, rgba(255, 110, 199, 0.25), rgba(255, 179, 71, 0.25));
    font-weight: 700;
  }
}

/* ========================================
   RESPONSIVE PLAYBACK - MOBILE (max-width: 768px)
======================================== */
@media (max-width: 768px) {
  /* Playback bar full width rectangle at bottom */
  .playback-bar-fixed {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    transform: none;
    border-radius: 0;
  }

  .playback-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(255, 110, 199, 0.3);
    justify-content: center;
    align-items: center;
  }

  /* Reduce sizes */
  .play-btn-main {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
    flex-shrink: 0;
  }

  .play-btn-main::before {
    inset: 7px;
  }

  .play-btn-main::after {
    inset: 17px;
  }

  .stop-btn-main {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .time-display-main {
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
    min-width: 85px;
    flex-shrink: 0;
  }

  /* Progress always full width on its own line */
  .progress-container {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 35px;
    flex-basis: 100%;
    order: 10;
  }

  .seek-slider-main {
    height: 8px;
  }

  .seek-slider-main:hover {
    height: 9px;
  }

  .seek-slider-main::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }

  .seek-slider-main::-moz-range-thumb {
    width: 20px;
    height: 20px;
  }
}

/* ========================================
   UTILITY CLASSES FOR REMOVED INLINE STYLES
======================================== */

/* Loading and empty state messages */
.loading-message {
  text-align: center;
  color: var(--text-tertiary);
}

.no-markers {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.error-detail {
  color: var(--text-tertiary);
  margin-top: 0.5rem;
  display: block;
}

/* PDF Modal Styles */
.pdf-modal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  padding-right: 3.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.pdf-icon {
  color: #ff6b6b;
}

.pdf-title {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-download {
  padding: 0.4rem 0.8rem;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  color: white;
  transition: all 0.3s ease;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 110, 199, 0.3);
}

.pdf-frame-container {
  flex: 1;
}

.pdf-unsupported {
  color: var(--text-secondary);
  padding: 1rem;
}

.pdf-link {
  color: #ff6b6b;
  text-decoration: underline;
}

.pdf-link:hover {
  color: #ff8888;
}

/* Error Page Styles */
.error-message {
  padding: 4rem;
  text-align: center;
}

.error-icon {
  font-size: 4rem;
  color: #e74c3c;
  margin-bottom: 1rem;
  display: block;
}

.error-title {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.error-text {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.error-back-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #ff6ec7, #ffb347);
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.error-back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 110, 199, 0.4);
}

/* Light theme adjustments for new classes */
[data-theme="light"] .pdf-icon {
  color: #8b5cf6;
}

[data-theme="light"] .error-icon {
  color: #8b5cf6;
}

[data-theme="light"] .btn-download {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

[data-theme="light"] .error-back-btn {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

