:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #111827;
  color: #f3f4f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px;
}

h1 {
  margin-bottom: 8px;
}

header p,
#status {
  color: #aebbd0;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

input[type="search"] {
  flex: 1;
  min-width: 180px;
  padding: 12px;
  border: 1px solid #526078;
  border-radius: 8px;
  background: #1f2937;
  color: inherit;
  font: inherit;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="range"] {
  width: 100px;
  accent-color: #60a5fa;
}

output {
  min-width: 4ch;
  text-align: right;
}

button {
  padding: 12px 16px;
  border: 1px solid #526078;
  border-radius: 8px;
  background: #263449;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:hover {
  background: #364862;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 3px;
}

#stop {
  background: #7f1d1d;
  border-color: #b94a4a;
}

#stop:hover {
  background: #991b1b;
}

#status {
  min-height: 24px;
}

.category {
  margin-top: 28px;
}

.category h2 {
  font-size: 1.15rem;
}

.clips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.clip {
  min-height: 64px;
  overflow-wrap: anywhere;
}

.clip.playing {
  background: #1d4ed8;
  border-color: #93c5fd;
}

@media (max-width: 600px) {
  .clips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
