/* ================= HomeMusic — CSS (cleaned) ================= */
/* Palette & layout vars */
:root {
  --bg: #121212;
  --bg-elev: #181818;
  --bg-elev-2: #1a1a1a;
  --text: #e5e5e5;
  --muted: #b3b3b3;
  --white: #ffffff;
  --accent: #1db954;
  --accent-2: #1ed760;
  --border: #2a2a2a;
  --range-bg: #2b2b2b;
  --top-h: 72px;
  --bottom-h: 140px;
  --tabs-w: 64px;
  --radius: 12px;
}

/* ========== Base ========== */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  overflow: hidden;
} /* prevent stray page scroll */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ========== App frame ========== */
.app {
  display: grid;
  grid-template-rows: var(--top-h) 1fr var(--bottom-h);
  height: 100vh;
  /* Responsive scaling based on viewport */
  transform-origin: top left;
}

/* Automatic scaling based on viewport width */
/* Default: no scaling for viewports >= 1600px */

/* Scale to 90% for smaller viewports */
@media (max-width: 1599px) {
  .app {
    zoom: 0.9;
  }
}

/* Scale to 80% for medium viewports */
@media (max-width: 1399px) {
  .app {
    zoom: 0.8;
  }
}

/* Scale to 70% for smaller viewports */
@media (max-width: 1199px) {
  .app {
    zoom: 0.7;
  }
}

/* Scale to 60% for very small viewports */
@media (max-width: 999px) {
  .app {
    zoom: 0.6;
  }
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Space between title and icon */
  padding: 0 20px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 200px;
  background: linear-gradient(90deg, #1db954 0%, #121212 100%);
  pointer-events: none;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
  position: relative;
  z-index: 1;
}

.topbar-icon {
  width: calc(var(--top-h) * 0.7); /* 80% of topbar height */
  height: calc(var(--top-h) * 0.7); /* Square: ~58px */
  object-fit: contain;
  position: relative;
  z-index: 1;
  border-radius: 4px;
}

/* Main grid: tabs + pages */
.main {
  display: grid;
  grid-template-columns: var(--tabs-w) 1fr;
  min-height: 0;
}

/* Tabs rail */
.tabs-rail {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.tab-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.tab-btn:hover {
  background: var(--bg-elev-2);
  color: #eaeaea;
}
.tab-btn.is-active {
  background: var(--bg-elev-2);
  color: var(--accent);
}
.tab-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Pages stack */
.pages {
  height: 100%;
  overflow: hidden;
}
.page {
  display: none;
  height: 100%;
  min-height: 0;
}
.page.is-active {
  display: grid;
  grid-template-rows: 128px 1fr 72px;
}

/* ========== Select Songs (page) ========== */
/* Page top / filters */
.page-top {
  padding: 16px 20px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.page-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}
.filters-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field span {
  color: var(--muted);
  font-size: 12px;
}
.field input,
.field select {
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text);
  padding: 0 10px;
  outline: none;
  /* Override browser accent color */
  accent-color: #777;
  /* Force appearance */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Add dropdown arrow back */
.field select {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23b3b3b3" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px;
  padding-right: 32px;
}

.field input:focus,
.field select:focus {
  border-color: #777;
  background-color: var(--bg-elev);
}

/* Dropdown options - these work in Firefox and some browsers */
.field select option {
  background: var(--bg-elev-2);
  color: var(--text);
  padding: 8px 10px;
}

.field select option:checked {
  background: #777 !important;
  color: var(--text) !important;
  font-weight: normal;
}

/* Hover states - works in some browsers */
.field select option:hover,
.field select option:focus {
  background: #555 !important;
  color: var(--text) !important;
  outline: none;
}

/* Firefox-specific */
@-moz-document url-prefix() {
  .field select option:hover {
    background-color: #555 !important;
  }
  .field select option:checked {
    background-color: #777 !important;
  }
}

/* Webkit-specific (Chrome, Safari, Edge) */
.field select:focus option:checked {
  background: linear-gradient(#777, #777) !important;
  background-color: #777 !important;
}

.field select:focus option:hover {
  background: linear-gradient(#555, #555) !important;
  background-color: #555 !important;
}

.field input::placeholder {
  color: #777;
}

/* Typeahead */
.field-with-suggest {
  position: relative;
}
.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  max-height: 260px;
  overflow: auto;
  z-index: 20;
}
.suggest button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
}
.suggest button:hover,
.suggest button.is-active {
  background: #222;
}

/* Filter actions */
.filters-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
}
.btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
}
.btn:hover {
  background: #202020;
}
.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: #000;
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--accent-2);
}

