.music-filters {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: #121318;
}

.music-filters-inner {
    width: 100%;
    margin: 0;
    padding: 16px var(--gap, 24px);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.music-filters form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    width: 100%;
}

.music-type-filters {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.music-type-filters legend {
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 12px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.9);
    width: auto;
    flex-shrink: 0;
    padding: 0;
}

.music-type-filters label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: transparent;
    transition: all 0.2s ease;
    user-select: none;
    min-width: auto;
    text-align: center;
}

.music-type-filters label:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

/* Hide the actual checkbox visually but keep it accessible */
.music-type-filters input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Active state (checked) - filled button with active color */
.music-type-filters input[type="checkbox"]:checked + span,
.music-type-filters label:has(input[type="checkbox"]:checked) {
    background: #51ac32;
    border-color: #51ac32;
    color: #ffffff;
    font-weight: 600;
}

/* For browsers that support :has() */
.music-type-filters label:has(input[type="checkbox"]:checked) {
    background: #51ac32;
    border-color: #51ac32;
    color: #ffffff;
    font-weight: 600;
}

/* Music search results – match discovery pages (Albums/Tracks) look */
.music-results.music-search-results-wrap {
    width: 100%;
    margin: 0;
    padding: 0;
    max-width: none;
}

.music-results-intro {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.music-results-title {
    margin: 0 0 8px 0;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--color-text, #fff);
    letter-spacing: -0.02em;
}

.music-results-desc {
    margin: 0;
    font-size: 1rem;
    color: var(--color-text-subtle, rgba(255, 255, 255, 0.7));
    line-height: 1.45;
}

.result-group {
    margin-bottom: 40px;
    padding-top: 28px;
}

.result-group:first-of-type {
    padding-top: 0;
}

.result-group-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-accent, #a8d5ba);
    margin: 0 0 16px 0;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.result-group h3:not(.result-group-title) {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin: 20px 0 10px 0;
}

.result-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-group li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.result-group li:last-child {
    border-bottom: none;
}

.result-group li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.result-group li a:hover {
    color: var(--color-accent, #a8d5ba);
    text-decoration: none;
}

.result-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Live search results */
.live-search-results {
    width: 100%;
}

.music-results.live {
    /* Same styles as regular results */
}

/* Albums on Music search: same grid and cards as /music/albums/ */
.result-albums .latest-albums-slideshow,
.result-albums .albums-slideshow-container,
.result-albums .albums-slideshow-wrapper.albums-discovery-grid {
  width: 100%;
  max-width: none;
}
.result-albums .latest-albums-slideshow .albums-slideshow-wrapper.albums-discovery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}
.result-albums .album-card {
  position: relative;
  width: 200px;
  margin: 0 auto;
}

/* ==========================================================================
   Homepage – Latest Albums (same look as /simuze/ reference)
   ========================================================================== */
.latest-albums-slideshow {
  width: 100%;
  max-width: none;
  margin: 0 0 48px 0;
  padding: 0;
}
.latest-albums-slideshow .albums-header {
  margin: 0 0 24px 0;
  padding: 0;
}
.latest-albums-slideshow .albums-header h3 {
  font-size: clamp(1.75rem, 2vw, 2.25rem);
  font-weight: 600;
  color: var(--color-text, #fff);
  margin: 0;
  padding: 0;
}
.latest-albums-slideshow .albums-slideshow-container {
  width: 100%;
  max-width: none;
}
.latest-albums-slideshow .albums-slideshow-wrapper {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}
.latest-albums-slideshow .albums-slideshow-wrapper.albums-discovery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}
.latest-albums-slideshow .album-card {
  position: relative;
  width: 200px;
  max-width: 200px;
  margin: 0 auto;
}
.latest-albums-slideshow .album-card .album-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}
.latest-albums-slideshow .album-card .album-link:hover {
  opacity: 0.9;
}
.latest-albums-slideshow .album-artwork {
  width: 200px;
  height: 200px;
  line-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 auto;
}
.latest-albums-slideshow .album-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.latest-albums-slideshow .album-info {
  padding: 12px 0 0 0;
}
.latest-albums-slideshow .album-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text, #fff);
  margin: 0 0 4px 0;
  line-height: 1.3;
}
.latest-albums-slideshow .album-artist {
  font-size: 0.9rem;
  color: var(--color-text-subtle, rgba(255, 255, 255, 0.7));
  margin: 0 0 8px 0;
}
.latest-albums-slideshow .album-artist a {
  color: var(--color-text-subtle, rgba(255, 255, 255, 0.7));
  text-decoration: none;
}
.latest-albums-slideshow .album-artist a:hover {
  color: var(--color-accent, #a8d5ba);
}
.latest-albums-slideshow .album-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  width: 100%;
}
.latest-albums-slideshow .album-actions .playlist-dropdown {
  display: inline-flex;
}
.latest-albums-slideshow .album-actions .icon-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
  font-size: 0;
}
.latest-albums-slideshow .album-actions .icon-small:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
/* Local SVG icons – small square, same size as reference */
.latest-albums-slideshow .album-actions .icon-small svg {
  width: 11px;
  height: 11px;
  display: block;
  margin: 0;
  fill: currentColor;
  flex-shrink: 0;
}
.latest-albums-slideshow .album-actions span.license-btn {
  cursor: default;
}

