:root {
  color-scheme: dark;
  --bg: #07090e;
  --panel: rgba(13, 17, 27, 0.55);
  --panel-hover: rgba(20, 26, 40, 0.65);
  --panel-sub: rgba(0, 0, 0, 0.3);
  --text: #f3f5f8;
  --muted: #8391a5;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);
  --accent: #00bfff;
  --accent-glow: rgba(0, 191, 255, 0.25);
  --accent-gradient: linear-gradient(135deg, #00d2ff 0%, #0072ff 100%);
  --accent2: #fbbf24;
  --accent2-glow: rgba(251, 191, 36, 0.18);
  --accent3: #a855f7;
  --accent3-glow: rgba(168, 85, 247, 0.22);
  --danger: #f87171;
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  --border-radius: 20px;
  --border-radius-sm: 10px;
  --font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  outline: none;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Background Grids & Animations */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
}

.glow-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -2;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.12;
  mix-blend-mode: screen;
  animation: orb-float 22s infinite alternate ease-in-out;
}

.glow-orb-1 {
  top: -10%;
  left: 5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, #00bfff 0%, transparent 75%);
  animation-duration: 25s;
}

.glow-orb-2 {
  bottom: -10%;
  right: 5%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, #a855f7 0%, transparent 75%);
  animation-duration: 32s;
  animation-delay: -6s;
}

.glow-orb-3 {
  top: 35%;
  left: 45%;
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, #0072ff 0%, transparent 75%);
  animation-duration: 20s;
  animation-delay: -11s;
}

@keyframes orb-float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(6%, 8%) scale(1.12); }
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.16);
}

.shell {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0;
}

/* Brand Title and Logo Layout */
.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 4px;
}
.brand-logo {
  height: 68px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}
.brand-logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 16px var(--accent-glow)) drop-shadow(0 4px 10px rgba(0, 191, 255, 0.25));
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

h1 {
  max-width: 900px;
  font-size: clamp(2.5rem, 5vw, 3.6rem);
  line-height: 1.25;
  padding-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 70%, #00bfff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  max-width: 780px;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(0.92rem, 1.2vw, 1.05rem);
  line-height: 1.7;
  font-weight: 500;
}

.privacy-note {
  font-weight: 500;
  font-size: 0.78rem;
}

/* Info Cards (Meters) */
.meters {
  display: flex;
  gap: 16px;
}

.meters div {
  width: 128px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.meters div:hover {
  border-color: rgba(0, 242, 254, 0.25);
  transform: translateY(-2px);
}

.meters span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meters strong {
  margin-top: 12px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

/* Main Layout Grid */
.workspace {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* Glassmorphism Panel styles */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--border-radius);
  background: var(--panel);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: var(--shadow);
  transition: border-color 0.3s ease;
}

.controls {
  position: sticky;
  top: 40px;
  display: grid;
  gap: 16px;
  padding: 24px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}

.controls::-webkit-scrollbar {
  width: 4px;
}
.controls::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
}

/* Dropzone (File Upload) */
.dropzone {
  position: relative;
  display: grid;
  min-height: 160px;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: var(--border-radius);
  background: var(--panel-sub);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropzone .upload-copy {
  pointer-events: none;
}

.dropzone:hover, .dropzone.is-over {
  border-color: var(--accent);
  background: rgba(0, 242, 254, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 242, 254, 0.06);
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.upload-copy {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 20px;
  text-align: center;
}

.upload-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #031411;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 6px 20px var(--accent-glow);
  transition: transform 0.3s ease;
}

.dropzone:hover .upload-icon {
  transform: scale(1.1) rotate(90deg);
}

.upload-copy strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.upload-copy small {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Fields & Custom Inputs */
.field {
  display: grid;
  gap: 8px;
}

.field > span, .range-label span {
  font-weight: 800;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--border-radius-sm);
  padding: 0 16px;
  color: var(--text);
  background: #0d1017;
  outline: none;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.25s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238391a5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 14px;
  padding-right: 42px;
}

select:hover {
  background-color: #121620;
  border-color: rgba(255, 255, 255, 0.15);
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Custom Slim Range Sliders */
input[type=range] {
  appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.15s ease;
}

input[type=range]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

input[type=range]:hover::-webkit-slider-thumb {
  transform: scale(1.35);
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-glow);
}

.range-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 2px;
}

.range-label output {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Option Divider */
.option-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}

/* iOS-like Toggle Switch for Checkbox */
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 650;
  user-select: none;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.012);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle span {
  transition: color 0.2s ease;
  flex: 1;
  text-align: left;
  line-height: 1.35;
}

.toggle input[type=checkbox] {
  appearance: none;
  margin: 0;
  width: 34px;
  height: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.toggle input[type=checkbox]:before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8391a5;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle input[type=checkbox]:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(0, 191, 255, 0.25);
}

.toggle input[type=checkbox]:checked:before {
  transform: translateX(16px);
  background: #07090e;
}

.toggle:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.toggle:hover span {
  color: var(--text);
}

/* Custom Checkbox Group container */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Sub-field (indented sub-options) */
.sub-field {
  padding-left: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
}

