/* ===== CSS VARIABLES ===== */
:root {
  /* Background colors */
  --bg-dark: #121212;
  --bg-panel: #1e1e1e;
  --bg-header: #1a1a1a;
  --bg-input: #111827;
  --bg-control: #1f2937;
  --bg-footer: #171717;

  /* Accent colors */
  --accent: #3b82f6;
  --accent-glow: rgba(59, 130, 246, 0.5);
  --accent-light: #60a5fa;

  /* Text colors */
  --text-main: #e0e0e0;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  /* Border colors */
  --border-color: #374151;
  --border-hover: #4b5563;

  /* Status colors */
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;
  --color-danger: #dc2626;

  /* Track colors (for step buttons) */
  --track-red: #ef4444;
  --track-blue: #3b82f6;
  --track-green: #10b981;
  --track-yellow: #eab308;
  --track-purple: #a855f7;
  --track-pink: #ec4899;
  --track-orange: #f97316;
  --track-cyan: #06b6d4;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;

  /* Layout */
  --header-height: 60px;
  --footer-height: auto;
  --track-header-width: 200px;
  --grid-cell-size: 48px;
}

/* ===== THEME VARIANTS ===== */
/* Darker Theme */
[data-theme="darker"] {
  --bg-dark: #09090b; /* near-black with blue hint */
  --bg-panel: #121214;
  --bg-header: #0e0e10;

  --accent: #3b82f6; /* Tailwind blue-500 */
  --accent-glow: rgba(59, 130, 246, 0.45);

  --text-main: #f9fafb;
  --text-secondary: #a1a1aa;

  --border-color: #27272a;
}

/* Cyberpunk Theme - WCAG AA Contrast Fixed */
[data-theme="cyberpunk"] {
  --bg-dark: #0b0016;
  --bg-panel: #16002b;
  --bg-header: #120022;

  --accent: #ff2f92; /* neon magenta */
  --accent-glow: rgba(255, 47, 146, 0.65);

  --text-main: #fff1ff;
  --text-secondary: #f0abfc;

  --border-color: #8b5cf6; /* electric purple */
}

/* Neon Theme */
[data-theme="neon"] {
  --bg-dark: #050b1e;
  --bg-panel: #0a1230;
  --bg-header: #070f24;

  --accent: #22d3ee; /* cyan-400 */
  --accent-glow: rgba(34, 211, 238, 0.7);

  --text-main: #e6fdff;
  --text-secondary: #7dd3fc;

  --border-color: #0891b2;
}

/* Ocean Theme */
[data-theme="ocean"] {
  --bg-dark: #001427;
  --bg-panel: #002b44;
  --bg-header: #001f33;

  --accent: #38bdf8; /* sky blue */
  --accent-glow: rgba(56, 189, 248, 0.5);

  --text-main: #e0f7ff;
  --text-secondary: #94d2bd;

  --border-color: #0ea5a4;
}

/* Sunset Theme */
[data-theme="sunset"] {
  --bg-dark: #140b0b;
  --bg-panel: #2a1414;
  --bg-header: #1f1010;

  --accent: #fb5607; /* sunset orange */
  --accent-glow: rgba(251, 86, 7, 0.55);

  --text-main: #fff1e6;
  --text-secondary: #ffb5a7;

  --border-color: #9d174d;
}

/* Mobile adjustments */
@media (min-width: 640px) {
  :root {
    --header-height: 64px;
    --track-header-width: 240px;
    --grid-cell-size: 56px;
  }
}

@media (min-width: 1024px) {
  :root {
    --track-header-width: 280px;
    --grid-cell-size: 64px;
  }
}

/* ===== BACKDROP-FILTER FALLBACK ===== */
/* For browsers that don't support backdrop-filter, use solid backgrounds */
@supports not (backdrop-filter: blur(1px)) {
  .header-container,
  .confirm-modal-overlay,
  .visualizer-mode-btn,
  .color-picker-popup,
  #shortcutsModal > div,
  #pianoRollModal,
  #pianoRollModal > div:first-child,
  .tooltip,
  .actions-menu,
  .pattern-menu,
  .toast,
  .mobile-menu-backdrop {
    background: var(--bg-panel) !important;
  }
}

/* ===== BASE STYLES ===== */
* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family:
    "Inter",
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    "Roboto",
    "Helvetica Neue",
    Arial,
    sans-serif;
  overflow: hidden;
  user-select: none;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Better touch scrolling on mobile */
  -webkit-overflow-scrolling: touch;
  /* Prevent pull-to-refresh on mobile */
  overscroll-behavior-y: contain;
  /* Improve tap responsiveness on mobile */
  touch-action: manipulation;
}

/* ===== SKIP LINK (Accessibility) ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

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

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

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.loading-text {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.loading-subtext {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* ===== NETWORK STATUS INDICATOR ===== */
.network-status {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-warning);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  pointer-events: none;
}

