/**
 * MON2 Soundscape Machine - Modern Dark Audio Workstation Theme (2026 Edition)
 * Project: MON2 Soundscape Machine
 * Copyright (c) 2026 Monkhum Craft and Creative
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800;900&family=Sarabun:wght@300;400;500;600;700;800&display=swap');

/* Inherit from Soundscape Studio Suite Design Tokens */
:root {
  --primary-teal: var(--accent-primary, #00f2fe);
  --primary-teal-dark: var(--bg-card, #0f1522);
  --primary-teal-light: var(--accent-secondary, #c054ff);
  --accent-coral: var(--led-pink, #ff2a85);
  --accent-coral-hover: #ff4d99;
  --accent-gold: var(--led-yellow, #ffaa00);
  --card-bg: var(--bg-card, rgba(14, 18, 28, 0.94));
  --card-border: var(--border-subtle, rgba(255, 255, 255, 0.08));
  --glass-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --font-main: var(--font-ui, 'Outfit', 'Sarabun', -apple-system, sans-serif);
  --font-mono: var(--font-mono, 'JetBrains Mono', monospace);
}

/* Base Body Alignment */
html, body {
  font-family: var(--font-main);
  background-color: var(--bg-core, #080a0f) !important;
  color: var(--text-main, #f3f6fc) !important;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  color: var(--text-main, #ffffff) !important;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Glassmorphic Cards & Panels */
.glass-card,
.capacity-card,
.flash-panel,
.guide-card {
  background: var(--bg-card, rgba(14, 18, 28, 0.94)) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08)) !important;
  border-top: 1px solid var(--border-highlight, rgba(255, 255, 255, 0.18)) !important;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 36px -6px rgba(0, 0, 0, 0.7) !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  margin-bottom: 24px;
  color: var(--text-main, #f0f4fc) !important;
}

.glass-card:hover,
.capacity-card:hover,
.guide-card:hover {
  border-color: var(--border-medium, rgba(255, 255, 255, 0.15)) !important;
  border-top-color: var(--accent-primary, #00f2fe) !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 16px 44px -6px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(var(--accent-primary-rgb, 0, 242, 254), 0.12) !important;
}

/* Hero Section */
#mon {
  padding: 24px 0 60px 0;
  position: relative;
  background: transparent !important;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--accent-primary-rgb, 0, 242, 254), 0.12);
  color: var(--accent-primary, #00f2fe);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 242, 254), 0.3);
  box-shadow: 0 0 12px rgba(var(--accent-primary-rgb, 0, 242, 254), 0.2);
}

#mon h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff !important;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#mon h1 .icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--badge-grad, linear-gradient(135deg, #00f2fe, #c054ff));
  color: #050810;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 18px rgba(var(--accent-primary-rgb, 0, 242, 254), 0.4);
}

#mon h6.subtitle {
  font-size: 0.95rem;
  color: var(--text-muted, #94a3b8) !important;
  font-weight: 500;
  margin-bottom: 24px;
}

/* Settings Panel Header */
.settings-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary, #00f2fe);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  padding-bottom: 12px;
}

.form-label-custom {
  font-weight: 700;
  color: var(--text-main, #f0f4fc);
  font-size: 0.88rem;
  margin-bottom: 8px;
  display: block;
}

.form-select-custom {
  background-color: rgba(9, 12, 18, 0.95) !important;
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.15)) !important;
  border-radius: 10px;
  color: #ffffff !important;
  font-weight: 600;
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  width: 100%;
  outline: none;
}

.form-select-custom:focus {
  border-color: var(--accent-primary, #00f2fe) !important;
  box-shadow: 0 0 14px rgba(var(--accent-primary-rgb, 0, 242, 254), 0.3) !important;
}

.badge-16bit {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(192, 84, 255, 0.2)) !important;
  color: var(--accent-primary, #00f2fe) !important;
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 242, 254), 0.4) !important;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 12px rgba(var(--accent-primary-rgb, 0, 242, 254), 0.15);
}

.filename-preview-box {
  margin-top: 18px;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.45) !important;
  border-left: 4px solid var(--accent-primary, #00f2fe) !important;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.filename-split-left {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 18px;
}

@media (max-width: 767.98px) {
  .filename-split-left {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-right: 12px;
    padding-bottom: 10px;
  }
}

.capacity-split-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1 !important;
}

.capacity-split-title strong {
  color: #00f2fe;
}

.capacity-split-sub {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ec845a !important;
}

.filename-preview-box small {
  color: var(--text-muted, #94a3b8) !important;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#filenamePreview {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-primary, #00f2fe) !important;
  word-break: break-all;
  margin-top: 4px;
  text-shadow: 0 0 8px rgba(var(--accent-primary-rgb, 0, 242, 254), 0.4);
}

/* Animated Capacity Progress Bar */
.progress-custom-container {
  height: 14px;
  background: rgba(0, 0, 0, 0.6) !important;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.progress-custom-container.progress-thick {
  height: 26px;
  border-radius: 13px;
  background: rgba(4, 8, 16, 0.85) !important;
  border: 1.5px solid rgba(0, 242, 254, 0.35);
}

.progress-custom-bar {
  height: 100%;
  background: linear-gradient(90deg, #00f2fe 0%, #10b981 55%, #ec845a 100%) !important;
  border-radius: 20px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.45);
}

.progress-custom-bar.bg-danger {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.65);
}

.progress-thick-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  z-index: 2;
  letter-spacing: 0.02em;
}

/* Action Buttons */
.top-action-buttons-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
  flex: 1;
}

