:root { --accent: #a78bfa; --accent-glow: rgba(167,139,250,0.5); }

body {
  background: linear-gradient(160deg, #0a0a1e 0%, #130a2e 45%, #0a0a1e 100%);
  min-height: 100vh;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--fill, 0%),
    rgba(255,255,255,0.12) var(--fill, 0%)
  );
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-glow);
  border: 2px solid rgba(255,255,255,0.35);
  transition: box-shadow 0.15s, transform 0.15s;
}
input[type="range"]:active::-webkit-slider-thumb {
  box-shadow: 0 0 22px var(--accent-glow);
  transform: scale(1.2);
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 0 10px var(--accent-glow);
}
input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.12);
}

.section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}
.section-body.open { max-height: 800px; }

.chevron { transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); }
.section-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(167,139,250,0.45), 0 0 28px rgba(167,139,250,0.3); }
  70%  { box-shadow: 0 0 0 18px rgba(167,139,250,0), 0 0 28px rgba(167,139,250,0.3); }
  100% { box-shadow: 0 0 0 0 rgba(167,139,250,0), 0 0 28px rgba(167,139,250,0.3); }
}
#play-btn.playing { animation: pulse-ring 2.5s ease-out infinite; }

@keyframes badgeFade {
  from { opacity: 0; transform: translateY(-5px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.badge-animate { animation: badgeFade 0.3s ease; }

.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
}

.modal-overlay {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
}

.mode-btn {
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