/* Groups grid for search results */
.result-artists .groups-grid,
.result-locations .groups-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 4px;
}

.result-artists .group-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.result-artists .group-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.result-artists .group-card a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.result-artists .group-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}

.result-artists .group-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #fff;
}

.result-artists .group-members {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Tracks container for search results */
.result-tracks .tracks-container {
    margin-top: 4px;
    border-radius: 8px;
    overflow: hidden;
}

.result-tracks .upload-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.result-tracks .upload-row:last-child {
    border-bottom: none;
}

/* "See more" link */
.result-more {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.result-more a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.result-more a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Playlists grid for search results */
.result-playlists .playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.playlist-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.playlist-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.playlist-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.playlist-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.playlist-description {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.playlist-owner {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.playlist-owner a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.playlist-owner a:hover {
    text-decoration: underline;
}

/* Location search results – same list/avatar style as Network page (dark-mode avatars) */
.result-locations .network-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.result-locations .network-item {
    margin-bottom: 8px;
}
.result-locations .network-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-text, #fff);
    transition: opacity 0.2s ease;
}
.result-locations .network-item a:hover {
    opacity: 0.8;
}
.result-locations .network-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 8px;
}
.result-locations .network-location-icon-wrap--country {
    display: inline-block;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.result-locations .network-location-icon--country {
    opacity: 0.5;
    object-fit: cover;
    object-position: center;
}
.result-locations .network-name {
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Albums / Tracks discovery – shared with template_music.php (search + filters)
   and template_albums.php (no duplicate inline CSS required)
   -------------------------------------------------------------------------- */
.music-search-form-wrap {
    margin: 0;
    padding: 0;
}

.music-search-with-filter {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.music-search-with-filter input[type="search"],
.music-search-with-filter .music-filter-toggle,
.music-search-with-filter button[type="submit"] {
    min-height: 44px;
    box-sizing: border-box;
}

.music-search-with-filter .music-filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 22px;
    background: #000 !important;
    border: 1px solid #333 !important;
    border-radius: 999px;
    color: #fff !important;
    font-size: 0.96rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.music-search-with-filter .music-filter-toggle:hover {
    background: #1a1a1a !important;
    border-color: #444 !important;
}

.music-filter-slidedown {
    width: 100%;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
    background: #0d0e12;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.music-filter-slidedown.is-open {
    max-height: 580px;
}

.music-filter-slidedown-inner {
    width: 100%;
    padding: 20px var(--gap, 24px);
    box-sizing: border-box;
}

.music-filter-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 32px;
    align-items: flex-start;
}

.music-filter-col {
    flex: 0 1 auto;
}

.music-filter-col-genre label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

.music-filter-select {
    width: 100%;
    max-width: 220px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.music-filter-col-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.music-filter-reset {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}

.music-filter-reset:hover {
    background: rgba(255, 255, 255, 0.15);
}

.music-filter-apply {
    padding: 0 22px;
    min-height: 44px;
    border-radius: 999px;
    background: var(--button-color, #a8d5ba);
    color: #111;
    font-weight: 600;
    font-size: 0.96rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.music-filter-apply:hover {
    background: var(--button-color-hover, #c1e2c8);
}

.hero-music .discovery-page-title {
    font-size: 1.85rem;
    line-height: 1.2;
    margin: 0 0 6px 0;
    padding: 0;
    color: #fff;
}

.hero-music .discovery-page-desc {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.65);
}

.albums-order-filters {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.albums-order-filters legend {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-right: 8px;
    padding: 0;
    width: auto;
}

.albums-order-tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.albums-order-tab:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
}

.albums-order-tab.active {
    background: var(--color-accent, #a8d5ba);
    border-color: var(--color-accent, #a8d5ba);
    color: #111;
}

/* Bottom sheet album player (template_albums.php) */
.album-player-slider {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10050;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.album-player-slider.is-open,
.album-player-slider[aria-hidden="false"] {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
}

.album-player-slider-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    pointer-events: auto;
}

.album-player-slider-inner {
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    background: #12141a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px 12px 0 0;
    padding: 16px 20px 20px;
    pointer-events: auto;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
}

.album-player-slider-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.25rem;
    cursor: pointer;
}

.album-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    cursor: pointer;
    z-index: 2;
}

.album-modal-prev {
    left: 8px;
}

.album-modal-next {
    right: 8px;
}

