/* ================= GLOBAL ================= */
body {
  margin: 0;
  /* font-family: -apple-system, BlinkMacSystemFont, sans-serif; */
  /* font-family: 'Montserrat', -apple-system, sans-serif; */
  font-family: 'Montserrat', -apple-system, sans-serif;
  background: #0b0b0b;
  color: #fff;
}

h1 { margin: 0; }

/* ================= TOP BAR ================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  height: 74px;              /* exact visual balance */
  padding: 0 22px;

  background: #121212;
  border-bottom: 1px solid #1e1e1e;
}

/* ================= EXACT HEADER ================= */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  height: 128px;
  padding-bottom: 0;
  padding-left: 30px;
  padding-right: 30px;
  padding-top: 0px;

  background: #121212;
  border-bottom: 1px solid #1e1e1e;
}

/* BRAND */
.brand {
  display: flex;
  align-items: center;
}

/* IMAGE */
.brand-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid #000;
  margin-top: 14px;
  margin-left: 0px;
  margin-right: 54.3906px;
  margin-bottom: 14px;
}

/* TEXT STACK */
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height:100px;
}

/* NAME */
.brand-name {
  font-family: Muli, sans-serif;
  font-size: 22px;
  font-weight: 800;
  height: 27.5px;
  letter-spacing: 1.1px;
  line-height: 27.5px;
  text-size-adjust: 100%;
  width: 315px;
}

/* SUBTEXT */
.brand-sub {
  font-family: Muli, sans-serif;
  font-size: 12px;
  font-style: italic;
  font-weight: 400;
  height: 28px;
  letter-spacing: 0.12px; 
  line-height: 14.004px;
  margin-bottom: 0px;
  margin-left: 0px;
  margin-right: 0px;
  margin-top: 7px;
  width: 315px;
}

/* ================= FILTERS ================= */
.filters {
  display: flex;
  align-items: center;
}

.filters select {
  margin-left: 10px;
  padding: 6px 10px;

  font-size: 12px;

  background: #1e1e1e;
  color: #fff;
  border: none;
  border-radius: 4px;
}

/* ================= MAIN ================= */
.main {
  padding: 20px;
  padding-bottom: 120px;
}

.section-title {
  margin-bottom: 20px;
  font-size: 24px;
}

/* ================= ALBUM GRID ================= */

.album-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;   /* 🔥 key fix */
}

/* ================= ALBUM CARD ================= */

.album-card {
  width: 300px;                  /* 🔥 fixed width */
  background: #181818;
  padding: 16px;
  border-radius: 10px;

  display: flex;
  flex-direction: column;
  align-items: center;          /* center top section */
  text-align: center;
}

.album-card:hover {
  background: #222;
  transform: translateY(-4px);
}

.album-card img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.album-card h3 {
  margin: 8px 0 4px;
  font-size: 16px;
}

.album-card p {
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
}


.album-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, #1db954, #444);
  margin: 12px 0 10px;
  border-radius: 2px;
}

/* ================= PLAYER ================= */
.player {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #121212;
  border-top: 1px solid #222;
  display: flex;
  align-items: center;
  padding: 10px 20px;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-left img {
  width: 50px;
  height: 50px;
  border-radius: 5px;
}

.player-center {
  flex: 1;
  text-align: center;
}

audio {
  width: 60%;
}

/* ================= LOADER ================= */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 5px solid #222;
  border-top: 5px solid #1db954;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress {
  width: 200px;
  height: 5px;
  background: #222;
  margin-top: 10px;
}

#progress {
  height: 100%;
  width: 0%;
  background: #1db954;
}

.album-cover {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.album-cover[src]:not([src="images/default-cover.png"]) {
  opacity: 1;
}

/* =========================
   PLAY BUTTON OVERLAY
========================= */
.album-card {
  position: relative;
}

.play-btn:hover {
  transform: scale(1.1);
}

/* ================= TRACK LIST ================= */

.track-list {
  width: 100%;
  text-align: left;       /* 🔥 key */
}

.track-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  cursor: pointer;
}

.track-title {
  flex: 1;
}

.track-duration {
  font-size: 12px;
  opacity: 0.6;
}

.track-row:hover {
  background: #222;
}

.track-row span:last-child {
  white-space: nowrap;
}

.track-row.active {
  background: #1db95422;
  border-left: 3px solid #1db954;
}

.track-btn {
  width: 20px;
  text-align: center;
  color: #1db954;
}

/* ================= TRACK FONT ================= */
.track-row {
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.track-row span:last-child {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.controls button {
  background: none;
  border: none;
  color: #1db954;
  font-size: 18px;
  cursor: pointer;
}

