/* Skip link for keyboard navigation */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: rgba(100, 200, 255, 0.95);
  color: #000;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.3s ease;
}

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

/* Screen reader only content */
.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;
}

/* Error Modal */
.error-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.error-modal[hidden] {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.error-modal-content {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.98), rgba(30, 20, 40, 0.98));
  border: 2px solid rgba(255, 80, 80, 0.4);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
              0 0 100px rgba(255, 50, 50, 0.15);
  position: relative;
  animation: slideUp 0.3s ease;
}

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

.error-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.error-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.error-modal-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 10px rgba(255, 200, 0, 0.5));
}

.error-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 16px 0;
  text-align: center;
}

.error-modal-message {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 24px 0;
  text-align: center;
}

.error-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.error-modal-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 100px;
}

.error-modal-btn-primary {
  background: linear-gradient(135deg, rgba(100, 150, 255, 0.9), rgba(80, 120, 255, 0.9));
  color: white;
  box-shadow: 0 4px 12px rgba(100, 150, 255, 0.3);
}

.error-modal-btn-primary:hover {
  background: linear-gradient(135deg, rgba(120, 170, 255, 0.95), rgba(100, 140, 255, 0.95));
  box-shadow: 0 6px 16px rgba(100, 150, 255, 0.4);
  transform: translateY(-1px);
}

.error-modal-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.error-modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 480px) {
  .error-modal-content {
    padding: 24px 20px;
  }
  
  .error-modal-title {
    font-size: 20px;
  }
  
  .error-modal-message {
    font-size: 14px;
  }
  
  .error-modal-actions {
    flex-direction: column;
  }
  
  .error-modal-btn {
    width: 100%;
  }
}

/* Recording Status */
.recording-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 50, 50, 0.15);
  border: 1px solid rgba(255, 80, 80, 0.4);
  border-radius: 8px;
  margin-top: 8px;
  animation: recordingPulse 2s ease-in-out infinite;
}

@keyframes recordingPulse {
  0%, 100% {
    background: rgba(255, 50, 50, 0.15);
    border-color: rgba(255, 80, 80, 0.4);
  }
  50% {
    background: rgba(255, 50, 50, 0.25);
    border-color: rgba(255, 80, 80, 0.6);
  }
}

.recording-indicator {
  width: 12px;
  height: 12px;
  background: #ff3333;
  border-radius: 50%;
  animation: recordingBlink 1s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(255, 50, 50, 0.8);
}

@keyframes recordingBlink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

#recordingText {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  flex: 1;
}

#recordingTimer {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-family: 'Monaco', 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 4px;
}

.spacer {
  flex: 1;
}

/* Panel position classes */
.hud.hud-left {
  left: 12px !important;
  right: auto !important;
}
.hud.hud-right {
  right: 12px !important;
  left: auto !important;
}
/* styles.css */
:root {
  --hud-bg: rgba(0, 0, 0, 0.55);
  --hud-border: rgba(255, 255, 255, 0.14);
  --text: rgba(255, 255, 255, 0.9);
  --muted: rgba(255, 255, 255, 0.72);
  --muted2: rgba(255, 255, 255, 0.55);
  --btn: rgba(255, 255, 255, 0.10);
  --btn-hover: rgba(255, 255, 255, 0.16);
}

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
}

#c {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
}

@supports (height: 100dvh) {
  #c {
    width: 100dvw;
    height: 100dvh;
  }
}