.sub-field span {
  color: var(--muted);
  font-weight: 600;
}

.sub-field select {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
  width: auto;
  min-width: 96px;
  background-position: right 10px center;
  padding-right: 30px;
}

/* Color Picker */
input[type=color] {
  appearance: none;
  border: 0;
  width: 40px;
  height: 26px;
  border-radius: var(--border-radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

input[type=color]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type=color]::-webkit-color-swatch {
  border: 1px solid var(--line-strong);
  border-radius: var(--border-radius-sm);
}

/* Visualizer Settings Subpanel */
.sub-panel {
  margin-top: 4px;
  padding: 18px;
  border-radius: 14px;
  background: var(--panel-sub);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sub-panel .field {
  gap: 6px;
}

.sub-panel .field > span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* iOS-like Custom Radio button */
.radio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  user-select: none;
}

.radio input[type=radio] {
  appearance: none;
  margin: 0;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.radio input[type=radio]:checked {
  border-color: var(--accent);
}

.radio input[type=radio]:checked:before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.radio:hover span {
  color: var(--text);
}

/* Sidebar Action Buttons */
button.primary, button.secondary, a.download, a.video-download {
  min-height: 46px;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  width: 100%;
}

.primary {
  background: var(--accent-gradient);
  color: #04161b;
  font-weight: 750;
  box-shadow: 0 4px 24px rgba(0, 242, 254, 0.2);
}

.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 242, 254, 0.35);
}

.primary:disabled {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

.secondary {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-weight: 600;
}

.secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* Track Queue List */
.queue {
  min-height: 540px;
  padding: 32px;
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.queue-head h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.queue-head p {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.15);
  padding: 4px 12px;
  border-radius: 99px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.progress-wrap {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.03);
  border: 0;
}

#progressBar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  border-radius: 99px;
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Individual Track Card */
.track-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.012);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.track:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--panel-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* Active Track state (playing) via CSS :has */
.track:has(.transport:not([hidden])) {
  border-color: rgba(0, 242, 254, 0.35);
  background: rgba(0, 242, 254, 0.02) !important;
  box-shadow: 0 16px 40px rgba(0, 242, 254, 0.06);
}

.track-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.track-name {
  font-size: 0.95rem;
  font-weight: 750;
  color: #ffffff;
  overflow-wrap: anywhere;
  letter-spacing: -0.01em;
}

.badge {
  border-radius: 99px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge.ready {
  background: rgba(0, 242, 254, 0.09);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.15);
}

.badge.error {
  background: rgba(248, 113, 113, 0.09);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.15);
}

.track-meta {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.track-stats {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent2);
  font-variant-numeric: tabular-nums;
}

/* Track Actions list */
.track-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.original-preview, .preview, .download {
  display: inline-flex;
  min-width: 88px;
  place-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 0.78rem;
  min-height: 34px;
  border-radius: 8px;
  font-weight: 700;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.original-preview:hover, .preview:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.original-preview:active, .preview:active {
  transform: translateY(0);
}

.preview:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  background: rgba(255, 255, 255, 0.01);
  border-color: var(--line);
}

.download {
  background: rgba(251, 191, 36, 0.07);
  color: var(--accent2);
  border: 1px solid rgba(251, 191, 36, 0.22);
}

.download:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: var(--accent2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent2-glow);
}



/* Media Player Transport Area */
.transport {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto auto auto auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding-top: 18px;
  margin-top: 16px;
  border-top: 1px dashed var(--line);
}

.transport button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: auto;
}

.transport button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.transport .seek {
  height: 4px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  width: 100%;
}

.transport .seek::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.time-readout {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Empty Area styling */
.empty {
  display: grid;
  min-height: 380px;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}

.empty strong {
  font-size: 1.05rem;
  font-weight: 750;
  color: #ffffff;
}

.empty span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Version & Footer lines */
.version-line {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.version-line a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.version-line a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .controls {
    position: static;
    max-height: none;
  }
}

@media (max-width: 768px) {
  .shell {
    padding: 32px 0;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .meters {
    justify-content: flex-start;
  }
  .track {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .track-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .original-preview, .preview, .download {
    width: 100%;
    min-height: 36px;
  }
}

@media (max-width: 580px) {
  .meters {
    flex-wrap: wrap;
    gap: 10px;
  }
  .meters div {
    flex: 1 1 calc(50% - 10px);
    width: auto;
    min-height: 90px;
  }
  .transport {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .transport .seek {
    grid-column: 1 / -1;
  }
  .time-readout {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 4px;
  }
}

/* Collapsible Group (Accordion) */
.collapsible-group {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.collapsible-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.collapsible-trigger:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent);
}

.collapsible-trigger .chevron-icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--muted);
}

.collapsible-trigger:hover .chevron-icon {
  color: var(--accent);
}

/* Collapsible Content Area */
.collapsible-content {
  max-height: 500px; /* Sufficient height to allow transition */
  opacity: 1;
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed State */
.collapsible-group.is-collapsed .collapsible-content {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.collapsible-group.is-collapsed .collapsible-trigger .chevron-icon {
  transform: rotate(-90deg);
}


