@keyframes gradientShift {
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}
body {
  margin: 0;
  padding: 40px 20px;
  font-family: 'Bubblegum Sans', cursive;
  background: linear-gradient(270deg, #87ceeb, #1e90ff, #4169e1);
  background-size: 600% 600%;
  animation: gradientShift 20s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.soundboard-container {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  padding: 40px 20px;
  max-width: 800px;
  width: 100%;
  text-align: center;
}

/* Nav Buttons */
.upload-button, .bg-button {
  position: absolute;
  top: 16px;
  z-index: 10;
  color: white;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 6px 10px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.2s;
}
.upload-button { right: 16px; width: 32px; height: 32px; justify-content: center; padding: 0; }
.bg-button { left: 16px; font-size: 0.9rem; }
.upload-button:hover, .bg-button:hover { background: rgba(255,255,255,0.25); }
.upload-button svg, .bg-button svg { width: 20px; height: 20px; fill: white; }

h1 {
  margin: 0 0 20px;
  font-size: 3.5rem;
  color: #ffffff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

/* Search & Filters */
.search-section {
  max-width: 500px;
  margin: 0 auto 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#search {
  width: 100%;
  padding: 12px 16px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.2rem;
  outline: none;
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
#search::placeholder { color: rgba(255,255,255,0.7); }
#search:focus {
  border-color: rgba(255, 204, 51, 0.75);
  background: rgba(255,255,255,0.22);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.2);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.1s, border-color 0.2s;
}
.filter-chip:has(input:checked) { border-color: #ffcc33; }
.filter-chip input { margin: 0; cursor: pointer; }

/* Colors for chips */
.chip-green:has(input:checked) { background: #16a34a; }
.chip-red:has(input:checked) { background: #e11d48; }
.chip-yellow:has(input:checked) { background: #f59e0b; color: #1a1300; }
.chip-orange:has(input:checked) { background: #f97316; color: #1a1300; }

/* Button grid */
.buttons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.sound-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.2s;
}
.sound-item.hidden { display: none; }

.sound-button {
  position: relative;
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 50%;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0,0,0,0.2), 0 8px 15px rgba(0,0,0,0.3);
  overflow: hidden;
  transition: transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  line-height: 1.1;
}

/* Color gradients */
.sound-button[data-color="green"] { background: radial-gradient(circle at 30% 30%, #4ade80, #16a34a); }
.sound-button[data-color="red"] { background: radial-gradient(circle at 30% 30%, #fb7185, #e11d48); }
.sound-button[data-color="yellow"] { background: radial-gradient(circle at 30% 30%, #fde047, #f59e0b); color: #1a1300; }
.sound-button[data-color="orange"] { background: radial-gradient(circle at 30% 30%, #fdba74, #f97316); color: #1a1300; }

.sound-button:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,0.2); }
.sound-button::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 50%;
  background: rgba(255,255,255,0.2); border-radius: 50% 50% 0 0; pointer-events: none;
}

/* Hotkey UI */
.keymap-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.keymap-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  width: 24px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.keymap-btn svg { width: 14px; height: 14px; fill: white; opacity: 0.8; }
.keymap-pill {
  background: rgba(0,0,0,0.3);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-family: monospace;
}

/* Rest of the controls */
.volume-control { margin-bottom: 25px; color: white; display: flex; align-items: center; justify-content: center; gap: 10px; }
.volume-control label { user-select: none; }

#volume-slider {
  accent-color: #ffcc33;
}

#volume-input {
  width: 110px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-family: 'Bubblegum Sans', cursive;
  font-size: 1.05rem;
  outline: none;
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
#volume-input:focus {
  border-color: rgba(255, 204, 51, 0.75);
  background: rgba(255,255,255,0.22);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}
#volume-input::-webkit-outer-spin-button,
#volume-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#volume-input {
  -moz-appearance: textfield;
}

.mode-bar { margin: 30px 0; display: flex; gap: 10px; justify-content: center; }
.mode-bar button {
  font-family: 'Bubblegum Sans', cursive;
  background: #ff6600; color: white; border: none; padding: 10px 20px; border-radius: 12px; cursor: pointer;
}
.mode-bar button.active { background: #ffcc33; color: #000; box-shadow: 0 0 12px #ffcc33; }
footer { font-size: 0.9rem; color: white; opacity: 0.8; }