.hud {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 12px;
  max-width: min(800px, calc(100vw - 24px));
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-height: calc(100vh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transition: left 0.3s ease, right 0.3s ease;
}

.hud.isHidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

.section {
  margin: 8px 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.sectionTitle {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 6px 0;
  padding: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.control {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 140px;
}

.control label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  min-width: fit-content;
}

.control input[type="range"] {
  flex: 1;
  min-width: 80px;
}

.control .val {
  min-width: 44px;
  text-align: right;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}
.row.row-buttons {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px;
  margin: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px 12px 0 0;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.row.row-buttons button {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

/* Make the panel close button pop so you can find it fast */
#hudCloseBtn {
  background: rgba(255, 90, 90, 0.18);
  border: 1px solid rgba(255, 120, 120, 0.35);
  color: rgba(255, 220, 220, 0.95);
}

#hudCloseBtn:hover {
  background: rgba(255, 90, 90, 0.28);
  border-color: rgba(255, 140, 140, 0.55);
  box-shadow: 0 0 14px rgba(255, 90, 90, 0.25);
}

button.btn-primary {
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(100, 200, 255, 0.2);
  border: 1.5px solid rgba(100, 200, 255, 0.4);
  color: rgba(100, 220, 255, 0.95);
  transition: all 0.2s ease;
}

button.btn-primary:hover {
  background: rgba(100, 200, 255, 0.3);
  border-color: rgba(100, 200, 255, 0.6);
  box-shadow: 0 0 12px rgba(100, 200, 255, 0.3);
  transform: translateY(-1px);
}

button.btn-primary.active {
  background: rgba(100, 255, 150, 0.25);
  border-color: rgba(100, 255, 150, 0.5);
  color: rgba(150, 255, 180, 1);
  box-shadow: 0 0 20px rgba(100, 255, 150, 0.4),
              inset 0 0 20px rgba(100, 255, 150, 0.1);
  text-shadow: 0 0 8px rgba(100, 255, 150, 0.6);
}

button.btn-primary.active:hover {
  box-shadow: 0 0 24px rgba(100, 255, 150, 0.5),
              inset 0 0 20px rgba(100, 255, 150, 0.15);
}

label {
  font-size: 12px;
  color: var(--muted);
}

label.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

label.check:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

label.check input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: rgba(255, 255, 255, 0.8);
}

label.check input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(100, 200, 255, 0.8);
  outline-offset: 2px;
}

.val {
  min-width: 44px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}

.status {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
}

button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

button:focus-visible {
  outline: 2px solid rgba(100, 200, 255, 0.8);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

button.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.15);
}

button.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

select, input[type="range"], input[type="color"] {
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.15s ease;
}

select {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 140px;
  cursor: pointer;
}

select:hover, select:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  outline: none;
}

select:focus-visible {
  outline: 2px solid rgba(100, 200, 255, 0.8);
  outline-offset: 2px;
}

input[type="range"] {
  width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding: 8px 0; /* Increase touch target */
}

input[type="range"]:focus-visible {
  outline: 2px solid rgba(100, 200, 255, 0.8);
  outline-offset: 4px;
  border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #ffffff;
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  background: #ffffff;
  transform: scale(1.1);
}

input[type="color"] {
  width: 40px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  background: none;
}

input[type="color"]:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

input[type="color"]:focus-visible {
  outline: 2px solid rgba(100, 200, 255, 0.8);
  outline-offset: 2px;
}

.legend {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.legendTitle {
  font-weight: 800;
  margin-bottom: 8px;
  opacity: 0.95;
}

.helpCols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.helpCard {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,0.04);
}

.helpCardTitle {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--muted);
}

.legend ul, .legend ol {
  margin: 0;
  padding-left: 18px;
}

.legend li {
  margin: 4px 0;
  color: var(--muted);
}

kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  font-family: 'Monaco', 'Courier New', monospace;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.95);
}

.tip {
  margin-top: 8px;
  color: var(--muted2);
  font-size: 12px;
}

/* Small status/selection badges */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  user-select: none;
  white-space: nowrap;
}

.details {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

.details ol {
  margin-top: 8px;
  color: var(--muted);
}

.details ul {
  margin: 4px 0 0 0;
  padding-left: 18px;
}

@media (max-width: 760px) {
  .helpCols {
    grid-template-columns: 1fr;
  }
  .control {
    min-width: 120px;
  }
  input[type="range"] {
    width: 100px;
  }
  select {
    min-width: 120px;
  }
  .hud {
    padding: 16px;
    max-width: calc(100vw - 16px);
  }
  .section {
    padding: 12px;
  }
  .row {
    padding: 6px;
    gap: 8px;
  }
}

/* Touch-friendly styles for mobile devices */
@media (hover: none) and (pointer: coarse) {
  button {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 18px;
    font-size: 14px;
  }
  
  input[type="range"] {
    min-height: 44px;
    padding: 12px 0;
  }
  
  input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }
  
  input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }
  
  input[type="checkbox"] {
    min-width: 22px;
    min-height: 22px;
  }
  
  select {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }
  
  input[type="color"] {
    min-width: 44px;
    min-height: 44px;
  }
  
  .eq-band input[type="range"] {
    min-width: 44px;
  }
}