@media (max-width: 575.98px) {
  .top-action-buttons-row {
    grid-template-columns: 1fr;
  }
}

.top-action-btn {
  width: 100%;
  height: 100%;
  min-height: 76px;
  justify-content: center;
  text-align: center;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  font-size: 0.9rem !important;
  line-height: 1.3;
}

.btn-flash-bin-top {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #34d399 !important;
  border: 1.5px solid rgba(16, 185, 129, 0.45) !important;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.18);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-flash-bin-top:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #04120c !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
}

.btn-primary-action,
.btn-demo {
  background: var(--badge-grad, linear-gradient(135deg, #00f2fe, #c054ff)) !important;
  color: #050812 !important;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(var(--accent-primary-rgb, 0, 242, 254), 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary-action:hover,
.btn-demo:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(var(--accent-primary-rgb, 0, 242, 254), 0.55);
  filter: brightness(1.1);
}

.btn-secondary-action {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.15)) !important;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background: rgba(var(--accent-primary-rgb, 0, 242, 254), 0.15) !important;
  border-color: var(--accent-primary, #00f2fe) !important;
  color: var(--accent-primary, #00f2fe) !important;
}

/* FilePond Cyberpunk Styling */
.filepond--root {
  font-family: var(--font-main) !important;
  margin-bottom: 20px;
}

.filepond--panel-root {
  background-color: rgba(10, 14, 22, 0.8) !important;
  border: 2px dashed rgba(var(--accent-primary-rgb, 0, 242, 254), 0.3) !important;
  border-radius: 16px !important;
}

.filepond--drop-label {
  color: var(--text-muted, #94a3b8) !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
}

.filepond--label-action {
  color: var(--accent-primary, #00f2fe) !important;
  text-decoration: underline !important;
  font-weight: 700 !important;
}

.filepond--item-panel {
  background-color: rgba(18, 24, 38, 0.95) !important;
  border: 1px solid var(--border-accent, rgba(0, 242, 254, 0.4)) !important;
  border-radius: 10px !important;
}

/* Flash Terminal Console */
.terminal-log {
  background: #04060a !important;
  color: var(--led-green, #00ff88) !important;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.82rem;
  border-radius: 10px;
  padding: 14px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(0, 255, 136, 0.25) !important;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.8), 0 0 12px rgba(0, 255, 136, 0.1);
  margin-top: 14px;
}

/* Instruction Cards */
.guide-card h6 {
  color: var(--accent-primary, #00f2fe) !important;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-card p,
.guide-card li {
  color: var(--text-muted, #94a3b8) !important;
  font-size: 0.88rem;
  line-height: 1.6;
}

.guide-card strong {
  color: #ffffff !important;
}

/* Overrides for hardcoded legacy teal inline styles */
#sampleRateInfoBox {
  background: rgba(var(--accent-primary-rgb, 0, 242, 254), 0.08) !important;
  border: 1px solid rgba(var(--accent-primary-rgb, 0, 242, 254), 0.3) !important;
}

#sampleRateInfoBox span.fw-bold {
  color: var(--accent-primary, #00f2fe) !important;
}

#rateMaxTime {
  color: var(--accent-secondary, #c054ff) !important;
}

#rateQualityDesc {
  color: var(--text-muted, #94a3b8) !important;
}

#maxDurationCalc {
  color: var(--text-main, #ffffff) !important;
}

#currentDurationCalc {
  color: var(--accent-primary, #00f2fe) !important;
}

#uploadBinSection h6,
#flashSection h5,
#binFileName,
#flashProgressText,
h4[style*="054c4c"] {
  color: var(--text-main, #ffffff) !important;
}

#uploadBinSection p,
#flashSection p {
  color: var(--text-muted, #94a3b8) !important;
}

#uploadBinSection {
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08)) !important;
}

/* ==========================================================================
   WAV CONVERTER 2026: AUDIO TRIMMER & SAMPLER PAD MATRIX STYLES
   ========================================================================== */

/* Waveform Editor Panel */
.waveform-editor-panel {
  background: var(--bg-card, rgba(14, 18, 28, 0.94)) !important;
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.12)) !important;
  border-top: 2px solid var(--accent-primary, #00f2fe) !important;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.waveform-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.waveform-slot-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(255, 42, 133, 0.2));
  border: 1px solid var(--accent-primary, #00f2fe);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.waveform-meta {
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
}

.waveform-meta label:hover {
  text-decoration: underline;
  opacity: 0.88;
}

/* Waveform Canvas Container */
.waveform-container {
  position: relative;
  width: 100%;
  height: 180px;
  background: #060911;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8);
  margin-bottom: 16px;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.waveform-container.drag-active {
  border: 2px dashed #00f2fe !important;
  background-color: rgba(0, 242, 254, 0.07) !important;
  box-shadow: inset 0 0 24px rgba(0, 242, 254, 0.25), 0 0 16px rgba(0, 242, 254, 0.3) !important;
}

.waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* Playhead Line */
.waveform-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2.5px;
  background: #ffaa00;
  box-shadow: 0 0 12px #ffaa00, 0 0 4px #ffffff;
  pointer-events: none;
  display: none;
  z-index: 10;
}

.waveform-playhead::before {
  content: '▼';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffaa00;
  font-size: 13px;
  line-height: 1;
  text-shadow: 0 0 8px rgba(255, 170, 0, 0.9);
}

.btn-primary-action.disabled-over-limit,
.btn-primary-action:disabled {
  background: rgba(239, 68, 68, 0.18) !important;
  color: #fca5a5 !important;
  border: 1.5px solid rgba(239, 68, 68, 0.55) !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: not-allowed !important;
}

/* Draggable Region Overlay */
.waveform-selection-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0, 242, 254, 0.1);
  border-left: 2px solid #00f2fe;
  border-right: 2px solid #ff2a85;
  pointer-events: none;
  z-index: 5;
}

/* Time tooltips on canvas */
.waveform-time-tag {
  position: absolute;
  bottom: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 12;
  box-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.waveform-time-tag.start-tag {
  left: 8px;
  background: rgba(0, 242, 254, 0.25);
  color: #00f2fe;
  border: 1px solid #00f2fe;
}

.waveform-time-tag.end-tag {
  right: 8px;
  background: rgba(255, 42, 133, 0.25);
  color: #ff2a85;
  border: 1px solid #ff2a85;
}

.waveform-time-tag.cursor-tag {
  top: 6px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.5);
  display: none;
}

/* Waveform Controls Toolbar */
.waveform-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.btn-trim-action {
  background: rgba(255, 255, 255, 0.05);
  color: #f3f6fc;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-trim-action:hover:not(:disabled) {
  background: rgba(0, 242, 254, 0.15);
  border-color: #00f2fe;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 242, 254, 0.2);
}

.btn-trim-action.primary-play {
  background: linear-gradient(135deg, #00f2fe, #00a8b5);
  color: #040810;
  border: none;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
}

.btn-trim-action.primary-play:hover {
  background: linear-gradient(135deg, #33f5ff, #00d2e0);
  box-shadow: 0 0 22px rgba(0, 242, 254, 0.6);
  color: #000;
}

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

.btn-trim-action.stop-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ffffff;
}

.btn-trim-action.normalize-btn {
  background: rgba(192, 84, 255, 0.15);
  border-color: rgba(192, 84, 255, 0.4);
  color: #c084fc;
}

.btn-trim-action.normalize-btn:hover {
  background: rgba(192, 84, 255, 0.3);
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(192, 84, 255, 0.3);
}

.btn-trim-action.autotrim-btn {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.4);
  color: #34d399;
}

.btn-trim-action.autotrim-btn:hover {
  background: rgba(52, 211, 153, 0.3);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.3);
}

/* Numeric Sliders Grid */
.trim-sliders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 16px;
}