.network-status.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.network-status.online {
  background: var(--color-success);
}

/* ===== ARIA ANNOUNCER (Screen Reader Only) ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== CUSTOM CONFIRMATION MODAL ===== */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.confirm-modal-overlay.open {
  opacity: 1;
}

.confirm-modal-content {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95) translateY(-10px);
  transition: transform 0.2s ease;
}

.confirm-modal-overlay.open .confirm-modal-content {
  transform: scale(1) translateY(0);
}

.confirm-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.75rem;
}

.confirm-modal-message {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.confirm-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.confirm-modal-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.confirm-modal-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.confirm-modal-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.confirm-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
}

.confirm-modal-confirm {
  color: #ffffff;
}

/* ===== INPUT VALIDATION STATES ===== */
.control-input.invalid {
  border-color: var(--color-error) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.control-input.valid {
  border-color: var(--color-success) !important;
}

.input-error-message {
  position: absolute;
  bottom: -1.25rem;
  left: 0;
  font-size: 0.6875rem;
  color: var(--color-error);
  white-space: nowrap;
}

/* Control group with validation support */
.control-group-validated {
  position: relative;
  padding-bottom: 1.25rem;
}

/* ===== VISIBLE LABELS FOR CONTROLS ===== */
.control-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
  display: block;
}

@media (max-width: 767px) {
  .control-label:not(.mobile-visible) {
    display: none;
  }
}

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

@media (min-width: 768px) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
}

::-webkit-scrollbar-track {
  background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

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

/* ===== HEADER STYLES ===== */
.header-container {
  min-height: var(--header-height);
  padding: var(--spacing-md) var(--spacing-lg);
  background: rgba(23, 23, 23, 0.8) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.header-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: var(--spacing-md) var(--spacing-lg);
  align-items: center;
}

/* Back to Home Button */
.back-to-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.back-to-home-btn:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.back-to-home-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Mobile: Compact header with only essential controls */
@media (max-width: 767px) {
  .header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    min-height: 60px;
  }

  /* Hide non-essential controls on mobile - they're in hamburger menu */
  .recording-controls-group,
  .action-buttons-group,
  .control-group:has(#patternSelect),
  .visualizer-container {
    display: none !important;
  }

  /* Mobile menu button - first position */
  .mobile-menu-btn {
    order: 1;
    flex-shrink: 0;
  }

  /* Logo section - second position */
  .logo-section {
    order: 2;
    flex: 0 0 auto;
    justify-content: flex-start;
    text-align: left;
    margin-right: auto;
  }

  .logo-section img {
    height: 32px;
    margin-right: 0;
  }

  .logo-section h1 {
    display: none; /* Hide title text on all mobile screens */
  }

  /* Playback controls - right position */
  .playback-controls-group {
    order: 3;
    flex-wrap: nowrap;
    justify-content: flex-end;
    padding: 0;
    gap: var(--spacing-xs);
    background: transparent;
    flex-shrink: 0;
  }

  /* Transport buttons - compact */
  .btn-transport {
    min-height: 44px;
    min-width: 44px;
    padding: 10px;
    font-size: 16px;
  }

  /* BPM control - compact */
  .control-group {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 70px;
  }

  .control-label {
    font-size: 9px;
    min-width: auto;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .control-input {
    font-size: 18px;
    padding: 6px 8px;
    width: 60px !important;
    text-align: center;
    font-weight: 700;
    border-radius: 6px;
  }

  /* Hide swing and master volume on mobile header */
  .control-group:has(#swingInput),
  .control-group:has(#masterVol) {
    display: none !important;
  }

  /* Track controls optimization for mobile */
  .track-header-item {
    min-height: 140px;
    padding: var(--spacing-sm);
  }

  /* Track name and controls */
  .track-name {
    font-size: 14px;
    font-weight: 600;
  }

  /* Mute/Solo buttons - larger touch targets */
  .track-header-item button {
    min-width: 36px;
    min-height: 36px;
    font-size: 12px;
    padding: 8px;
  }

  /* Volume and effect sliders - easier to use on mobile */
  input[type="range"] {
    min-height: 36px;
    cursor: pointer;
  }

  /* Grid cells - larger for touch */
  .grid-cell {
    min-width: 40px;
    min-height: 40px;
  }

  /* Footer effects - stack vertically */
  .footer-content {
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
  }

  .effect-panel {
    width: 100%;
    max-width: none;
  }

  /* Shortcuts overlay - hidden on mobile (available in hamburger menu) */
  .shortcuts-overlay {
    display: none !important;
  }

  /* Theme menu - full width on mobile */
  .theme-menu {
    left: 0;
    right: 0;
    width: calc(100% - 20px);
    margin: 0 10px;
  }

  /* Modal dialogs - full screen on mobile */
  #shortcutsModal > div,
  #pianoRollModal > div {
    width: 95vw;
    max-width: 95vw;
    height: 90vh;
    max-height: 90vh;
    margin: 5vh auto;
  }

  /* Piano roll modal - full screen on mobile */
  #pianoRollModal {
    padding: 0;
  }

  #pianoRollModal .h-12 {
    height: 48px; /* Larger header for easier touch */
  }

  #pianoRollModal #pianoKeys {
    width: 45px; /* Narrower keys on mobile */
    font-size: 9px;
  }

  #pianoRollModal .piano-grid-cell {
    min-height: 36px; /* Larger touch targets for better mobile UX */
    min-width: 44px; /* WCAG 2.5.5 minimum touch target */
  }

  #pianoRollModal .piano-header-cell {
    min-width: 44px;
    font-size: 11px;
  }

  /* Piano roll - optimize for mobile */
  .piano-roll-container {
    flex-direction: column;
  }

  .piano-keys {
    width: 100%;
    height: 60px;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .note-grid {
    width: 100%;
    height: calc(100% - 60px);
  }
}