/* make the Help area not explode horizontally */
.legend, .details {
  max-width: 100%;
}

/* slightly tighten spacing on small screens */
@media (max-height: 760px) {
  .hud {
    padding: 12px;
    max-height: calc(100vh - 16px);
  }
  .section {
    margin: 12px 0;
    padding: 12px;
  }
  input[type="range"] {
    width: 100px;
  }
  select {
    min-width: 120px;
  }
  .control {
    min-width: 100px;
  }
}

/* Small mobile devices (phones in portrait) */
@media (max-width: 480px) {
  .hud {
    max-width: calc(100vw - 12px);
    padding: 10px;
    font-size: 12px;
    left: 6px;
    top: 6px;
  }
  
  .section {
    padding: 10px;
    margin: 6px 0;
  }
  
  .sectionTitle {
    font-size: 11px;
  }
  
  .row {
    padding: 4px;
    gap: 6px;
  }
  
  .row.row-buttons {
    padding: 8px;
    gap: 6px;
  }
  
  button {
    font-size: 11px;
    padding: 8px 12px;
  }
  
  .control {
    min-width: 100px;
    flex: 1 1 100%;
  }
  
  .control label {
    font-size: 11px;
  }
  
  input[type="range"] {
    width: 100%;
  }
  
  select {
    width: 100%;
    min-width: auto;
    font-size: 12px;
  }
  
  /* Make EQ grid 6 columns on small screens */
  .eq-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }
  
  .eq-band label {
    font-size: 9px;
  }
  
  .eq-band input[type="range"] {
    height: 100px;
  }
  
  .eq-band-val {
    font-size: 9px;
  }
  
  .slider-grid {
    gap: 6px;
  }
  
  .slider-row {
    width: 100%;
    padding: 8px;
  }
  
  .helpCard {
    padding: 8px;
  }
  
  .legend ul, .legend ol {
    padding-left: 14px;
  }
  
  .pill {
    font-size: 10px;
    padding: 3px 6px;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .hud {
    font-size: 11px;
  }
  
  button {
    font-size: 10px;
    padding: 6px 10px;
  }
  
  /* Stack EQ grid in 4 columns for very small screens */
  .eq-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  
  .eq-band input[type="range"] {
    height: 80px;
    width: 16px;
  }
  
  /* Make control buttons stack vertically on tiny screens */
  .row.row-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .row.row-buttons button {
    width: 100%;
  }
  
  .spacer {
    display: none;
  }
}

/* Landscape orientation for phones */
@media (max-height: 480px) and (orientation: landscape) {
  .hud {
    max-height: calc(100vh - 12px);
    overflow-y: auto;
  }
  
  .section {
    margin: 6px 0;
  }
  
  /* Make EQ grid horizontal in landscape */
  .eq-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  
  .eq-band input[type="range"] {
    height: 80px;
  }
}

/* --- Control Panel Re-org Additions --- */

/* For slider grid layout */
.slider-grid {
  display: flex;
  flex-direction: row;
  flex-wrap:wrap;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
}

.slider-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  width:49%;
}

.slider-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
}

.control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
  flex: 1 1 120px;
}

.control label {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.control input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
}

.control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
}

.control input[type="range"]::-webkit-slider-thumb:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease;
}

.control input[type="range"]::-moz-range-thumb:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.control .val {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  min-width: 40px;
  display: inline-block;
}

.control input[type="color"] {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
}

.control input[type="text"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.control input[type="text"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.control select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  cursor: pointer;
}

.control select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

/* Primary action row (Start Audio) */
.primary-action {
  margin-bottom: 16px;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Utility buttons at the bottom */
.utility-buttons {
  margin-top: 20px;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Global EQ --- */
#eqSection .row {
  align-items: center;
}

#eqSection .checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  user-select: none;
}

#eqSection .checkbox input {
  width: 16px;
  height: 16px;
}

.eq-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  padding-top: 10px;
}

.eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.eq-band label {
  font-size: 11px;
  opacity: 0.9;
}

.eq-band input[type="range"] {
  writing-mode: bt-lr; /* fallback */
  -webkit-appearance: slider-vertical;
  width: 18px;
  height: 120px;
}

.eq-band-val {
  font-size: 11px;
  opacity: 0.85;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hud {
    transition: none;
  }
  
  button,
  input,
  select {
    transition: none;
  }
}
