/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

::-webkit-scrollbar {
   width: 5px;
   height: 9px;
  
}

::-webkit-scrollbar-thumb {
   background: #444;
   border-radius: 5px;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #121212;
  color: #fff;
}

/* ---------- App shell ---------- */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 20px clamp(10px, 2vw, 40px);
}

/* ---------- Fixed Header ---------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #121212;
    z-index: 1000;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

header h1 {
    text-align: center;
    margin-bottom: 10px;
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.search-bar input {
  max-width: 300px;
  flex: 1 1 300px;
  padding: 10px 15px;
  border-radius: 5px;
  border: none;
  outline: none;
  color: #ccc;
  background: #1e1d1d;
}

.search-bar button {
  width: 10px;
  padding: 10px 24px;
  border: none;
  border-radius: 5px;
  background: #292929;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.search-bar button:hover {
  background: #0d5dac;
}

/* ---------- Beat list ---------- */
main {
  flex: 1 1 auto;            
  position: relative;
  top: 8rem;
}

.beat-list {
  list-style: none;
  display: grid;
  gap: 20px;
  /* Three cards across on desktop, fluid below that   */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (min-width: 1024px) {   /* make sure we get exactly 3 across ≥1024 px */
  .beat-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Beat card ---------- */
.beat-list li {
  background: #1e1e1e;
  padding: 15px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: background 0.3s;
}

.beat-list li.active {
  background: #2e2e2e;
}

.beat-info {
  display: flex;
  gap: 15px;
}

.beat-info img {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
}

.beat-info-text .name {
  font-weight: bold;
  font-size: 1.2em;
  display: block;
}

.beat-info-text .artist {
  color: #aaa;
  font-size: 0.9em;
  display: block;
  margin-top: 4px;
}


/* ---------- Player controls ---------- */
.controls {
  display: flex;
  gap: 12px;
  margin-top: 1rem;
}

.controls button {
  display: grid;
  place-content: center;
  width: 42px;
  height: 42px;
  border-radius: 5px;
  background: #0d5dac;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.controls button:hover {
  background: #292929;
}

/* ---------- Progress bar ---------- */
.audio-meta {
  margin-top: 1rem;
}

.time-info {
  font-size: 0.85rem;
  color: #ccc;
  margin-bottom: 4px;
}

.progress-bar {
  width: 100%;
  appearance: none;
  height: 6px;
  background: #444;
  border-radius: 3px;
  outline: none;
}

.progress-bar::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #0d5dac;
  border: none;
  margin-top: -3px;
}