/* Page body / table wrapper with Spotify-like scrollbars */
.page-body {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.table-wrap {
  flex: 1;
  overflow: auto;
  position: relative;
  padding: 0 20px 12px;
}
.table-wrap {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.table-wrap:hover {
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 8px;
}
.table-wrap:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}
.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

/* Songs table */
.songs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.songs-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg-elev);
}
.songs-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--bg-elev);
  color: #d8d8d8;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.15px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.songs-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.songs-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Sortable headers + resizer */
.col-check {
  width: 44px;
  text-align: center;
}
.is-sortable .caret {
  display: none;
}
.is-sortable.is-sorted .caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  margin-left: 6px;
  transform: translateY(2px);
}
.is-sortable.is-sorted.is-desc .caret {
  border-top: none;
  border-bottom: 6px solid var(--muted);
}
.col-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  cursor: col-resize;
}
.col-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 2px;
  background: transparent;
}
.songs-table thead th.resizing,
.songs-table thead th:hover .col-resizer::after {
  background: rgba(255, 255, 255, 0.12);
}

/* Page bottom */
.page-bottom {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
}
.table-meta-left {
  color: var(--muted);
  font-size: 12px;
  padding: 0 12px;
}
.page-actions {
  display: flex;
  gap: 10px;
}
.page-actions-right {
  margin-left: auto;
}

/* Custom checkbox */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #222;
  cursor: pointer;
  position: relative;
}
input[type="checkbox"]:hover {
  border-color: #3a3a3a;
}
input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: transparent;
}
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: 2px solid #000;
  border-left: none;
  border-top: none;
  transform: rotate(45deg);
}

/* ========== Now Playing (page) ========== */
#page-now {
  grid-template-rows: 1fr;
}

/* Two-column layout: viz + list */
.np-container {
  display: flex;
  gap: 16px;
  height: 100%;
  padding: 16px 20px;
  min-height: 0;
  position: relative;
  /* Original gradient - starts from bottom */
  background: linear-gradient(
    0deg,
    rgba(90, 20, 20, 0.35) 0%,
    rgba(0, 0, 0, 0.25) 35%,
    rgba(0, 0, 0, 0) 70%
  );
}

/* Right column list panel */
.nplist {
  flex-shrink: 0;
  width: 340px;
  background: rgba(24, 24, 24, 0.35); /* Very transparent - glass effect */
  backdrop-filter: blur(20px) saturate(180%); /* Strong glass blur */
  border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle glass edge */
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.nplist-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.nplist .badge {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: #bfbfbf;
}

/* List scroller + subtle scrollbars */
#nplist {
  list-style: none;
  margin: 0;
  padding: 8px 6px;
  flex: 1 1 auto;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
#nplist:hover {
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
#nplist::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
#nplist::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 8px;
}
#nplist:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}
#nplist::-webkit-scrollbar-track {
  background: transparent;
}

/* List items */
#nplist li {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
}
#nplist li:hover {
  background: rgba(255, 255, 255, 0.04);
}
#nplist li.active {
  outline: 2px solid var(--accent);
  background: rgba(29, 185, 84, 0.08);
}
.np-art {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.np-title {
  font-weight: 700;
  color: #eaeaea;
  line-height: 1.2;
}
.np-movie {
  font-size: 12px;
  color: var(--muted);
}

/* Shuffle */
.shuffle-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.shuffle-btn:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}
.shuffle-icon {
  width: 15px;
  height: 15px;
  display: block;
  pointer-events: none;
}

