/* ============================================================
   MUSIC PAGE — GLOBAL LAYOUT
============================================================ */
/* ============================================================
   MUSIC PAGE BACKGROUND
============================================================ */

body {
  background:
    radial-gradient(
      circle at top,
      rgba(255, 215, 140, 0.38) 0%,
      rgba(255, 215, 140, 0.12) 22%,
      transparent 48%
    ),

    linear-gradient(
      to bottom,
      #f8f4ec 0%,
      #eee4d2 40%,
      #ddd1bc 100%
    );
}

.music-main {
  padding: 40px 20px;

  background:
    linear-gradient(
      to bottom,
      rgba(235,245,255,0.10),
      rgba(255,245,225,0.06)
    ),

    url('/assets/img/heaven-clouds.webp');

  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;

  min-height: 100vh;
}

.albums-grid-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================
   ALBUM GRID
============================================================ */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

.album-card {
  cursor: pointer;
  background: none;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.album-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.album-cover {
  width: 100%;
  height: clamp(140px, 22vw, 260px);
  background-size: cover;
  background-position: center;
  border-radius: 10px 10px 0 0;
}

.album-info {
  background: rgba(255,255,255,0.55);
  padding: 12px;
  border-radius: 0 0 10px 10px;
  backdrop-filter: blur(4px);
}

.album-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 4px;
  color: #7a6a5a;
}

.album-meta {
  font-size: 0.9rem;
  color: #7a6a5a;
  opacity: 0.8;
}

/* ============================================================
   POPUP OVERLAY (GLASS BLUR)
============================================================ */
.album-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  display: none;
  z-index: 10050;
  align-items: flex-start;
  justify-content: flex-start;
}

.album-popup-overlay[aria-hidden="false"] {
  display: flex;
}

/* ============================================================
   POPUP — MODERN GRADIENT THEME
============================================================ */
.album-popup {
  background: linear-gradient(to right, #D9C7A8, #9AB4C5);
  border-radius: 12px;
  padding: 16px 16px 14px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.25);
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 110px);
  display: flex;
  flex-direction: column;
  color: #7a6a5a;
  position: fixed;
  box-sizing: border-box;
  overflow: hidden;
  animation: popupFadeModern 0.35s ease-out;
}

@keyframes popupFadeModern {
  0% {
    opacity: 0;
    transform: scale(0.92);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

/* Close button */
.popup-close-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255,255,255,0.45);
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #7a6a5a;
  padding: 4px 8px;
  border-radius: 6px;
}

/* ============================================================
   POPUP TITLE
============================================================ */
.album-popup-title {
  font-family: "Italianno", cursive;
  font-size: 2rem;
  font-weight: 400;
  color: #7a6a5a;
  text-align: center;
  margin: 0.4em 0;
  letter-spacing: 0.04em;
}

.album-popup-title::before,
.album-popup-title::after {
  content: "♬";
  font-size: 1.5rem;
  color: #7a6a5a;
  margin: 0 0.35em;
}

/* ============================================================
   TRACKLIST
============================================================ */
.album-popup-tracklist-wrapper {
  max-height: 150px;
  overflow-y: auto;
  margin: 6px 0 10px;
  padding-right: 4px;
  padding-left: 2px;
}

.album-popup-tracklist {
  list-style: decimal;
  padding-left: 28px;
  margin: 0;
}

.album-popup-tracklist li {
  padding: 6px 0;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  color: #7a6a5a;
  font-size: 0.92rem;
  transition: background 0.15s ease;
}

.album-popup-tracklist li:hover {
  background: rgba(255,255,255,0.35);
}

.album-popup-tracklist li.is-playing {
  font-weight: 600;
  background: rgba(0,0,0,0.08);
}

/* ============================================================
   PLAY ALBUM BUTTON
============================================================ */
.album-popup-play {
  width: 100%;
  padding: 10px 0;
  background: rgba(255,255,255,0.45);
  color: #7a6a5a;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.1s ease;
}

.album-popup-play:hover {
  background: rgba(255,255,255,0.65);
  transform: translateY(-1px);
}

.album-popup-play:active {
  transform: translateY(1px);
}

/* ============================================================
   POPUP PLAYER
============================================================ */
.popup-player {
  display: flex;
  align-items: center;
  gap: 10px;
}

.popup-player-cover {
  width: 48px;
  height: 48px;
  background-size: cover;
  background-position: center;
  border-radius: 6px;
  background-color: rgba(255,255,255,0.4);
}

.popup-player-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #7a6a5a;
}

.popup-player-meta {
  font-size: 0.75rem;
  color: #7a6a5a;
  opacity: 0.8;
}

/* ============================================================
   PLAYER CONTROLS
============================================================ */
.popup-player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.player-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  color: #7a6a5a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
}

.player-btn:hover {
  background: rgba(255,255,255,0.65);
  transform: translateY(-1px);
}

.player-btn:active {
  transform: translateY(1px);
}

/* ============================================================
   PROGRESS BAR
============================================================ */
.player-progress {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.4);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.player-progress-fill {
  width: 0%;
  height: 100%;
  background: #7a6a5a;
  transition: width 0.1s linear;
}

/* ============================================================
   BODY SCROLL LOCK
============================================================ */
body.popup-open {
  overflow: hidden;
}