.trim-slider-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.trim-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
}

.trim-slider-header span.val {
  font-family: var(--font-mono, monospace);
  color: #ffffff;
}

.trim-range-input {
  width: 100%;
  accent-color: var(--accent-primary, #00f2fe);
  cursor: pointer;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

/* Sampler Hardware Pad Matrix Section */
.sampler-matrix-panel {
  background: var(--bg-card, rgba(14, 18, 28, 0.94)) !important;
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.12)) !important;
  border-top: 2px solid var(--led-pink, #ff2a85) !important;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  margin-bottom: 24px;
}

.matrix-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.bank-switch-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.bank-switch-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bank-switch-btn.active {
  background: var(--accent-primary, #00f2fe);
  color: #040810;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.4);
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 991px) {
  .matrix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .matrix-grid {
    grid-template-columns: 1fr;
  }
}

/* Pad Card */
.pad-card {
  background: rgba(10, 14, 22, 0.9);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  padding: 16px;
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pad-card:hover {
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.pad-card.selected {
  border-color: #00f2fe;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.25), inset 0 0 12px rgba(0, 242, 254, 0.08);
}

.pad-card.playing {
  border-color: #ff2a85 !important;
  box-shadow: 0 0 24px rgba(255, 42, 133, 0.45), inset 0 0 14px rgba(255, 42, 133, 0.15) !important;
}

.pad-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pad-badge-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1rem;
  color: #ffffff;
}

.pad-led-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
  transition: all 0.15s ease;
}

.pad-card.playing .pad-led-indicator {
  background: #ff2a85;
  box-shadow: 0 0 12px #ff2a85;
}

.pad-card.has-file .pad-led-indicator {
  background: #00f2fe;
  box-shadow: 0 0 6px #00f2fe;
}

.pad-file-info {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pad-file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f3f6fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pad-file-meta {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  margin-top: 2px;
}

/* Mini Waveform preview inside pad */
.pad-mini-waveform {
  width: 100%;
  height: 40px;
  background: #04060a;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Pad Action Buttons */
.pad-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-pad-trigger {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(0, 242, 254, 0.05));
  border: 1px solid rgba(0, 242, 254, 0.3);
  color: #00f2fe;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-pad-trigger:hover {
  background: rgba(0, 242, 254, 0.3);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
  color: #ffffff;
}

.btn-pad-trigger:active {
  transform: scale(0.96);
  background: #00f2fe;
  color: #000;
}

.btn-pad-edit {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-pad-edit:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* Pad Mini Knob Sliders (Pitch, Vol, Start, End) */
.pad-cc-knobs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pad-knob-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pad-knob-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  display: flex;
  justify-content: space-between;
}

.pad-knob-label span.num {
  font-family: var(--font-mono, monospace);
  color: #ffaa00;
}

.pad-mini-slider {
  width: 100%;
  height: 4px;
  accent-color: #ffaa00;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* MIDI Status indicator */
.midi-bridge-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}

.midi-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.midi-dot.connected {
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
}

/* Drag hover effect on pad */
.pad-card.drag-over {
  border: 2px dashed #00f2fe !important;
  background: rgba(0, 242, 254, 0.08) !important;
}

/* Quick Demo Sound generator banner */
.demo-synth-banner {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(192, 84, 255, 0.1));
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

#footer {
  background: var(--bg-core, #07090e) !important;
  color: var(--text-muted, #94a3b8) !important;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  padding: 30px 0;
  text-align: center;
}

#footer h3 {
  color: #ffffff !important;
  font-size: 1.4rem;
  margin-bottom: 6px;
}

#footer p {
  color: var(--text-dim, #546274) !important;
  font-size: 0.85rem;
}

/* ==========================================================================
   QUALITY PREVIEW TOGGLE & INDIVIDUAL 12-TRACK EDITOR STRIPS
   ========================================================================== */

.quality-preview-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(0, 242, 254, 0.35) !important;
  background: rgba(0, 242, 254, 0.08) !important;
  color: #e2e8f0 !important;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  transition: all 0.2s ease;
}

.quality-preview-toggle:hover {
  background: rgba(0, 242, 254, 0.14) !important;
  border-color: rgba(0, 242, 254, 0.6) !important;
}

.quality-preview-toggle input[type="checkbox"] {
  accent-color: #00f2fe;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.individual-tracks-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tracks-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.tracks-section-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #f8fafc;
}

.tracks-section-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
}

.btn-track-batch {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
}

.btn-track-batch:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: #00f2fe;
  color: #ffffff;
}

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