/* Tablet: 2 rows */
@media (min-width: 768px) and (max-width: 1279px) {
  .header-content {
    grid-template-columns: auto 1fr auto auto;
    gap: var(--spacing-md);
  }
}

/* Large tablets: Show compact visualizer */
@media (min-width: 1024px) and (max-width: 1279px) {
  .header-content {
    grid-template-columns: auto 1fr auto auto auto;
  }

  .visualizer-container {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
  }
}

/* Desktop: Single row with proper spacing */
@media (min-width: 1280px) {
  .header-content {
    grid-template-columns: auto auto 1fr auto auto auto;
    grid-template-rows: auto;
    gap: var(--spacing-lg);
  }
}

.logo-section {
  grid-column: 1;
  grid-row: 1;
}

/* Grouped sections */
.playback-controls-group,
.recording-controls-group,
.action-buttons-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

@media (min-width: 768px) {
  .playback-controls-group,
  .recording-controls-group,
  .action-buttons-group {
    flex-wrap: nowrap;
    padding: var(--spacing-sm) var(--spacing-md);
  }
}

/* Visual separators between groups */
.recording-controls-group::before,
.action-buttons-group::before {
  content: "";
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
  margin-right: var(--spacing-sm);
}

@media (max-width: 1279px) {
  .recording-controls-group::before,
  .action-buttons-group::before {
    display: none;
  }
}

/* Grid positioning for groups */
@media (min-width: 1280px) {
  .playback-controls-group {
    grid-column: 2;
    grid-row: 1;
  }

  .visualizer-container {
    grid-column: 3;
    grid-row: 1;
    justify-self: center;
  }

  .recording-controls-group {
    grid-column: 4;
    grid-row: 1;
  }

  .control-group:has(#patternSelect) {
    grid-column: 5;
    grid-row: 1;
  }

  .action-buttons-group {
    grid-column: 6;
    grid-row: 1;
    justify-self: end;
  }
}

.transport-controls {
  display: flex;
  gap: var(--spacing-sm);
}

.btn-transport {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0.25rem 0.75rem rgba(0, 0, 0, 0.3),
    0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-transport::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.btn-transport:hover::before {
  width: 100%;
  height: 100%;
}

.btn-transport:hover {
  transform: scale(1.1);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 30px currentColor,
    0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .btn-transport {
    width: 2.75rem;
    height: 2.75rem;
  }
}

.btn-transport:active {
  transform: scale(0.95);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.3),
    0 0 15px currentColor;
}

