/* =========================================
   BESTOF IMPORTER – MAIN STYLESHEET
   ========================================= */
:root {
  --bo-bg: #fafafa;
  --bo-text: #222;
  --bo-accent: #ff4e00;
  --bo-muted: #777;
  --bo-border: #e3e3e3;
  --bo-radius: 12px;
  --bo-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

body.bestof-active,
.bestof-wrap {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--bo-text);
  background: var(--bo-bg);
  margin: 0 auto;
  padding: 20px;
  max-width: 1200px;
}

/* ===============================
   HEADERS / TITLES
   =============================== */
.bestof-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
}
.bestof-sub {
  color: var(--bo-muted);
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 32px;
}

/* ===============================
   GRID & CARD LAYOUT
   =============================== */
.bestof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.bestof-card {
  background: #fff;
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  box-shadow: var(--bo-shadow);
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bestof-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.bestof-thumb {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-bottom: 1px solid var(--bo-border);
}
.bestof-card h3 {
  margin: 12px 0 4px;
  font-size: 1.05rem;
}
.bestof-card a {
  color: var(--bo-text);
  text-decoration: none;
}
.bestof-card a:hover {
  color: var(--bo-accent);
}

/* ===============================
   FILTER BUTTONS (Years)
   =============================== */
.bestof-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
.bestof-year-btn {
  border: 1px solid var(--bo-border);
  border-radius: var(--bo-radius);
  background: #fff;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.bestof-year-btn:hover {
  background: #f4f4f4;
}
.bestof-year-btn.active {
  background: var(--bo-accent);
  color: #fff;
  border-color: var(--bo-accent);
}

/* ===============================
   COLLAGE HEADERS / BANNERS
   =============================== */
.bestof-banner {
  background-size: cover;
  background-position: center;
  border-radius: var(--bo-radius);
  color: #fff;
  padding: 60px 30px;
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin: 20px 0 30px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--bo-shadow);
}
.bestof-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.bestof-banner a {
  color: #fff;
  position: relative;
  z-index: 2;
  text-decoration: none;
}
.bestof-banner a:hover {
  text-decoration: underline;
}

/* ===============================
   ENTRIES (Lists, Year Pages)
   =============================== */
.bestof-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--bo-border);
  padding: 10px 0;
}
.bestof-entry .thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.bestof-entry .meta {
  flex: 1;
}
.bestof-entry .meta .line1 {
  font-weight: 600;
  font-size: 1rem;
}
.bestof-entry .meta .line2 {
  color: var(--bo-muted);
}

/* ===============================
   BUTTONS (Amazon, Apple, Spotify)
   =============================== */
.bestof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.bestof-iconbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--bo-border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--bo-text);
  transition: all 0.2s ease;
  box-shadow: var(--bo-shadow);
}
.bestof-iconbtn:hover {
  background: #f8f8f8;
  transform: translateY(-1px);
}
.bestof-iconbtn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* ===============================
   SEARCHABLE LISTS (Artists / Sources)
   =============================== */
.bestof-cols {
  column-count: 3;
  column-gap: 24px;
}
.bestof-item {
  display: block;
  margin: 4px 0;
  color: var(--bo-text);
  text-decoration: none;
  transition: color 0.2s;
}
.bestof-item:hover {
  color: var(--bo-accent);
}
@media (max-width: 700px) {
  .bestof-cols { column-count: 2; }
}
@media (max-width: 480px) {
  .bestof-cols { column-count: 1; }
}
#sourceSearch, #artistSearch {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 0 auto 20px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--bo-border);
  font-size: 1rem;
  box-shadow: var(--bo-shadow);
}

/* ===============================
   TOGGLE (Expand/Collapse Lists)
   =============================== */
.bestof-toggle-btn {
  background: none;
  border: none;
  color: var(--bo-accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
}
.bestof-toggle-btn:hover {
  text-decoration: underline;
}
.bestof-hidden {
  display: none;
  margin-top: 6px;
}

/* ===============================
   COLLAGE GRID (for artist & album)
   =============================== */
.bestof-collage {
  position: relative;
  border-radius: var(--bo-radius);
  overflow: hidden;
  margin: 20px 0 30px;
  box-shadow: var(--bo-shadow);
}
.bestof-collage-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}
.bestof-collage-grid img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}
.bestof-collage-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  text-align: center;
}

.bestof-cols {
  column-count: 4;
  column-gap: 2rem;
  width: 100%;
}

.bestof-cols .bestof-item {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  padding: 4px 0;
}

@media (max-width: 900px) { .bestof-cols { column-count: 3; } }
@media (max-width: 700px) { .bestof-cols { column-count: 2; } }
@media (max-width: 480px) { .bestof-cols { column-count: 1; } }

/* ===============================
   MOBILE TWEAKS (larger hit areas)
   =============================== */
@media (max-width: 600px) {
  .bestof-entry {
    padding: 14px 0;
    gap: 16px;
  }
  .bestof-entry .thumb {
    width: 90px;
    height: 90px;
    border-radius: 10px;
  }
  .bestof-entry .meta .line1 {
    font-size: 1.1rem;
  }
  .bestof-entry .meta .line2 {
    font-size: 0.95rem;
  }
  .bestof-iconbtn img {
    width: 22px;
    height: 22px;
  }
}