.track-editor-card {
  background: rgba(9, 13, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
}

.track-editor-card:hover {
  border-color: rgba(0, 242, 254, 0.35);
}

.track-editor-card.collapsed {
  padding: 8px 14px;
  background: rgba(6, 9, 15, 0.7);
}

.track-editor-card.collapsed:hover {
  background: rgba(10, 15, 26, 0.9);
}

.track-editor-card.collapsed .track-top-bar {
  margin-bottom: 0;
}

.track-editor-card.collapsed .track-body {
  display: none !important;
}

.track-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.track-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.track-num-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}

.track-filename {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}

.track-meta-info {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.track-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-track-act {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-track-act:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-track-act.play-track {
  background: rgba(0, 242, 254, 0.14);
  border-color: rgba(0, 242, 254, 0.45);
  color: #00f2fe;
}

.btn-track-act.play-track:hover {
  background: #00f2fe;
  color: #041019;
}

.btn-track-act.play-track.playing {
  background: linear-gradient(135deg, #ff2a85, #ff5e62) !important;
  border-color: #ff2a85 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(255, 42, 133, 0.45);
}

.btn-track-act.play-track.playing:hover {
  background: #ff2a85 !important;
  color: #ffffff !important;
}

.btn-track-act.collapse-track {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  padding: 4px 8px;
  font-size: 0.85rem;
}

.btn-track-act.collapse-track:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: #00f2fe;
  color: #00f2fe;
}

.btn-track-act.loop-track {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

.btn-track-act.loop-track:hover {
  background: rgba(251, 191, 36, 0.25);
  color: #fff;
}

.btn-track-act.loop-track.active {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #080d18;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.45);
}

.btn-track-act.norm-track {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

.btn-track-act.norm-track:hover {
  background: rgba(168, 85, 247, 0.3);
  color: #fff;
}

.btn-track-act.autotrim-track {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-track-act.autotrim-track:hover {
  background: rgba(16, 185, 129, 0.28);
  color: #fff;
}

.btn-track-act.del-track {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.btn-track-act.del-track:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

.track-waveform-wrap {
  position: relative;
  width: 100%;
  height: 68px;
  background: #04070d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  user-select: none;
  cursor: ew-resize;
}

.track-waveform-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.track-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  pointer-events: none;
  display: none;
  z-index: 5;
}

.track-playhead::before {
  content: '▼';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  color: #fbbf24;
  font-size: 11px;
  line-height: 1;
}

.track-controls-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 12px;
}

@media (max-width: 768px) {
  .track-controls-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.track-ctrl-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.track-ctrl-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #94a3b8;
}

.track-ctrl-val {
  font-family: 'JetBrains Mono', monospace;
  color: #f8fafc;
  font-weight: 700;
}

.track-ctrl-slider {
  width: 100%;
  height: 5px;
  accent-color: #ec845a;
  cursor: pointer;
}

/* =============================================================================
 * FULL-WIDTH WORKSPACE & MON2 IN-TRACK HARDWARE SIMULATOR (3 KNOBS + FWD/REV)
 * ============================================================================= */
#mon > .container,
#mon > .container-fluid,
.mon-full-container {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

@media (max-width: 768px) {
  #mon > .container,
  #mon > .container-fluid,
  .mon-full-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

.track-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 992px) {
  .track-body {
    grid-template-columns: 1fr;
  }
}

.track-editor-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.track-mon2-sim-panel {
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.96) 0%, rgba(7, 11, 20, 0.98) 100%);
  border: 1px solid rgba(0, 242, 254, 0.22);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 14px rgba(0, 0, 0, 0.45);
}

.mon2-sim-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mon2-sim-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.mon2-sim-badge i {
  color: #00f2fe;
}

.mon2-dir-switch {
  display: inline-flex;
  background: rgba(2, 6, 14, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.btn-mon2-dir {
  border: none;
  background: transparent;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.btn-mon2-dir:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.btn-mon2-dir.active.dir-fwd {
  background: linear-gradient(135deg, #00f2fe, #0ea5e9);
  color: #041019;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.45);
}

.btn-mon2-dir.active.dir-rev {
  background: linear-gradient(135deg, #ff2a85, #f97316);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 42, 133, 0.5);
}

.mon2-knobs-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  flex: 1;
  align-items: stretch;
}

.mon2-knob-card {
  background: rgba(6, 10, 19, 0.9);
  border-radius: 8px;
  padding: 5px 4px 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  user-select: none;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mon2-knob-card.knob-pink {
  --k-color: #ec4899;
  --k-glow: rgba(236, 72, 153, 0.4);
  border-bottom: 2px solid #ec4899;
}

.mon2-knob-card.knob-green {
  --k-color: #10b981;
  --k-glow: rgba(16, 185, 129, 0.4);
  border-bottom: 2px solid #10b981;
}

.mon2-knob-card.knob-yellow {
  --k-color: #eab308;
  --k-glow: rgba(234, 179, 8, 0.4);
  border-bottom: 2px solid #eab308;
}

.mon2-knob-card:hover {
  border-color: var(--k-color);
  box-shadow: 0 0 10px var(--k-glow);
}

.mon2-knob-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: #e2e8f0;
  white-space: nowrap;
  text-align: center;
  line-height: 1.1;
}

.mon2-knob-dial-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  touch-action: none;
}

.mon2-knob-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mon2-knob-dot {
  position: absolute;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transform: translate(-50%, -50%);
  transition: background 0.1s ease, box-shadow 0.1s ease;
}

.mon2-knob-dot.active {
  background: var(--k-color);
  box-shadow: 0 0 5px var(--k-color);
}

.mon2-knob-body {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.55), 0 0 10px var(--k-glow);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.04s linear;
}

.knob-pink .mon2-knob-body {
  background: radial-gradient(circle at 35% 35%, #f472b6 0%, #ec4899 58%, #be185d 100%);
}

.knob-green .mon2-knob-body {
  background: radial-gradient(circle at 35% 35%, #34d399 0%, #10b981 58%, #047857 100%);
}

.knob-yellow .mon2-knob-body {
  background: radial-gradient(circle at 35% 35%, #fde047 0%, #eab308 58%, #a16207 100%);
}

.mon2-knob-pointer {
  position: absolute;
  top: 3px;
  width: 2.5px;
  height: 9px;
  background: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.95), 0 1px 2px rgba(0, 0, 0, 0.8);
}

.mon2-knob-readout {
  background: #02050b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  padding: 1px 7px;
  min-width: 48px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 800;
  color: #f97316;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
  line-height: 1.3;
}

