/* -------------------------------------------------------
   Base layout
-------------------------------------------------------- */
body {
  font-family: system-ui, sans-serif;
  margin: 0;
  background: #fafafa;
  color: #111;
}

header {
  background: #4B4FA3;
  color: white;
  padding: 1rem;
  text-align: center;
  font-size: 1.5rem;
}

nav {
  background: #eee;
  padding: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  background: #e0e0f5;
  border-radius: 999px;
}

.container {
  padding: 1rem;
  max-width: 900px;
  margin: auto;
}

/* -------------------------------------------------------
   Song containers
-------------------------------------------------------- */
details {
  background: white;
  padding: 1rem;
  margin: 0.6rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

details summary {
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
}

details[open] summary {
  margin-bottom: .8rem;
}


/* -------------------------------------------------------
   Filter bar
-------------------------------------------------------- */
.filter-bar {
  display: flex;
  gap: .6rem;
  margin: 1rem 0 1.2rem;
  flex-wrap: wrap;
}

.filter-bar button {
  padding: .45rem .9rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: #4B4FA3;
  color: white;
  font-weight: 600;
  transition: background .2s;
}

.filter-bar button:hover {
  background: #363a82;
}

/* -------------------------------------------------------
   Expand / Collapse buttons
-------------------------------------------------------- */
.expand-collapse {
  margin: 0.6rem 0 1rem;
  display: flex;
  gap: 0.6rem;
}

.expand-collapse button {
  background: #4B4FA3;
  color: white;
  padding: 0.45rem .9rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.expand-collapse button:hover {
  background: #363a82;
}
.filter-bar {
  display: flex;
  justify-content: center;   /* forces horizontal centering */
  gap: .6rem;
  margin: 1rem auto 1.2rem;
  flex-wrap: wrap;
  width: 100%;
  text-align: center;
}
.filter-centered {
  max-width: 900px;
}
/* -------------------------------------------------------
   Christmas Theme
-------------------------------------------------------- */
body.christmas-theme {
  background: #fdf7f2;
}

body.christmas-theme header {
  background: linear-gradient(90deg, #b30000, #e04040);
}

body.christmas-theme nav a {
  background: #ffe9e9;
  color: #900;
  border: 1px solid #ffbcbc;
}

body.christmas-theme .part-badge {
  border-radius: 6px; /* Slightly squarer for a 'card' feel */
}

body.christmas-theme .track.playing {
  background: #fff4f4;
  border-left: 4px solid #b30000;
}

body.christmas-theme .now-playing {
  background: #b30000;
  box-shadow: 0 0 6px #ff3333;
}

/* Decorative subtle snow shimmer around details */
body.christmas-theme details {
  border: 1px solid #ffd7d7;
  box-shadow: 0 2px 6px rgba(255,0,0,0.15);
}
/* -------------------------------------------------------
   Segmented Control Filter Bar
-------------------------------------------------------- */

.segment {
  display: inline-flex;
  background: #e3e6ff;
  border-radius: 999px;
  padding: 0.3rem;
  gap: 0;
}

.segment input[type="radio"] {
  display: none;
}

.segment label {
  padding: .45rem 1rem;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 600;
  color: #333;
  transition: all 0.25s;
}

/* Default (unselected) */
.segment label:hover {
  background: rgba(75,79,163,0.12);
}

/* Selected state */
.segment input[type="radio"]:checked + label {
  background: #4B4FA3;
  color: white;
  box-shadow: 0 2px 6px rgba(75,79,163,0.4);
}

/* Christmas override (colour swap) */
body.christmas-theme .segment {
  background: #ffe3e3;
}

body.christmas-theme .segment label:hover {
  background: rgba(180, 0, 0, 0.12);
}

body.christmas-theme .segment input[type="radio"]:checked + label {
  background: #b30000;
  color: white;
}

/* -------------------------------------------------------
   Version headers
-------------------------------------------------------- */
.version-header {
  font-size: 1.1rem;
  margin: 0.6rem 0 0.4rem;
  color: #444;
}




/* -------------------------------------------------------
   Speed control row
-------------------------------------------------------- */
.speed-control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 140px;
}

.speed-slider {
  width: 110px;
}

/* =============== Layout for each track row =============== */

.track-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 0.9rem;
    line-height: 1;
  vertical-align: middle;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.03);
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.08s ease,
    opacity 0.15s ease;
  margin-bottom: 0.35rem;
}

.track-row:hover {
  background: #f5f7ff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* When something else is playing, gently fade the others */
.track-row.dimmed {
  opacity: 0.45;
}

/* Active track – clearer highlight */
.track-row.playing {
  opacity: 1;
  background: #eef3ff;
  box-shadow: 0 0 0 2px rgba(102, 126, 255, 0.35);
}

/* =============== Part badges (pastel colours) =============== */

.part-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.6rem;
  margin-right: 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
    line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.part-badge::after {
  content: attr(data-desc);
  margin-left: 0.45rem;
  padding: 0.12rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 12px;
}


/* Tenor – soft blue */
.part-badge.tenor {
  background: #e2f1ff;
  color: #194c8c;
}

/* Lead – soft pink */
.part-badge.lead {
  background: #ffe5ec;
  color: #a03155;
}

/* Baritone – soft green */
.part-badge.baritone {
  background: #e6f5e9;
  color: #245b3a;
}

/* Bass – soft yellow */
.part-badge.bass {
  background: #fff7d9;
  color: #735600;
}

/* All parts – purple neutral */
.part-badge.allparts {
  background: #eee6ff;
  color: #4c3585;
}

/* Generic / Track */
.part-badge.track,
.part-badge.nopart {
  background: #eceff4;
  color: #394150;
}



/* Download button styling (you already have something similar; adjust as needed) */
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: none;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  background: #4b5cff;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(75,92,255,0.35);
}
.download-btn:hover {
  background: #3b4ae0;
}