/* Specific button glow colors */
.btn-transport.bg-green-600:hover {
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(34, 197, 94, 0.6),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-transport.bg-gray-700:hover {
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(156, 163, 175, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.control-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: var(--bg-control);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: var(--spacing-sm) var(--spacing-md);
  transition: border-color 0.2s ease;
}

.control-group:hover {
  border-color: var(--border-hover);
}

.control-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.control-input {
  background: var(--bg-input);
  color: var(--text-main);
  text-align: center;
  font-family: monospace;
  font-weight: 600;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  outline: none;
  padding: 0.25rem 0.5rem;
  transition: all 0.2s ease;
}

.control-input:hover {
  border-color: var(--border-hover);
  background: var(--bg-control);
}

.control-input:focus {
  border-color: var(--accent);
  background: var(--bg-control);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

/* Hide number input spinners */
.control-input[type="number"]::-webkit-inner-spin-button,
.control-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.control-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.visualizer-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.visualizer {
  /* Responsive canvas sizing */
  width: 200px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  border: 2px solid var(--accent);
  box-shadow:
    0 0 30px var(--accent-glow),
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  opacity: 1;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Larger visualizer on xl screens */
@media (min-width: 1280px) {
  .visualizer {
    width: 320px;
    height: 80px;
  }
}

.visualizer:hover {
  border-color: var(--accent);
  box-shadow:
    0 0 40px var(--accent-glow),
    0 6px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: scale(1.03);
}

.visualizer-mode-btn {
  background: rgba(31, 41, 55, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.visualizer-mode-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent);
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* ===== MAIN WORKSPACE ===== */
.main-workspace {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  flex-direction: column;
}

@media (min-width: 768px) {
  .main-workspace {
    flex-direction: row;
  }
}

.track-headers-panel {
  width: 100%;
  max-height: 300px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  position: relative;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  /* Smooth horizontal scrolling on mobile */
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

/* Mobile: Horizontal scroll for track headers */
@media (max-width: 767px) {
  .track-headers-panel {
    max-height: 280px;
    padding: var(--spacing-sm) var(--spacing-xs);
  }

  .track-headers-panel::-webkit-scrollbar {
    height: 6px;
  }

  .track-headers-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
  }

  .track-headers-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
  }

  .track-headers-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
  }
}

@media (min-width: 768px) {
  .track-headers-panel {
    width: var(--track-header-width);
    max-height: none;
    border-right: 1px solid var(--border-color);
    border-bottom: none;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 0;
    padding: 0;
  }
}

.sequencer-panel {
  flex: 1;
  background: var(--bg-dark);
  overflow: auto;
  position: relative;
  /* Smooth scrolling on mobile */
  -webkit-overflow-scrolling: touch;
  /* Better scroll performance */
  will-change: scroll-position;
  min-height: 0; /* Important for flex children */
}

/* Mobile: Hide desktop sequencer grid */
@media (max-width: 767px) {
  .sequencer-panel {
    /* Hide desktop sequencer on mobile - use integrated track layout instead */
    display: none !important;
  }

  .sequencer-panel::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  .sequencer-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }

  .sequencer-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
  }

  .sequencer-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
  }
}

.grid-container {
  width: 100%;
  position: relative;
  padding: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Mobile: Better grid container */
@media (max-width: 767px) {
  .grid-container {
    padding: var(--spacing-xs);
  }
}

/* ===== SEQUENCER GRID ===== */
.step-btn {
  transition: all 0.1s;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  position: relative;
}

.step-btn:hover {
  filter: brightness(1.2);
}

.step-btn:active {
  transform: scale(0.9);
}

.step-btn.active {
  box-shadow: 0 0 8px var(--accent-glow);
}

.current-step {
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

.grid-col {
  min-width: var(--grid-cell-size);
  min-height: var(--grid-cell-size);
  flex: 1;
  max-width: 120px; /* Prevent cells from becoming too large on very wide screens */
}

/* Step number labels */
.step-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  line-height: 1;
  z-index: 10;
}

@media (min-width: 768px) {
  .step-number {
    font-size: 11px;
  }
}

/* Step number when displayed with note */
.step-number-with-note {
  top: 2px;
  left: 2px;
  transform: none;
  font-size: 7px;
  color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 768px) {
  .step-number-with-note {
    font-size: 8px;
  }
}

/* Note text styling */
.note-text {
  position: relative;
  z-index: 5;
}

.track-header-item {
  min-height: 150px;
  min-width: 240px;
  max-width: 280px;
  width: 240px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  scroll-snap-align: start;
  position: relative;
  background: var(--bg-header);
  border-radius: 8px;
  padding: var(--spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile: Optimize track header cards */
@media (max-width: 767px) {
  .track-header-item {
    min-height: 260px;
    min-width: 200px;
    width: 200px;
    padding: var(--spacing-sm);
  }
}

@media (min-width: 768px) {
  .track-header-item {
    min-height: 160px;
    min-width: auto;
    max-width: none;
    width: 100%;
    flex-shrink: 1;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
  }
}

/* Track color accent */
.track-header-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--track-color, var(--accent));
  border-radius: 4px 0 0 4px;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.track-header-item:hover::before {
  opacity: 1;
  width: 6px;
}

/* Track color picker button */
.track-color-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: var(--track-color, var(--accent));
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.track-color-btn:hover {
  transform: scale(1.15);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.4),
    0 0 20px var(--track-color, var(--accent));
}

.track-color-btn input[type="color"] {
  opacity: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Color picker popup */
.color-picker-popup {
  position: absolute;
  top: 40px;
  right: 8px;
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 12px;
  padding: 12px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.1) inset;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
  display: none;
  animation: slideDown 0.2s ease-out;
}

.color-picker-popup.active {
  display: block;
}

.color-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.color-preset {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.color-preset:hover {
  transform: scale(1.15);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 15px currentColor;
}

.color-preset.active::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.track-row {
  min-height: 150px;
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
}

@media (min-width: 768px) {
  .track-row {
    min-height: 160px;
  }
}

/* ===== FX SEND SLIDERS ===== */
.fx-send-slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  height: 6px;
}

.fx-send-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: currentColor;
  cursor: pointer;
  margin-top: -4px;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.fx-send-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.fx-send-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  background: #374151;
  border-radius: 2px;
}

