.music-grid {
  display: grid;
  justify-items: center;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 20px 0;
  width: 100%;
  max-width: 1000px;
}
.music-tile {
  max-width: 300px;
  text-align: center;
  cursor: pointer;
}

.music-tile img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.2s;
}

.music-tile img:hover {
  transform: scale(1.05);
}

.close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}

/* Viewer fills main */
.viewer {
  margin-top: 20px;
}

#backBtn {
  font-family: 'Courier', sans-serif;
  background: #444;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 15px;
}

#backBtn:hover {
  background: #666;
}

.viewer-layout {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

#pdfViewer {
  flex: 3;
  height: 80vh; /* fills most of viewport */
  border: none;
}

.viewer-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.viewer-info h3 {
  margin: 0;
}

.viewer-info audio {
  width: 100%;
}