/* ============================================================
   RESPONSIVE GRID FIXES
============================================================ */
@media (max-width: 900px) {
  .albums-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
  }
}

@media (max-width: 700px) {
  .albums-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .albums-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .album-card {
    max-width: 160px;
    margin: 0 auto;
  }
}
.music-main {
  padding-top: 170px;
}
.music-main #mini-player,
.music-content #mini-player {
  display: none !important;
}
.album-popup-overlay {
  align-items: center !important;
  justify-content: center !important;
}

.album-popup {
  position: fixed;
}
#mini-player {
  display: none !important;
}
.player-btn svg {
  width: 16px;
  height: 16px;
  fill: #7a6a5a;
  display: block;
}

.album-popup-overlay {
  align-items: center !important;
  justify-content: center !important;
}
.popup-player-left {
  display: flex;
  align-items: center;
  width: 220px; /* locks the left side */
  flex-shrink: 0;
}

.popup-player-controls {
  flex-shrink: 0;
}
.popup-player-left {
  display: flex;
  align-items: center;
  width: 220px;
  flex-shrink: 0;
}

.popup-player-controls {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
}
.player-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  transition: background 0.15s ease, transform 0.1s ease;
}

.player-btn:hover {
  background: rgba(255,255,255,0.75);
  transform: translateY(-1px);
}

.player-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
  stroke: #7a6a5a;
  fill: #7a6a5a;
}
/* === POPUP SIZE MATCHES ALBUM CARD === */
.album-popup {
  width: 260px !important;
  max-width: 90vw;
}
/* ensure JS positioning wins */
.album-popup {
  position: fixed;
  transform: none !important;
}
/* === MODERN BUTTON STYLE (SAFE OVERLAY) === */
.player-btn {
  border: 1px solid rgba(255,255,255,0.5) !important;

  background: linear-gradient(
    135deg,
    rgba(255, 220, 160, 0.7),
    rgba(180, 140, 90, 0.4)
  ) !important;

  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.6),
    0 2px 6px rgba(0,0,0,0.25);

  transition: all 0.2s ease;
}

/* hover */
.player-btn:hover {
  background: rgba(255, 230, 180, 0.9) !important;
  transform: scale(1.08);
}

/* click */
.player-btn:active {
  transform: scale(0.95);
}
/* middle button = play */
.popup-player-controls .player-btn:nth-child(2) {
  width: 42px;
  height: 42px;

  background: linear-gradient(
    135deg,
    rgba(255, 240, 200, 0.95),
    rgba(220, 180, 120, 0.6)
  ) !important;
}
/* slightly tighter layout */
.album-popup {
  padding: 14px 12px !important;
}

.album-popup-tracklist-wrapper {
  max-height: 120px !important;
}
/* === FIX PLAYER LAYOUT FOR SMALL POPUP === */

.popup-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* REMOVE HARD WIDTH LOCK */
.popup-player-left {
  width: auto !important;
  flex: 1;
  min-width: 0;
}

/* KEEP CONTROLS VISIBLE */
.popup-player-controls {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
}

/* slightly smaller buttons so they fit */
.player-btn {
  width: 30px !important;
  height: 30px !important;
}
.album-popup {
  width: 300px !important;
}
.popup-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.popup-player-cover {
  width: 56px !important;
  height: 56px !important;
  border-radius: 8px;
  flex-shrink: 0;
}
.popup-player-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.popup-player-title {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-btn {
  width: 32px !important;
  height: 32px !important;
}
.popup-player-controls {
  gap: 10px;
}
.album-popup {
  width: 320px !important;
}
.popup-player-controls {
  gap: 12px;
  margin-left: 6px; /* creates breathing room from text */
}
.popup-player-title {
  max-width: 140px;
}
.player-btn {
  width: 28px !important;
  height: 28px !important;
}
.player-btn svg {
  width: 14px !important;
  height: 14px !important;
}
.popup-player-controls {
  flex-shrink: 0;
}
.popup-player-title {
  flex: 1;
  min-width: 0;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.popup-player {
  gap: 8px;
}
.popup-player-controls {
  margin-top: 6px !important;
}
.popup-player {
  margin-top: 6px;
}
/* === PUSH CONTROLS DOWN CLEANLY === */
.popup-player {
  align-items: flex-end !important;
}

/* add spacing above controls */
.popup-player-controls {
  margin-top: 10px !important;
}

/* subtle cinematic card separation */
.album-card {
  box-shadow:
    0 8px 20px rgba(0,0,0,0.10);
}

/* ============================================================
   MUSIC PAGE — GLASS HEADER
============================================================ */

body.music-page .site-header {
  background-color: rgba(255,255,255,0.025) !important;
  background-image: none !important;
  background-blend-mode: overlay;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-bottom: 1px solid rgba(255,255,255,0.22);

  box-shadow:
    0 4px 18px rgba(255,255,255,0.10),
    0 2px 12px rgba(0,0,0,0.08);

  overflow: hidden;
}

body.music-page .site-title,
body.music-page .main-nav a {
  color: #4f6177 !important;

  text-shadow:
    0 1px 10px rgba(255,255,255,0.65);
}

body.music-page .logo-wrap::before {
  background: rgba(255,255,255,0.32) !important;
  filter: blur(6px);
}