.fx-send-slider::-moz-range-thumb {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: currentColor;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.fx-send-slider::-moz-range-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.fx-send-slider::-moz-range-track {
  width: 100%;
  height: 4px;
  background: #374151;
  border-radius: 2px;
}

/* Color variants for FX sliders */
.fx-send-slider.text-blue-400::-webkit-slider-thumb {
  background: #60a5fa;
}

.fx-send-slider.text-purple-400::-webkit-slider-thumb {
  background: #c084fc;
}

.fx-send-slider.text-blue-400::-moz-range-thumb {
  background: #60a5fa;
}

.fx-send-slider.text-purple-400::-moz-range-thumb {
  background: #c084fc;
}

/* ===== FOOTER STYLES ===== */
.footer-container {
  background: var(--bg-footer);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: var(--spacing-md);
  gap: var(--spacing-md);
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
    padding: var(--spacing-lg);
  }
}

.effects-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  flex: 1;
}

@media (min-width: 640px) {
  .effects-section {
    flex-direction: row;
    gap: var(--spacing-lg);
  }
}

.effect-group {
  flex: 1;
  min-width: 0;
}

.effect-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
}

.effect-controls {
  background: #1f2937;
  border-radius: 0.5rem;
  padding: var(--spacing-md);
  display: flex;
  gap: var(--spacing-md);
}

.effect-control {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
}

.effect-label {
  font-size: 0.625rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.effect-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  min-height: 44px;
  cursor: pointer;
  touch-action: manipulation;
}

.effect-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  margin-top: -10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

.effect-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.effect-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
}

.effect-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: #444;
  border-radius: 3px;
}

.effect-slider::-moz-range-thumb {
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

.effect-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.effect-slider::-moz-range-thumb:active {
  transform: scale(1.15);
}

.effect-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  background: #444;
  border-radius: 3px;
}

/* Mobile-specific enhancements for effect sliders */
@media (max-width: 639px) {
  .effect-slider::-webkit-slider-thumb {
    height: 28px;
    width: 28px;
    margin-top: -11px;
  }

  .effect-slider::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
  }

  .effect-slider::-moz-range-thumb {
    height: 28px;
    width: 28px;
  }

  .effect-slider::-moz-range-track {
    height: 8px;
    border-radius: 4px;
  }

  .effect-controls {
    padding: var(--spacing-lg);
    gap: var(--spacing-lg);
  }

  .effect-label {
    font-size: 0.75rem;
    margin-bottom: var(--spacing-xs);
  }

  .effect-title {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
  }
}

.info-section {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  padding: var(--spacing-sm) 0;
}

@media (min-width: 768px) {
  .info-section {
    min-width: 200px;
    border-left: 1px solid var(--border-color);
    padding-left: var(--spacing-lg);
  }
}

/* ===== PIANO ROLL ===== */
.piano-grid-cell {
  border-right: 1px solid #333;
  border-bottom: 1px solid #333;
  cursor: pointer;
  min-height: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive piano grid cell widths - override Tailwind w-16 on mobile */
@media (max-width: 767px) {
  #pianoGrid .w-16,
  #pianoGrid .piano-grid-cell.w-16 {
    width: 44px !important; /* WCAG 2.5.5 minimum touch target */
    min-width: 44px !important;
  }

  .piano-header-cell.w-16 {
    width: 44px !important;
    min-width: 44px !important;
  }
}

.piano-grid-cell:hover {
  background-color: #2a2a2a;
}