/* Song card (over viz) */
.viz {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

/* BEC backdrop - fills entire viz section */
.bec-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.song-card {
  flex-shrink: 0;
  width: 340px;
  height: 100%;
  border-radius: 16px;
  background: rgba(24, 24, 24, 0.3); /* Very transparent - glass effect */
  backdrop-filter: blur(20px) saturate(180%); /* Strong glass blur */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle glass edge */
}

.art-wrap {
  position: relative;
  flex-shrink: 0;
  width: 340px;
  height: 340px; /* Fixed square area */
  background: #0b0b0b;
}
#cardArt {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Keep as requested */
}
/* .card-gradient removed - gradient now on np-container background */
.card-meta {
  position: relative;
  z-index: 1;
  /*flex: 1;  Fill remaining space below image */
  padding: 20px 14px;
  display: grid;
  gap: 8px; /* Tighter spacing - stack items closer */
  overflow-y: auto; /* Allow scroll if metadata is long */
}
.card-songtitle {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}
.card-movie {
  font-size: 18px;
  font-weight: 600;
  color: #d6d6d6;
}
.card-composer {
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 10px;
  color: #d6d6d6;
}
.card-line {
  font-size: 12px;
  color: #c7c7c7;
}
.hidden {
  display: none !important;
}

/* Badge (shared) */
.badge {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  color: #bfbfbf;
}

/* ========== Bottom controls ========== */
.bottombar {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.bottombar > .pc {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 56px 84px;
  grid-template-columns: 8fr 17fr 50fr 17fr 8fr;
  grid-template-areas:
    " leftcorner  now     controls   .         rightcorner "
    " leftcorner  now     progress   vol       rightcorner ";
  align-items: center;
  justify-items: center;
  column-gap: 0;
  row-gap: 4px;
}

/* Corner areas for composer images */
.pc-corner-left {
  grid-area: leftcorner;
  position: relative;
  width: 100px;
  height: 100px;
  align-self: end;
  justify-self: start;
  overflow: hidden;
  visibility: hidden;
}

.pc-corner-right {
  grid-area: rightcorner;
  position: relative;
  width: 100px;
  height: 100px;
  align-self: end;
  justify-self: end;
  overflow: hidden;
  visibility: hidden;
}

.corner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
}

/* Glowing light overlay - Left corner (bottom-left to top-right) */
.pc-corner-left::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    45deg,
    rgba(29, 185, 84, 0.8) 0%,
    /* Green glow at corner */ rgba(29, 185, 84, 0.8) 35%,
    /* Fading green */ rgba(80, 80, 80, 0.8) 65%,
    rgba(12, 12, 12, 0.8) 100% /* Gray transition  rgba(18, 18, 18, 0) 100% */
      /* Transparent at opposite corner */
  );
  mix-blend-mode: screen; /* Creates the "light" effect */
}

/* Glowing light overlay - Right corner (bottom-right to top-left) */
.pc-corner-right::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(29, 185, 84, 0.8) 0%,
    /* Green glow at corner */ rgba(29, 185, 84, 0.3) 35%,
    /* Fading green */ rgba(80, 80, 80, 0.2) 65%,
    /* Gray transition */ rgba(18, 18, 18, 0) 100%
      /* Transparent at opposite corner */
  );
  mix-blend-mode: screen; /* Creates the "light" effect */
}

/* Row 1: transport */
.pc-controls {
  grid-area: controls;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  align-self: end;
  padding-bottom: 0;
  margin-bottom: -8px; /* Bring closer to progress bar */
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #eaeaea;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn:hover {
  background: #212121;
}
.icon-btn:hover svg {
  fill: var(--accent);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.play-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #000;
}
.play-btn:hover {
  background: var(--accent-2);
}
.play-btn .icon-play {
  width: 20px;
  height: 20px;
  fill: #000;
}
.play-btn .icon-pause {
  display: none;
  width: 18px;
  height: 18px;
  fill: #000;
}

/* Row 2: now + progress + volume */
.pc-now {
  grid-area: now;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center vertically in the full height */
  gap: 6px;
  min-width: 180px;
  align-self: stretch; /* Take full height of both rows */
}
.pc-now.hidden {
  visibility: hidden;
}
.now-art {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #212121;
  visibility: hidden;
}
.now-title {
  max-width: 160px;
  color: #dcdcdc;
  font-size: 12px;
  line-height: 1;
  margin-top: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-progress {
  grid-area: progress;
  width: 100%;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 10px;
  align-self: center;
}
.time {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* Rails */
.pc-progress input[type="range"],
.vol {
  width: 100%;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  outline: none;
  background: var(--range-bg);
  cursor: pointer;
}
.pc-progress input[type="range"]::-webkit-slider-thumb,
.vol::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: -4px;
  box-shadow: 0 0 0 4px rgba(29, 185, 84, 0.2);
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
  will-change: transform;
}
.pc-progress input[type="range"]:hover::-webkit-slider-thumb,
.vol:hover::-webkit-slider-thumb {
  background: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(29, 185, 84, 0.25);
  transform: scale(1.1);
}

/* Improve track rendering */
.pc-progress input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: inherit;
}

