:root{
  --panel: #000000;
  --bar1: #fafca8;
  --bar2: #f3db00;
  --accent: #89ddff;
  --danger: #5398ff;
  --ok: #94f7c5;
  
}

* { box-sizing: border-box; }
html, body { height: 100%; }



.controls{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:center;
  flex-wrap: wrap;
  margin: 0 auto 12px;
  padding: 10px 14px;
  border-radius: 14px;
 
  width: min(980px, 94vw);
}

button{
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  background: linear-gradient(180deg, #b9b9b9ab, #434343);
  color: white;
  box-shadow: 0 10px 24px var(--shadow), inset 0 0 0 1px rgba(223, 134, 134, 0.06);
  cursor: pointer;
  transition: transform .12s ease, filter .2s ease, box-shadow .2s ease;
}
button:hover{ transform: translateY(-1px); filter: brightness(1.05); }
button:active{ transform: translateY(1px) scale(.98); }
button[aria-pressed="true"]{ background: linear-gradient(180deg, #b9b9b9ab, #000000); }

#muteBtn[aria-pressed="true"]{
  background: linear-gradient(180deg,#b9b9b9ab, #000000);
}

label{ display:flex; align-items:center; gap:8px; font-size:.95rem; opacity:.95; }
input[type="range"]{ accent-color: var(--accent); cursor: pointer; }


/* Barras con degradado, sombra y transición suave */
.bar{
  width: clamp(4px, calc(52vw / var(--n-bars, 40)), 14px);
  margin: 0 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--bar1), #ee9847);
  border-radius: 8px 8px 2px 2px;
  box-shadow: 0 8px 18px var(--shadow);
  transition: height .22s ease, transform .18s ease;
  will-change: height, transform;
}
.bar:nth-child(odd){
  background: linear-gradient(180deg, var(--bar2), #f3f3f3);
}

/* Destacados durante el swap */
.bar.highlight{
  background: linear-gradient(180deg, var(--danger), #cc8e99);
  box-shadow: 0 10px 24px rgba(255,83,112,.35);
  transform: translateY(-6px) scale(1.02);
}

/* Estado final ordenado */
.bar.sorted{
  background: linear-gradient(180deg, var(--ok), #4ccf96) !important;
  box-shadow: 0 10px 24px rgba(76,207,150,.35);
}

