/* Scoped styles for Music Library page only
   Safe to include in addition to main theme CSS.
   These rules only affect elements inside body.music-library
*/
body.music-library {
  --accent: #f2b700;
  --accent-2: #111115;
  --text: #f6f7f8;
  --muted: #bbbbc0;
  /* Offset for the floating reopen handle so it does not overlap the hero */
  --filters-toggle-offset: calc(var(--site-header-h) + 96px);
  --filters-toggle-offset-mobile: calc(var(--site-header-h) + 76px);
}

/* Utility: hide text visually but keep for screen readers */
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Design tokens for this page */
:root{
  --lib-gap: 20px;
  --lib-radius: 12px;
  --lib-shadow: 0 6px 18px rgba(0,0,0,0.6);
  --btn-radius: 999px;
  /* header/footer sizing used for fixed layouts */
  --site-header-h: 72px;
  /* Match global footer height/padding so footer and fixed sidebar align */
  --site-footer-h: 26px;
  --player-h: 88px;
}
/* Make page a column so footer can stick to bottom when content is short */
body.music-library{
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* footer should match global pages; reserve player space in content instead */
  padding-bottom: 0;
  overflow-x: hidden;
}

/* Keep the footer identical to the rest of the site */
body.music-library .site-footer{
  padding: 26px 0;
  border-top: 1px solid #868686;
  background: var(--bg);
}
body.music-library .site-footer .container{
  width: min(92%, var(--container));
  margin-inline: auto;
  padding-inline: 20px;
}

/* Hide floating cookie buttons/widgets on this page */
body.music-library [class*="cookie"],
body.music-library [id*="cookie"],
body.music-library .cc-window,
body.music-library .cc-floating,
body.music-library .eapps-cookie-consent-floating-button,
body.music-library .fc-widget,
body.music-library .fc-button,
body.music-library .fc_button,
body.music-library .CookieConsent,
body.music-library .cookie-consent,
body.music-library .cookie-button{
  display:none !important;
}

/* Layout wrapper: centered container with sidebar + main column */
.library-layout{ 
  display:grid; 
  grid-template-columns: 320px 1fr; 
  gap:28px; 
  align-items:start; 
  margin-top: 8px;
}

/* Make right column sticky to align with filters */
.library-layout .library-main {
  position: sticky;
  top: calc(var(--site-header-h) + 12px);
  align-self: start;
  z-index: 10;
}

/* When collapsed on desktop, keep a slim gradient rail with the same skin */
body.music-library.filters-collapsed .library-layout{ grid-template-columns: 60px 1fr; }
body.music-library.filters-collapsed .filters-container{
  width: 60px;
  min-width: 60px;
  padding: 10px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: calc(100vh - var(--site-header-h) - 24px);
  cursor: default;
}
/* Show only the collapse toggle inside the rail */
body.music-library.filters-collapsed .filters-header{ padding: 0; margin: 0; justify-content: center; width: 100%; }
body.music-library.filters-collapsed .filters-title{ display:flex; align-items:center; justify-content:center; width:100%; gap:0; }
body.music-library.filters-collapsed .filters-title h3{ display:none; }
body.music-library.filters-collapsed .filters-title .filters-icon{ display:inline-flex; }
body.music-library.filters-collapsed .filters-title .filters-icon{ cursor:pointer; }
body.music-library.filters-collapsed .filters-actions{ display:none; }
body.music-library.filters-collapsed .filters-icon{ display:inline-flex; }
body.music-library.filters-collapsed .filters-collapse-btn{ display:none; }
body.music-library.filters-collapsed .filters-scroll-inner{
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
}
body.music-library.filters-collapsed .filter-group{
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
}
body.music-library.filters-collapsed .filters-clear{ display:none !important; }