.pc-vol {
  grid-area: vol;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  min-width: 200px;
  align-self: center;
}
.vol {
  width: 160px;
}

/* Mute button with stacked icons */
#btnMute {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #eaeaea;
  display: grid;
  place-items: center;
  cursor: pointer;
}
#btnMute .vol-icon {
  position: absolute;
  width: 22px;
  height: 22px;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  fill: #cfcfcf;
}
#btnMute .vol-mute {
  display: none;
}
#btnMute.is-muted .vol-on {
  display: none;
}
#btnMute.is-muted .vol-mute {
  display: block;
  fill: #ffd74a;
}
/* ========== Message Box ========== */

/* Modal overlay */
.hm-msgbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  animation: hmFadeIn 0.2s forwards;
}

@keyframes hmFadeIn {
  to {
    opacity: 1;
  }
}

/* Message box container */
.hm-msgbox {
  background: #282828;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  min-width: 400px;
  max-width: 500px;
  overflow: hidden;
  transform: scale(0.9);
  animation: hmPopIn 0.2s forwards;
}

@keyframes hmPopIn {
  to {
    transform: scale(1);
  }
}

/* Title bar with green gradient */
.hm-msgbox-title {
  background: linear-gradient(135deg, #1db954 0%, #1ed760 50%, #1db954 100%);
  color: #fff;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hm-msgbox-title::before {
  content: "♪";
  font-size: 20px;
  opacity: 0.9;
}

/* Message content */
.hm-msgbox-content {
  padding: 24px 20px;
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  min-height: 60px;
}

/* Button container */
.hm-msgbox-buttons {
  padding: 0 20px 20px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Button styles */
.hm-msgbox-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
}

.hm-msgbox-btn-primary {
  background: #1db954;
  color: #fff;
}

.hm-msgbox-btn-primary:hover {
  background: #1ed760;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29, 185, 84, 0.4);
}

.hm-msgbox-btn-secondary {
  background: #404040;
  color: #fff;
}

.hm-msgbox-btn-secondary:hover {
  background: #535353;
  transform: translateY(-1px);
}

.hm-msgbox-btn:active {
  transform: translateY(0);
}

/* Responsive design */
@media (max-width: 500px) {
  .hm-msgbox {
    min-width: 90%;
    max-width: 90%;
  }
}

/* ========== Recommended Songs / Playlist Cards ========== */

/* Override grid layout for recommended page */
#page-recommended.is-active {
  display: block;
}

/* Recommended container */
.recommended-container {
  padding: 40px;
  overflow-y: auto;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.recommended-container:hover {
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}
.recommended-container::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.recommended-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}
.recommended-container:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
}
.recommended-container::-webkit-scrollbar-track {
  background: transparent;
}

.recommended-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 30px 0;
  color: #fff;
}

/* Playlist grid - 2 columns */
.playlists-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Playlist card */
.playlist-card {
  display: flex;
  width: 100%;
  height: 120px;
  background: var(--bg-elev);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.playlist-card:hover {
  background: #222;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* Card image */
.card-image {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  background: #282828;
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: translateX(100%);
  transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-image img.visible {
  opacity: 1;
  transform: translateX(0);
}

.card-image img.slide-out-left {
  opacity: 0;
  transform: translateX(-100%);
}

.card-image img.slide-in-from-right {
  opacity: 0;
  transform: translateX(100%);
}

/* Card content */
.card-content {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px 0;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-description {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0 0 8px 0;
}

.card-count {
  font-size: 11px;
  color: #999;
  font-weight: 500;
  margin-top: auto;
}

/* Bottom gradient overlay - maroon to gray */
.playlist-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(
    to top,
    rgba(90, 20, 20, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 55%,
    rgba(0, 0, 0, 0) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .playlists-grid {
    grid-template-columns: 1fr;
    max-width: 550px;
  }
}

@media (max-width: 600px) {
  .recommended-container {
    padding: 20px;
  }
}