.piano-grid-cell.active-note {
  background-color: var(--accent);
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Piano roll step numbers - more specific selector to override general .step-number */
.piano-grid-cell .piano-step-number,
.piano-grid-cell .step-number {
  position: static !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
  pointer-events: none;
  user-select: none;
  z-index: 10;
  line-height: 1;
}

@media (min-width: 768px) {
  .piano-grid-cell .piano-step-number,
  .piano-grid-cell .step-number {
    font-size: 13px;
  }
}

.piano-grid-cell.active-note .piano-step-number,
.piano-grid-cell.active-note .step-number {
  color: rgba(255, 255, 255, 1);
  font-weight: 800;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

/* Piano roll header cells */
.piano-header-cell {
  background: linear-gradient(to bottom, #374151, #1f2937);
  border-bottom: 2px solid #4b5563;
  user-select: none;
  position: relative;
}

.piano-header-cell::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.piano-key.black {
  background: #000;
  color: #fff;
  height: 60%;
  z-index: 10;
}

/* ===== SLIDERS ===== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  margin-top: -4px;
}

input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  background: #444;
  border-radius: 2px;
}

input[type="range"]::-moz-range-thumb {
  height: 12px;
  width: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

input[type="range"]::-moz-range-track {
  width: 100%;
  height: 4px;
  background: #444;
  border-radius: 2px;
}

.knob-container {
  position: relative;
  display: inline-block;
}

/* ===== MODAL TRANSITIONS ===== */
.modal {
  transition:
    opacity 0.3s ease-in-out,
    transform 0.3s ease-in-out;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.95);
}

.modal.open {
  pointer-events: all;
  opacity: 1;
  transform: scale(1);
}

/* Glassmorphism for modals */
#shortcutsModal > div {
  background: rgba(17, 24, 39, 0.85) !important;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#pianoRollModal {
  background: rgba(0, 0, 0, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

#pianoRollModal > div:first-child {
  background: rgba(31, 41, 55, 0.9) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

/* ===== SCREEN READER ONLY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== FOCUS VISIBLE ===== */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== TOOLTIPS ===== */
.tooltip {
  position: absolute;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  color: #f3f4f6;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transform: translateY(5px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: rgba(17, 24, 39, 0.95);
}

/* Tooltip variants */
.tooltip.tooltip-top {
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-5px);
}

.tooltip.tooltip-top.show {
  transform: translateX(-50%) translateY(0);
}

.tooltip.tooltip-bottom {
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
}

.tooltip.tooltip-bottom.show {
  transform: translateX(-50%) translateY(0);
}

.tooltip.tooltip-bottom::before {
  bottom: auto;
  top: -12px;
  border-bottom-color: transparent;
  border-top-color: rgba(17, 24, 39, 0.95);
}

.tooltip.tooltip-left {
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-5px);
}

.tooltip.tooltip-left.show {
  transform: translateY(-50%) translateX(0);
}

.tooltip.tooltip-left::before {
  left: auto;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  border-bottom-color: transparent;
  border-left-color: rgba(17, 24, 39, 0.95);
}

.tooltip.tooltip-right {
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(5px);
}

.tooltip.tooltip-right.show {
  transform: translateY(-50%) translateX(0);
}

.tooltip.tooltip-right::before {
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  border-bottom-color: transparent;
  border-right-color: rgba(17, 24, 39, 0.95);
}

/* Tooltip with keyboard shortcut */
.tooltip-shortcut {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  color: #9ca3af;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced button hover states */
button:not(.step-btn):not(.btn-transport):not(.theme-option):not(.color-preset) {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

button:not(.step-btn):not(.btn-transport):not(.theme-option):not(.color-preset)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition:
    width 0.5s,
    height 0.5s;
}

button:not(.step-btn):not(.btn-transport):not(.theme-option):not(.color-preset):hover::after {
  width: 300px;
  height: 300px;
}

button:not(.step-btn):not(.btn-transport):not(.theme-option):not(.color-preset):hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 25px var(--accent-glow, rgba(59, 130, 246, 0.4)),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

button:not(.step-btn):not(.btn-transport):not(.theme-option):not(.color-preset):active {
  transform: translateY(0) scale(0.98);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 15px var(--accent-glow, rgba(59, 130, 246, 0.3));
}

/* Specific button color glows */
.bg-red-600:hover {
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(239, 68, 68, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.bg-purple-600:hover {
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(147, 51, 234, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.bg-blue-600:hover {
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(59, 130, 246, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.bg-yellow-600:hover {
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.4),
    0 0 25px rgba(234, 179, 8, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Enhanced slider hover states */
input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 15px var(--accent-glow);
}

input[type="range"]:hover::-moz-range-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* ===== ACTIONS MENU ===== */
.actions-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 12px;
  padding: 8px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 220px;
  max-width: 280px;
  z-index: 1001;
  animation: slideDown 0.2s ease-out;
}

.actions-menu.hidden {
  display: none;
}

.actions-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-weight: 500;
}

.actions-menu-item:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.actions-menu-item:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.actions-menu-item.btn-init {
  color: #60a5fa;
  font-weight: 600;
}

.actions-menu-item.btn-init:hover {
  background: rgba(96, 165, 250, 0.2);
}

.actions-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 6px 0;
}

.actions-menu-section {
  padding: 8px 0;
}

.actions-menu-section-title {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: 0.5px;
}

.theme-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 0 8px;
}

.theme-option-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.theme-option-compact:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.theme-option-compact.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #60a5fa;
}

.theme-option-compact.active::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 4px;
  right: 4px;
  color: #60a5fa;
  font-size: 10px;
}

.theme-preview-compact {
  width: 100%;
  height: 32px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-name-compact {
  font-size: 11px;
  font-weight: 600;
  color: #e5e7eb;
}

/* ===== THEME SWITCHER ===== */
.theme-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 12px;
  padding: 8px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 180px;
  z-index: 1001;
  animation: slideDown 0.2s ease-out;
}

.theme-menu.hidden {
  display: none;
}

.theme-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.theme-option:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.theme-option.active {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.theme-preview {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-check {
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 12px;
}

.theme-option.active .theme-check {
  opacity: 1;
}

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

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 400px;
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  :root {
    --header-height: 56px;
    --spacing-xs: 4px;
    --spacing-sm: 6px;
    --spacing-md: 10px;
    --spacing-lg: 14px;
  }

  /* Header - more compact */
  .header-container {
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  /* Logo - smaller on very small screens */
  .logo-section img {
    height: 28px;
  }

  .logo-section span {
    font-size: 16px;
  }

  /* Buttons - slightly smaller but still touch-friendly */
  .btn-transport,
  button {
    min-height: 40px;
    min-width: 40px;
    padding: 10px 12px;
    font-size: 13px;
  }

  /* Control inputs */
  .control-input {
    font-size: 13px;
    padding: 6px 10px;
    width: 50px;
  }

  /* Hide less critical elements on very small screens */
  .control-group:has(#swingInput) {
    display: none !important;
  }

  /* Track headers - more compact */
  .track-header-item {
    min-height: 120px;
    padding: var(--spacing-xs);
  }

  /* Grid cells - minimum viable size */
  .grid-cell {
    min-width: 36px;
    min-height: 36px;
  }

  /* Footer - more compact */
  .footer-content {
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
  }

  .effect-panel {
    padding: var(--spacing-sm);
  }

  /* Shortcuts overlay - hidden on mobile (available in hamburger menu) */
  .shortcuts-overlay {
    display: none !important;
  }

  /* Mobile track layout improvements */
  .mobile-track-header {
    min-width: 140px;
    max-width: 140px;
    padding: 6px 8px;
  }

  .track-name-text {
    max-width: 65px;
  }

  .mobile-step-btn {
    min-width: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* Very small screens (< 360px) - ultra compact mode */
@media (max-width: 359px) {
  :root {
    --header-height: 52px;
    --spacing-xs: 3px;
    --spacing-sm: 5px;
    --spacing-md: 8px;
    --spacing-lg: 12px;
  }

  /* Header - ultra compact */
  .header-container {
    padding: var(--spacing-xs) var(--spacing-xs);
  }

  /* Logo - smallest on very tiny screens */
  .logo-section img {
    height: 24px;
  }

  /* Mobile menu button - smaller */
  .mobile-menu-btn {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
  }

  /* Transport buttons - minimum size */
  .btn-transport {
    width: 36px;
    height: 36px;
  }

  /* BPM control - compact */
  .control-group:has(#bpmInput) .control-label {
    display: none;
  }

  #bpmInput {
    width: 48px;
    font-size: 12px;
  }

  /* Mobile track layout - ultra compact */
  .mobile-track-header {
    min-width: 120px;
    max-width: 120px;
    padding: 4px 6px;
    gap: 4px;
  }

  .track-name-text {
    max-width: 50px;
    font-size: 11px;
  }

  .mobile-mute-btn,
  .mobile-solo-btn {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.625rem;
  }

  .mobile-step-btn {
    min-width: 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.375rem;
  }

  /* Toast notifications - full width on tiny screens */
  .toast-container {
    left: 5px;
    right: 5px;
  }

  .toast {
    padding: 12px 14px;
    font-size: 13px;
  }

  /* Footer - ultra compact */
  .footer-content {
    padding: var(--spacing-xs);
    gap: var(--spacing-xs);
  }

  .effect-panel {
    padding: var(--spacing-xs);
  }

  .effect-label {
    font-size: 10px;
  }
}

@media (max-width: 640px) {
  .toast-container {
    top: 70px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

.toast {
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: all;
  animation: toastSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: right center;
  min-width: 280px;
}

.toast.toast-exit {
  animation: toastSlideOut 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.toast-message {
  font-size: 13px;
  color: #d1d5db;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
  flex-shrink: 0;
}

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

/* Toast variants */
.toast.toast-success {
  border-left: 3px solid var(--color-success);
}

.toast.toast-success .toast-icon {
  color: var(--color-success);
}

.toast.toast-error {
  border-left: 3px solid var(--color-error);
}

.toast.toast-error .toast-icon {
  color: var(--color-error);
}

.toast.toast-warning {
  border-left: 3px solid var(--color-warning);
}

.toast.toast-warning .toast-icon {
  color: var(--color-warning);
}

.toast.toast-info {
  border-left: 3px solid var(--color-info);
}

.toast.toast-info .toast-icon {
  color: var(--color-info);
}

/* Toast animations */
@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(100%) scale(0.8);
  }
}

/* ===== KEYBOARD SHORTCUTS OVERLAY ===== */
/* Hidden on all screens - shortcuts now available in Actions menu (desktop) and mobile menu */
.shortcuts-overlay {
  display: none !important;
}

.shortcuts-overlay.collapsed .shortcuts-overlay-content {
  max-height: 0;
  opacity: 0;
  padding: 0;
  margin: 0;
}

.shortcuts-overlay.collapsed .shortcuts-toggle-btn i {
  transform: rotate(-90deg);
}

.shortcuts-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  user-select: none;
}

.shortcuts-overlay-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.shortcuts-overlay-title {
  font-size: 14px;
  font-weight: 600;
  color: #f3f4f6;
  margin: 0;
  display: flex;
  align-items: center;
}

.shortcuts-toggle-btn {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.shortcuts-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f3f4f6;
}

.shortcuts-toggle-btn i {
  transition: transform 0.3s;
}

.shortcuts-overlay-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  transition: all 0.3s ease;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  transition: all 0.2s;
}

.shortcut-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(-2px);
}

.shortcut-item kbd {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: monospace;
  font-size: 11px;
  font-weight: 600;
  color: #e5e7eb;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.3);
  min-width: 28px;
  text-align: center;
  display: inline-block;
}

.shortcut-item span {
  font-size: 12px;
  color: #d1d5db;
  flex: 1;
  text-align: right;
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .shortcuts-overlay {
    display: none !important;
  }
}

/* ===== TOUCH IMPROVEMENTS ===== */
@media (hover: none) and (pointer: coarse) {
  .btn-transport {
    width: 48px;
    height: 48px;
  }

  .step-btn {
    min-width: 48px;
    min-height: 48px;
  }

  .control-group {
    padding: var(--spacing-md);
  }
}

/* ===== MOBILE HAMBURGER MENU ===== */
/* Mobile Menu Button */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn:active {
  transform: scale(0.95);
}

/* Mobile Menu Container */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 85vw); /* Fluid width for very small screens */
  max-width: 300px;
  background: var(--bg-panel);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  border-right: 1px solid var(--border-color);
}

.mobile-menu.open {
  transform: translateX(0);
}

/* Mobile Menu Content */
.mobile-menu-content {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

/* Mobile Menu Header */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Sections */
.mobile-menu-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.mobile-menu-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
  display: flex;
  align-items: center;
}

.mobile-menu-item {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

/* Mobile Menu Buttons */
.mobile-menu-button {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  margin-bottom: var(--spacing-xs);
}

.mobile-menu-button:hover {
  transform: translateX(4px);
  filter: brightness(1.1);
}

.mobile-menu-button:active {
  transform: translateX(4px) scale(0.98);
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-menu-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ===== MOBILE INTEGRATED TRACK LAYOUT ===== */
@media (max-width: 767px) {
  /* Track headers panel - vertical scroll */
  #trackHeaders {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
  }

  /* Mobile track row - horizontal layout */
  .mobile-track-row {
    display: flex;
    align-items: center;
    min-height: 60px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    border-left: 4px solid;
    position: relative;
  }

  /* Track header section (left side) */
  .mobile-track-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    min-width: 160px;
    max-width: 160px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
  }

  .mobile-track-name {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.2s ease;
  }

  .mobile-track-name:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .track-name-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 80px;
  }

  .mobile-track-controls {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
  }

  .mobile-mute-btn,
  .mobile-solo-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-mute-btn.active {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
  }

  .mobile-solo-btn.active {
    background: #eab308;
    color: black;
    border-color: #eab308;
  }

  /* Sequencer section (right side) */
  .mobile-sequencer-section {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  }

  .mobile-sequencer-section::-webkit-scrollbar {
    height: 4px;
  }

  .mobile-sequencer-section::-webkit-scrollbar-track {
    background: transparent;
  }

  .mobile-sequencer-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
  }

  /* Step buttons */
  .mobile-step-btn {
    min-width: 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: white;
    position: relative;
  }

  .mobile-step-btn:active {
    transform: scale(0.95);
  }

  /* Active step button (drum track) */
  .mobile-step-btn.bg-red-500 {
    background: #ef4444;
    border-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  }

  .mobile-step-btn.bg-blue-500 {
    background: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
  }

  .mobile-step-btn.bg-green-500 {
    background: #10b981;
    border-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
  }

  .mobile-step-btn.bg-yellow-500 {
    background: #eab308;
    border-color: #eab308;
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.4);
  }

  .mobile-step-btn.bg-purple-500 {
    background: #a855f7;
    border-color: #a855f7;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
  }

  .mobile-step-btn.bg-pink-500 {
    background: #ec4899;
    border-color: #ec4899;
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
  }

  .mobile-step-btn.bg-orange-500 {
    background: #f97316;
    border-color: #f97316;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
  }

  .mobile-step-btn.bg-cyan-500 {
    background: #06b6d4;
    border-color: #06b6d4;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
  }

  /* Note indicator for synth tracks */
  .mobile-note-indicator {
    font-size: 9px;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 5;
  }

  /* Hide desktop track header items on mobile */
  .track-header-item {
    display: none !important;
  }
}