/* Fixed external sidebar (Artlist-like) */
body.music-library .filters-container{
  background: linear-gradient(180deg, #121218 0%, #0c0c10 100%);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  padding: 0 18px 48px 12px;
  width: 320px;
  min-width: 320px;
  color:var(--text);
  position: sticky;
  top: calc(var(--site-header-h) + 12px);
  overflow-y:hidden;
  overflow-x:hidden;
  z-index: 2;
  transform: translateX(0);
  transition: none;
}

/* Collapsed state: shrink to the toggle icon but stay visible */
/* In collapsed state, keep the rail static; highlight only the icon */
body.music-library.filters-collapsed .filters-container:hover{
  border-color: rgba(255,255,255,0.04);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}
body.music-library.filters-collapsed .filters-title .filters-icon:hover{
  border-color: rgba(255,255,255,0.28);
  background: rgba(20,20,26,0.95);
  box-shadow: 0 12px 26px rgba(0,0,0,0.5);
  transform: translateY(-1px);
}

body.music-library .filters-container:hover,
body.music-library .filters-container:focus-within{
  overflow-y:auto;
}

/* Unify filter icons for header and collapsed toggle */
.filters-toggle-handle svg,
.filters-icon svg{
  display:block;
  width:18px;
  height:18px;
  opacity:0.95;
}
.filters-toggle-handle svg rect:first-child,
.filters-icon svg rect:first-child{ display:none; }
.filters-toggle-handle svg rect,
.filters-toggle-handle svg circle,
.filters-toggle-handle svg g{ fill: currentColor; }
.filters-icon svg rect,
.filters-icon svg circle,
.filters-icon svg g{ fill: currentColor; }

/* Controls row alignment */
.library-controls{
  display: flex;
  align-items: center;
  gap: 18px;
}

/* Sort select styled to match site UI */
body.music-library .library-sort{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: linear-gradient(180deg, #1a1a22 0%, #111117 100%);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  padding: 12px 38px 12px 14px;
  min-width: 200px;
  height: 48px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  cursor: pointer;
}
body.music-library .library-sort:focus{
  outline: none;
  border-color: rgba(255,255,255,0.32);
  box-shadow: 0 12px 32px rgba(0,0,0,0.42), 0 0 0 1px rgba(255,255,255,0.06);
}
body.music-library .library-sort option{
  background: #0f0f14;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}
body.music-library .library-sort::-ms-expand{ display:none; }
body.music-library .library-sort{
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f6f7f8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

/* Sidebar toggle button */
/* Inline toggle inside the controls row */

.filters-toggle-handle{
  position: relative;
  left: 0;
  top: 0;
  z-index: 1;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(10,10,14,0.95);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
}
/* Inline toggle should appear only on mobile when the sidebar is fully hidden */
@media (max-width: 800px){
  body.music-library.filters-collapsed .filters-toggle-handle{ display:flex; border-color: rgba(255,255,255,0.26); }
}

@media (max-width: 800px){
  .filters-toggle-handle{ left: 0; top: 0; }
}

body.music-library .filters-container::-webkit-scrollbar{ width: 10px; }
body.music-library .filters-container::-webkit-scrollbar-track{ background: #0c0c10; border-radius: 999px; }
body.music-library .filters-container::-webkit-scrollbar-thumb{ background: rgba(255,255,255,0.16); border-radius: 999px; border: 2px solid #0c0c10; }
body.music-library .filters-container::-webkit-scrollbar-thumb:hover{ background: rgba(255,255,255,0.26); }

/* Main content wrapper (left-aligned, not centered) */
.main-wrap{
  /* Keep content left-aligned close to filters, no centering */
  margin: 0;
  flex: 1 0 auto; /* allow main-wrap to grow and push footer down */
  padding-bottom: calc(var(--player-h) + 48px);
}

body.music-library .main-content{
  padding: 28px 20px;
  display: block;
  color: var(--text);
  width: 100%;
  box-sizing: border-box;
}

/* Override global .container on main-wrap so content isn't constrained */
body.music-library .main-wrap.container{
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

@media (min-width: 801px){
  body.music-library .main-wrap{
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }
}

/* HERO / intro block */
.main-content .hero-card{
  margin: 72px auto 72px;
  padding: 0 24px;
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.main-content .hero-card h1{ font-size: clamp(56px, 8vw, 80px); margin:0 0 16px; }
.main-content .hero-card p{ margin:0; color:var(--muted); font-size: 2.2rem; }

/* Filters */
.filters-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 0;
  margin: 10px 0 26px;
  cursor: pointer;
}
.filters-header h3{margin:0;font-size:0.95rem;font-weight:800;letter-spacing:0.04em;text-transform:uppercase;color:var(--text)}
.filters-title{display:flex;align-items:center;gap:10px}
.filters-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:10px;
  background: rgba(10,10,14,0.95);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  color: var(--text);
  transition: none;
}
.filters-header:hover .filters-icon{
  border-color: rgba(255,255,255,0.28);
  background: rgba(20,20,26,0.95);
  box-shadow: 0 12px 26px rgba(0,0,0,0.5);
  transform: none;
}
.filters-icon svg{display:block;width:18px;height:18px;opacity:0.95;}
.filters-icon svg rect:first-child{display:none;}
.filters-icon svg rect,
.filters-icon svg circle,
.filters-icon svg g{fill: currentColor;}


.filters-clear{display:none !important;}
.filters-actions{display:flex;align-items:center;gap:8px;margin-left:auto;}
.filters-collapse-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(10,10,14,0.9);
  color: var(--text);
  cursor:pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.filters-collapse-btn:hover,
.filters-collapse-btn:focus-visible{
  border-color: rgba(255,255,255,0.28);
  background: rgba(20,20,26,0.95);
  transform: translateY(-1px);
}
.filters-header:hover .filters-collapse-btn{
  border-color: rgba(255,255,255,0.28);
  background: rgba(20,20,26,0.95);
  transform: translateY(-1px);
}
.filters-collapse-btn svg{display:block;width:16px;height:16px;transition: transform 0.18s ease;}
body.music-library.filters-collapsed .filters-collapse-btn svg{ transform: rotate(180deg); }
.filter-group{margin-bottom:0;padding-bottom:0; opacity:1; transform: translateX(0); transition: none;} 
.filter-group:last-child{border-bottom:0;padding-bottom:0;margin-bottom:0}

/* Extra spacing before mood and theme blocks */
.filter-group[data-filter-group="mood"],
.filter-group[data-filter-group="theme"]{
  margin-top: 40px;
}

/* Group header - either static title or interactive toggle */
.filter-group-title,
.filter-group-toggle{
  display:flex;
  align-items:center;
  gap:6px;
  width:100%;
  background: transparent;
  border-radius: 0;
  padding: 0;
  color: rgba(255,255,255,0.7);
  font-weight:750;
  margin: 10px 0;
  border: 0;
  transition: color 0.16s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  padding-left: 12px;
}
.filter-group-title .filter-group-label,
.filter-group-toggle .filter-group-label{
  font-size: 0.78rem;
  color: rgba(255,255,255,0.78);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.filter-group-title::before,
.filter-group-toggle::before{
  content: none;
}

.filter-group-toggle:hover,
.filter-group-toggle:focus-visible{
  color: var(--accent);
}

.filter-group-body{padding-top:6px;display:block;}
/* Collapsible behaviour: animate via max-height and opacity */
.filter-group-body{
  overflow: hidden;
  transition: max-height 260ms cubic-bezier(.2,.8,.2,1), opacity 340ms ease;
  max-height: 2000px;
  opacity: 1;
}
.filter-group[aria-hidden='true'] .filter-group-body{
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.filter-list{ margin-top:10px }
.filter-group-toggle .caret{opacity:0.6;margin-left:8px; transition: transform 160ms ease}
.filter-group[aria-hidden='true'] .filter-group-toggle .caret{ transform: rotate(-90deg) }

.filter-list{ display:flex; flex-wrap:wrap; gap:10px; margin-top:6px; }

.active-filters-bar.dim-chips .active-chip{
  opacity: 0.6;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(255,255,255,0.7);
  transition: opacity 0.18s ease, text-decoration-color 0.18s ease;
}

.active-filters-clear{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.22);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.active-filters-clear:hover{
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  color: #000;
  box-shadow: 0 8px 22px rgba(242,183,0,0.28);
}
.filter-btn{ display:inline-flex; align-items:center; justify-content:center; height:36px; padding:0 12px; font-size:.9rem; border-radius:999px; border:1px solid rgba(255,255,255,0.06); background:transparent; color:var(--text); cursor:pointer; transition: opacity 0.34s ease, transform .18s ease, background .18s ease, color .18s ease; opacity:1; }
.filter-btn:hover{ transform: translateY(-2px); }
.filter-btn.active{ background:var(--accent); color:#000; border-color:transparent; box-shadow: 0 6px 18px rgba(242,183,0,0.12);} 
body.music-library.filters-collapsed .filter-btn{ opacity:0; transform: translateY(6px); pointer-events:none; }

@media (max-width: 800px){
  .library-layout{ display:block; }
  .filters-container{ position:static; width:100%; height:auto; margin-bottom:18px; top:auto; max-height:none; padding:18px 20px; }
  /* Reset main-wrap margin so centered content isn't pushed off-screen on small viewports */
  .main-wrap{ margin-left: 0; padding-left: 0; padding-right: 0; padding-top: calc(72px + 12px); box-sizing:border-box; }
  .main-content{ padding:18px 20px }
  .filter-btn{ height:32px; padding:0 10px }

  /* On mobile, hide the rail entirely when collapsed and rely on inline toggle */
  body.music-library.filters-collapsed .library-layout{ grid-template-columns: 1fr; }
  body.music-library.filters-collapsed .filters-container{ display:none; }
}

/* Table styles */
.main-content table{ width:100%; border-collapse: separate; border-spacing:0 12px; }
.main-content thead th{ text-transform:uppercase; color:var(--muted); font-size:.78rem; font-weight:700; padding:8px 12px; }
.main-content tbody{ display:block; }
.main-content .library-panel{ 
  display:flex; flex-direction:column; gap:4px;
  margin-bottom:28px;
  padding: 0 24px;
}

/* Controls inside the library panel: search left, sort right */
.library-controls{ display:flex; align-items:center; justify-content:flex-start; gap:18px; }
.lib-search{ background: rgba(17,17,21,0.6); border-radius:12px; padding:12px 14px; color:var(--muted); border:1px solid rgba(255,255,255,0.02); width:100%; max-width: 600px; }
/* Hide browser's default search clear button */
.lib-search::-webkit-search-cancel-button{ -webkit-appearance: none; display: none; }
.lib-search::-webkit-search-decoration{ display: none; }
.lib-search:focus{ outline: 2px solid rgba(242, 183, 0, 0.3); outline-offset: 0; border-color: rgba(242, 183, 0, 0.2); }
/* Custom search clear button */
.search-wrapper{ position: relative; display: flex; align-items: center; }
.search-clear{ 
  color: var(--muted); 
  transition: opacity 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}
.search-clear:hover{ 
  opacity: 1 !important; 
  color: var(--text);
}
.search-clear:active{
  transform: translateY(-50%) scale(0.95);
}
.library-controls select{ width:160px; background: rgba(17,17,21,0.6); color:var(--text); border-radius:10px; padding:8px 10px; border:1px solid rgba(255,255,255,0.03) }

.tracks-table{ width:100%; border-collapse:collapse; }
.tracks-table tbody{ display:block; }
.track-row{ display:grid; grid-template-columns: 48px minmax(0,1.1fr) minmax(0,0.85fr) minmax(90px,0.35fr) minmax(0,1.35fr) 60px 60px 48px; gap:16px; align-items:center; padding:12px 16px; background: rgba(17,17,21,0.4); border-radius:8px; margin-bottom:8px; transition: background 0.2s; }

/* Empty state row - NO grid, just centered content */
.track-row-empty{ display:block; padding:50px 20px 35px; margin-bottom:8px; text-align:center; }
.track-row-empty td{ display:block; padding:0; border:none; background:transparent; }

/* Section header row */
.track-row-section{ display:block; padding:20px 0 15px 0; margin-bottom:8px; }
.track-row-section td{ display:block; padding:0; border:none; background:transparent; text-align:left; }
.track-row:hover{ background: rgba(30,30,35,0.6); }
.track-row td{ padding:0; }

/* Play button */
.track-play-cell{ display:flex; align-items:center; justify-content:center; }
.track-play{ width:40px; height:40px; border-radius:50%; border:0; background:transparent; color:#fff; display:flex; align-items:center; justify-content:center; cursor:pointer; transition: transform 0.2s, background 0.2s; }
.track-play:hover{ background: rgba(255,255,255,0.1); transform: scale(1.1); }
.track-play svg{ width:24px; height:24px; }
.track-play .icon-pause{ display:none; }
.track-play[aria-pressed="true"] .icon-play{ display:none; }
.track-play[aria-pressed="true"] .icon-pause{ display:block; }

/* Track info */
.track-info-cell{ min-width:0; }
.track-info{ display:flex; flex-direction:column; gap:6px; }
.track-title{ font-weight:600; font-size:15px; color:var(--text); text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.3; }
.track-title:hover{ color:var(--accent); }
.track-meta-cell{ min-width:0; }
.track-meta-cell .track-tags{ justify-self:flex-start; }
.track-versions-cell{ text-align:center; }
.version-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(255,255,255,0.08);
  color:var(--text);
  font-size:13px;
  font-weight:600;
  letter-spacing:0.02em;
  cursor:default;
  transition:background 0.2s ease,color 0.2s ease,border-color 0.2s ease;
}
.version-pill-trigger{ display:inline-flex; align-items:center; justify-content:center; position:relative; }
.version-pill-trigger .version-pill{
  border-color:rgba(255,255,255,0.04);
  background:rgba(255,255,255,0.03);
  min-width:46px;
  color:rgba(255,255,255,0.7);
  font-size:12px;
  letter-spacing:0.04em;
}
.version-pill-trigger:hover .version-pill,
.version-pill-trigger:focus .version-pill,
.version-pill-trigger:focus-within .version-pill{
  background:rgba(255,255,255,0.08);
  border-color:rgba(255,255,255,0.16);
  color:rgba(255,255,255,0.92);
}
.version-pill:hover{
  background:rgba(242,183,0,0.16);
  border-color:rgba(242,183,0,0.4);
  color:var(--accent);
}
.version-pill--empty{
  border-style:dashed;
  border-color:rgba(255,255,255,0.12);
  background:transparent;
  color:rgba(255,255,255,0.35);
  padding:4px 0;
  min-width:52px;
  justify-content:center;
}
.version-pill-label{
  position:absolute;
  bottom:calc(100% + 8px);
  left:50%;
  transform:translate(-50%,2px);
  background:rgba(5,5,10,0.9);
  color:rgba(255,255,255,0.8);
  padding:3px 10px;
  border-radius:999px;
  font-size:10px;
  font-weight:600;
  letter-spacing:0.08em;
  text-transform:uppercase;
  border:1px solid rgba(255,255,255,0.05);
  opacity:0;
  pointer-events:none;
  white-space:nowrap;
  transition:opacity 0.1s ease, transform 0.1s ease;
}
.version-pill-trigger:hover .version-pill-label,
.version-pill-trigger:focus .version-pill-label,
.version-pill-trigger:focus-within .version-pill-label{
  opacity:1;
  transform:translate(-50%,0);
}
.track-tags{
  position:relative;
  overflow:hidden;
  max-width:100%;
  --marquee-duration: 5s;
  --marquee-distance: 0px;
}
.track-tags::before,
.track-tags::after{
  content:'';
  position:absolute;
  top:0;
  bottom:0;
  width:28px;
  pointer-events:none;
  z-index:2;
  opacity:0;
  transition:opacity 0.2s ease;
}
.track-tags::before{
  left:0;
  background:linear-gradient(90deg, rgba(10,10,14,0.7), rgba(10,10,14,0));
}
.track-tags::after{
  right:0;
  background:linear-gradient(270deg, rgba(10,10,14,0.95), rgba(10,10,14,0));
}
.track-tags-inner{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:2px;
  white-space:nowrap;
  transform:translateX(0);
  transition:transform 0.3s ease;
}
.track-tags:hover .track-tags-inner{
  animation: marquee var(--marquee-duration) linear infinite alternate;
}
.track-tags.marquee-disabled:hover .track-tags-inner{ animation:none; }
.track-tags.marquee-disabled::before,
.track-tags.marquee-disabled::after{ opacity:0; }
.track-tags.has-overflow::after{ opacity:0.85; }
.track-tags.has-overflow.is-scrolling::before{ opacity:0.7; }
.tag{
  background:none;
  color:rgba(255,255,255,0.72);
  padding:0;
  border-radius:0;
  font-size:13px;
  font-weight:500;
  border:0;
  letter-spacing:0.01em;
  opacity:0.9;
  text-decoration:none;
  display:inline-block;
  transition: color 0.18s ease;
}
.tag:hover{ color:var(--accent); }
.tag::after{
  content:',\00a0';
}
.tag:last-child::after{ content:''; }
@keyframes marquee {
  0% { transform: translateX(0); }
  65% { transform: translateX(calc(-1 * var(--marquee-distance, 0px))); }
  100% { transform: translateX(calc(-1 * var(--marquee-distance, 0px))); }
}

/* Waveform */
.track-wave-cell{ min-width:0; }
.waveform{
  width:100%;
  height:34px;
  display:flex;
  align-items:center;
  position:relative;
  border-radius:0;
  overflow:visible;
  background:none;
  cursor:pointer;
  transition: opacity .2s ease, filter .2s ease;
}
.waveform::after{ content:none; }
.waveform .wf-canvas{
  display:block;
  width:100%;
  height:100%;
}
.waveform:hover{ opacity:0.92; }
.track-row.is-playing .waveform .wf-canvas{
  filter: drop-shadow(0 8px 18px rgba(242,183,0,0.35));
}

/* Stats */
.track-duration-cell, .track-bpm-cell{ color:var(--muted); font-size:14px; text-align:right; white-space:nowrap; }

/* Actions */
.track-actions{ display:flex; align-items:center; justify-content:center; }
.track-download{ width:36px; height:36px; display:flex; align-items:center; justify-content:center; color:var(--muted); background:transparent; border-radius:6px; transition: all 0.2s; text-decoration:none; }
.track-download:hover{ color:var(--accent); background: rgba(242,183,0,0.1); }

/* Playing state: subtle highlight and animated waveform color */
.track-row.is-playing{ box-shadow: 0 8px 28px rgba(0,0,0,0.6); transform: translateY(-2px) }

/* Bottom player */
.bottom-player{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--player-h);
  background: rgba(10,10,14,0.96);
  border: 1px solid rgba(255,255,255,0.06);
  border-width: 1px 0 0;
  box-shadow: 0 -10px 28px rgba(0,0,0,0.55);
  border-radius: 0;
  z-index: 1600;
  color: var(--text);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.bottom-player.is-visible{ opacity:1; transform: translateY(0); pointer-events:auto; }
.bottom-player .player-main{
  display:flex;
  align-items:center;
  gap:16px;
  height:100%;
  padding:12px 22px;
  transition: opacity 0.18s ease;
}
.player-controls{ display:flex; align-items:center; gap:10px; flex:0 0 auto; }
.player-btn{
  width:40px; height:40px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.05);
  color: var(--text);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.player-btn:hover{ transform: translateY(-2px); background:rgba(255,255,255,0.1); border-color:rgba(255,255,255,0.18); }
.player-btn svg{ width:18px; height:18px; }
.player-btn.play-btn{ width:48px; height:48px; background: var(--accent); color:#000; border-color: transparent; box-shadow: 0 10px 24px rgba(242,183,0,0.18); }
.player-btn.play-btn:hover{ transform: translateY(-2px) scale(1.03); }
.player-btn.play-btn .icon-pause{ display:none; }
.bottom-player.is-playing .player-btn.play-btn .icon-play{ display:none; }
.bottom-player.is-playing .player-btn.play-btn .icon-pause{ display:block; }

.player-title-wrap{ min-width:160px; max-width:280px; flex:0 0 auto; }
.player-title{ font-weight:800; font-size:16px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-decoration:none; }
.player-title:hover{ color:var(--accent); text-decoration:none; }
.player-times{ display:flex; align-items:center; gap:8px; flex:0 0 auto; min-width:90px; justify-content:flex-end; }
.player-time{ color:var(--muted); font-variant-numeric: tabular-nums; font-size:12px; }
.player-time-sep{ color:var(--muted); opacity:0.75; font-size:12px; }
.player-meta{ display:flex; align-items:center; justify-content:flex-start; min-width:90px; color:var(--muted); font-size:12px; }
.player-meta .player-bpm{ white-space:nowrap; opacity:0.85; }
.player-volume{ display:flex; align-items:center; gap:12px; min-width:170px; flex:0 0 auto; }
.player-volume svg{ width:18px; height:18px; color:var(--muted); }
.volume-toggle{
  width:40px; height:40px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.volume-toggle:hover{ background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); transform: translateY(-1px); }
.volume-toggle svg{ width:20px; height:20px; }
.volume-toggle .icon-vol-off{ display:none; }
.bottom-player.is-muted .volume-toggle .icon-vol-on{ display:none; }
.bottom-player.is-muted .volume-toggle .icon-vol-off{ display:block; }
.player-volume .volume-slider{ width:120px; -webkit-appearance:none; appearance:none; height:6px; border-radius:999px; background: rgba(255,255,255,0.12); cursor:pointer; }
.player-volume .volume-slider::-webkit-slider-thumb{ -webkit-appearance:none; appearance:none; width:14px; height:14px; border-radius:50%; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.28); }
.player-volume .volume-slider::-moz-range-thumb{ width:14px; height:14px; border-radius:50%; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.28); }

.player-wave{
  height:34px;
  border-radius:10px;
  background: transparent;
  padding: 0;
  width: 100%;
  display: block;
  cursor: pointer;
  flex:1 1 auto;
  min-width:140px;
}
.player-wave .wf-canvas{ filter: drop-shadow(0 8px 18px rgba(242,183,0,0.28)); }

@media (max-width: 1100px){
  .bottom-player{ left: 0; right: 0; }
  .player-volume{ min-width:120px; }
}
@media (max-width: 900px){
  .bottom-player{ left: 0; right: 0; bottom: 0; }
  body.music-library{ padding-left: 0; }
}
@media (max-width: 720px){
  .bottom-player .player-main{ flex-wrap: wrap; }
  .player-wave{ order:4; min-width:100%; }
  .player-volume{ order:5; width:100%; justify-content:flex-end; }
}

@media (max-width: 1200px){
  .main-wrap{ max-width: 960px }
  .track-row{ grid-template-columns: 48px minmax(0,0.9fr) minmax(0,0.8fr) minmax(90px,0.4fr) 1.3fr 60px 60px 40px; gap:14px }
  .track-play{ width:40px; height:40px }
}

@media (max-width: 800px){
  .track-row{ grid-template-columns: 48px minmax(0,1fr) minmax(0,0.8fr) minmax(70px,0.35fr) 48px; gap:6px; padding:12px; }
  .track-tags-inner{ gap:8px }
  .waveform, .track-wave-cell{ display: none; }
  .track-duration-cell, .track-bpm-cell{ display: none; }
  .track-stats{ display: none; }
}

/* Header spacing - position main content so hero aligns with filters top */
.main-wrap{ padding-top: calc(var(--site-header-h) - 28px); }

/* Small tweaks for very small screens */
@media (max-width: 480px){
  .filters-container{ padding:12px 14px; }
  .main-wrap{ padding-top: calc(72px + 12px); }
  .filter-btn{ padding:6px 8px; font-size:.82rem }
  .main-wrap{ margin-left: 0; padding-top: calc(72px + 12px); }
  /* remove left padding used for sidebar reservation on small screens */
  body.music-library{ padding-left: 0; }

}

/* DOWNLOAD button style */
.btn-accent{
  background: linear-gradient(180deg, var(--accent), #e6a800);
  color:#000; padding:10px 18px; border-radius:20px; border:0; font-weight:700; cursor:pointer;
  box-shadow: 0 6px 18px rgba(242,183,0,0.14);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-accent:hover{ transform: translateY(-3px); box-shadow: 0 12px 28px rgba(242,183,0,0.18); }
.btn-accent:active{ transform: translateY(-1px); }

/* Inner scrolling area - hide its native scrollbar and use our faux scrollbar */
.filters-scroll-inner{
  height: calc(100% - 64px); /* subtract header area roughly; header padding already included */
  overflow:auto;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none;    /* Firefox */
  padding-bottom: 48px;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 340ms ease, transform 220ms cubic-bezier(0.25, 0.9, 0.35, 1);
}
.filters-scroll-inner::-webkit-scrollbar{ width:0; height:0 }

/* Faux scrollbar container (positioned inside .filters-container) */
.filters-scrollbar{
  margin-bottom:0;
  padding-bottom:0;
  right: 10px; /* move slightly more to the right */
  top: 12px;
  bottom: 12px;
  width: 12px;
  pointer-events: none; /* the container itself doesn't intercept pointer events */
  display: flex;
  align-items: flex-start;
  z-index: 2000; /* sit above native scroll gutter */
  background: rgba(255,255,255,0.02); /* subtle track to mask native white gutter */
  border-radius: 8px;
  padding: 2px;
  opacity: 0; /* hidden by default, shown on hover */
  padding: 0;
}
.filters-scrollbar .thumb{
  margin: 10px 0;
  width: 8px;
  border-radius: 8px;
  background: #2b2b2b; /* dark thumb */
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 6px 18px rgba(0,0,0,0.6);
  transform-origin: top left;
  transition: opacity .18s ease, transform .12s ease;
  opacity: .98;
}
/* show faux scrollbar only on hover */
.filters-container:hover .filters-scrollbar{ opacity:1 }
.filters-container .filters-scrollbar .thumb{ opacity:0.98 }

/* ============================================
   NEW DESIGN V2 - Card Grid Layout
   ============================================ */

body.music-library-v2 .library-layout-v2 {
  display: block;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

body.music-library-v2 .library-main-v2 {
  width: 100%;
}

body.music-library-v2 .library-panel-v2 {
  width: 100%;
}

body.music-library-v2 .library-controls-v2 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding: 20px 0;
  position: sticky;
  top: calc(var(--site-header-h) + 12px);
  background: var(--bg);
  z-index: 10;
 