/* ===========================================================
   Music & Video tab styling — matches the Infinity dark-glass
   design system used by index.html (neomorphic, low-contrast,
   pink #ec4899 accent).
   =========================================================== */

/* ---------- Hero ---------- */
.music-hero {
  background:
    radial-gradient(120% 140% at 12% 0%, rgba(236, 72, 153, 0.18) 0%, transparent 55%),
    radial-gradient(120% 140% at 88% 100%, rgba(139, 92, 246, 0.16) 0%, transparent 55%),
    rgba(6, 6, 8, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.music-hero-art {
  width: 168px;
  height: 168px;
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
}

@media (max-width: 767px) {
  .music-hero-art { width: 132px; height: 132px; }
}

/* ---------- Cards (top tracks / artists / videos) ---------- */
/* Dark glass base keeps text readable over the animated WebGL backdrop. */
.media-card {
  background: rgba(8, 8, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  transition: border-color 0.3s, background-color 0.3s, transform 0.3s;
}
.media-card:hover {
  background: rgba(20, 20, 24, 0.82);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.media-thumb {
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.05);
}

/* ---------- Track rows ---------- */
.track-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(8, 8, 10, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.25s, border-color 0.25s;
  cursor: pointer;
}
.track-row:hover {
  background: rgba(24, 24, 28, 0.85);
  border-color: rgba(255, 255, 255, 0.16);
}
.track-row.is-current {
  background: rgba(60, 12, 38, 0.82);
  border-color: rgba(236, 72, 153, 0.45);
}
.track-row.is-current .track-name { color: #f9a8d4; }

/* Equalizer bars shown on the currently playing row */
.eq-bars { display: flex; align-items: flex-end; gap: 2px; height: 13px; }
.eq-bars span {
  width: 2px;
  background: #ec4899;
  border-radius: 1px;
  height: 30%;
  animation: eqPulse 0.9s ease-in-out infinite;
}
.eq-bars span:nth-child(2) { animation-delay: 0.18s; }
.eq-bars span:nth-child(3) { animation-delay: 0.36s; }
.eq-bars span:nth-child(4) { animation-delay: 0.54s; }
.eq-bars.is-paused span { animation-play-state: paused; }

@keyframes eqPulse {
  0%, 100% { height: 25%; }
  50%      { height: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .eq-bars span { animation: none; height: 60%; }
  .media-card:hover { transform: none; }
}

/* ---------- Account / license tab ----------
   Glass-card treatment adapted from the new UI design sample (stronger
   blur+saturate, layered shadow, animated gradient border) — same technique,
   kept on the site's own cyan/purple/pink accent trio (see .ambient-glow-*)
   instead of the sample's blue palette, and with zero markup/id changes so
   account-ui.js / admin-ui.js keep working untouched. */

/* Small "// SECTION TAG" label above the license panel's H1 — the old
   ui.css had this, but that whole file also force-styled `header`/`body`/
   `.bento-card` with dark !important rules that fought the sample's new
   light/dark theme toggle, so ui.css was dropped entirely and this one
   still-needed rule moved here instead. */
.eyebrow {
  color: rgba(244, 241, 234, 0.5);
  font: 600 10px/1.4 'JetBrains Mono', monospace;
  letter-spacing: 0.38em;
  text-transform: uppercase;
}

/* The license panel's text/border/background utility classes (text-white/NN,
   border-white/NN, bg-white/[NN]) were authored for the old always-dark
   site as a fixed white-at-various-opacities hierarchy. Rather than
   patching in a second, hand-picked dark/light color pair of our own,
   these now resolve straight to the sample's own --text-main/--text-muted/
   --text-sub design tokens (same ones every native sample element already
   uses) — so the license panel is a first-class citizen of the sample's
   color system and both themes come free from its own token definitions,
   no separate light-mode-only block needed. Scoped to #panel-license only —
   nothing else on the site uses these Tailwind classes this way. Covers
   dynamically-rendered content too (account-ui.js / admin-ui.js build
   license/request rows with these exact classes at runtime). */
#panel-license [class~="text-white"],
#panel-license [class~="text-white/95"],
#panel-license [class~="text-white/90"],
#panel-license [class~="text-white/85"],
#panel-license [class~="text-white/80"] { color: var(--text-main) !important; }
#panel-license [class~="text-white/70"],
#panel-license [class~="text-white/65"],
#panel-license [class~="text-white/60"],
#panel-license [class~="text-white/55"],
#panel-license [class~="text-white/50"] { color: var(--text-muted) !important; }
#panel-license [class~="text-white/45"],
#panel-license [class~="text-white/40"],
#panel-license [class~="text-white/35"],
#panel-license [class~="text-white/30"],
#panel-license [class~="text-white/25"],
#panel-license [class~="text-white/20"],
#panel-license [class~="text-white/15"],
#panel-license [class~="text-white/10"],
#panel-license [class~="text-white/5"] { color: var(--text-sub) !important; }
#panel-license [class~="hover:text-white"]:hover,
#panel-license [class*="hover:text-white/"]:hover { color: var(--text-main) !important; }

#panel-license [class~="border-white"],
#panel-license [class*="border-white/"],
#panel-license [class*="border-dashed"] { border-color: var(--sub-card-border) !important; }
#panel-license [class~="hover:border-white"]:hover { border-color: var(--card-border) !important; }

#panel-license [class*="bg-white/"] { background-color: var(--sub-card-bg) !important; }
#panel-license [class*="hover:bg-white/"]:hover { background-color: var(--card-hover-bg) !important; }

/* Exception: the solid pink CTA buttons (bg-[#ec4899]) keep white text in
   both themes — their background is the fixed brand color, not part of the
   light/dark surface system, so white stays the correct contrast choice. */
#panel-license [class*="bg-[#ec4899]"] { color: #ffffff !important; }

input.auth-input::placeholder,
textarea.auth-input::placeholder { color: var(--text-sub); opacity: 0.7; }

/* Desktop: lay the license/account sections out two-up instead of one long
   centered column — each section (My licences, Yêu Cầu Kích Hoạt, admin
   panels, ...) already reads fine at ~650px wide (.auth-panel's own
   max-width), so a 1320px-wide desktop viewport was mostly empty margin on
   both sides. column-gap only (no row-gap) since each section's own mb-12
   already provides vertical spacing between rows. */
@media (min-width: 1024px) {
  .license-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
    align-items: start;
  }
}

/* Auth / License Panel (Glass Container with Border Beam & Spotlight Support) */
.auth-panel {
  position: relative;
  background: var(--container-bg);
  backdrop-filter: var(--container-blur);
  -webkit-backdrop-filter: var(--container-blur);
  border: 1px solid var(--container-border);
  border-radius: 24px;
  box-shadow: var(--container-shadow);
  isolation: isolate;
  contain: layout style;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Animated gradient border beam — pure CSS */
.auth-panel::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(115deg, transparent 10%, #00d2ff 30%, #8b5cf6 55%, #0066ff 75%, transparent 90%);
  background-size: 220% 220%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.45;
  pointer-events: none;
  z-index: -1;
  animation: authPanelBeam 7s linear infinite;
}
@keyframes authPanelBeam {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-panel::after { animation: none; }
}

/* Specular Mirror Glass Light Beam Sweep for Action & License Buttons */
.btn-primary,
.btn-secondary,
.auth-switch,
.month-pill {
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary::before,
.btn-secondary::before,
.auth-switch::before,
.month-pill::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -90%;
  width: 70%;
  height: 220%;
  background: linear-gradient(
    115deg,
    transparent 15%,
    rgba(255, 255, 255, 0.2) 35%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(0, 210, 255, 0.5) 55%,
    transparent 75%
  );
  transform: rotate(25deg);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 3;
}

.btn-primary:hover::before,
.btn-secondary:hover::before,
.auth-switch:hover::before,
.month-pill:hover::before {
  opacity: 1;
  transform: rotate(25deg) translateX(300%);
}

/* Primary Submit / CTA Button */
.btn-primary {
  background: linear-gradient(135deg, #0066ff 0%, #00d2ff 100%) !important;
  color: #ffffff !important;
  border: none;
  border-radius: 14px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 28px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Secondary Button */
.btn-secondary {
  background: var(--btn-sec-bg);
  border: 1px solid var(--btn-sec-border);
  color: var(--btn-sec-text);
  border-radius: 14px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.btn-secondary:hover {
  background: var(--btn-sec-hover);
  border-color: rgba(0, 102, 255, 0.6);
  color: var(--primary);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 22px rgba(0, 102, 255, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

/* Inputs & Form Controls */
input.auth-input,
select.auth-input,
textarea.auth-input,
input.form-input,
select.form-input,
textarea.form-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

input.auth-input:focus,
select.auth-input:focus,
textarea.auth-input:focus,
input.form-input:focus,
select.form-input:focus,
textarea.form-input:focus {
  outline: none;
  border-color: #0066ff;
  background: var(--card-hover-bg);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.18);
}

input.auth-input:invalid:not(:placeholder-shown),
textarea.auth-input:invalid:not(:placeholder-shown),
input.form-input:invalid:not(:placeholder-shown),
textarea.form-input:invalid:not(:placeholder-shown) {
  border-color: rgba(248, 113, 113, 0.5);
}

select.auth-input option,
select.form-input option {
  background: var(--palette-bg);
  color: var(--text-main);
}

/* Tab Switcher (Login / Register) */
.auth-switch {
  background: var(--sub-card-bg);
  border: 1px solid var(--sub-card-border);
  color: var(--text-muted);
  border-radius: 100px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}
.auth-switch:hover {
  color: var(--text-main);
  border-color: rgba(0, 102, 255, 0.45);
  background: var(--btn-sec-hover);
  transform: translateY(-1.5px);
}
.auth-switch.active {
  background: linear-gradient(135deg, #0066ff 0%, #00d2ff 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 6px 20px var(--primary-glow), inset 0 1px 1.5px rgba(255, 255, 255, 0.65);
}

/* Status Messages */
.msg-error   { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; }
.msg-success { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); color: #6ee7b7; }
.msg-info    { background: rgba(0, 102, 255, 0.12); border: 1px solid rgba(0, 102, 255, 0.35); color: #93c5fd; }

/* Status Badges */
.badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.badge-pending  { background: rgba(245, 158, 11, 0.14);  color: var(--amber-accent, #f59e0b); border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-approved { background: rgba(16, 185, 129, 0.14); color: var(--emerald-accent, #10b981); border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-rejected { background: rgba(239, 68, 68, 0.14);  color: var(--rose-accent, #f43f5e); border: 1px solid rgba(239, 68, 68, 0.35); }
.badge-expired  { background: var(--sub-card-bg); color: var(--text-sub); border: 1px solid var(--sub-card-border); }

/* Month Pills */
.month-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--sub-card-border);
  color: var(--text-muted);
  background: var(--sub-card-bg);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.month-pill:not([aria-pressed="true"]):hover {
  border-color: rgba(0, 102, 255, 0.45);
  color: var(--text-main);
  background: var(--btn-sec-hover);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
}
.month-pill[aria-pressed="true"] {
  background: linear-gradient(135deg, #0066ff 0%, #00d2ff 100%) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px var(--primary-glow), inset 0 1px 1.5px rgba(255, 255, 255, 0.65);
  transform: scale(1.02);
}

/* License Key Box */
.key-box {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.6;
  word-break: break-all;
  background: var(--code-bg, #030712);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--code-text, #93c5fd);
  max-height: 7.5rem;
  overflow-y: auto;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* .key-box stays dark in both themes on purpose — same as the sample's own
   --code-bg/--code-text tokens, a key/code display reads as a "terminal"
   block regardless of page theme. Every other custom class above now
   pulls color/border/background straight from the sample's own tokens
   (var(--text-main), var(--input-bg), var(--sub-card-bg), ...), so both
   themes come for free with no separate light-only overrides needed. */

/* ---------- Now Playing bar ----------
   A floating card rather than an edge-to-edge strip, so it reads as the same
   family of object as the header island instead of a browser chrome bar. */
.now-bar {
  --now-bar-inset: 0.875rem;
  padding: 0 var(--now-bar-inset)
           calc(var(--now-bar-inset) + env(safe-area-inset-bottom, 0px));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease;
  pointer-events: none;
}

.now-bar__inner {
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.375rem;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: auto;
}

.now-bar.is-visible { transform: translateY(0); opacity: 1; }

/* Two music UIs, one job each: the header island is the compact, always-
   reachable control everywhere except the Music tab, where the full bottom
   player takes over and the island steps aside. Forced with !important so
   it wins even while a track is loaded (.is-visible) — playback keeps going
   through the island on other tabs, only the surface changes. The extra
   inset in the offset clears the floating card's own margin. */
body:not(.tab-music) #now-bar {
  transform: translateY(calc(100% + var(--now-bar-inset))) !important;
  opacity: 0 !important;
}
body.tab-music #music-island { display: none; }

@media (min-width: 768px) {
  .now-bar { --now-bar-inset: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .now-bar { transition: none; }
}

.now-ctl.is-on { color: #ec4899; }

/* Range inputs (seek + volume).
   The played portion is painted with a gradient stop driven by --p, which
   player.js keeps in sync with playback; without it the track reads as an
   empty rail with no sense of position. */
.now-seek {
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #ec4899 var(--p, 0%),
    rgba(255, 255, 255, 0.14) var(--p, 0%)
  );
  cursor: pointer;
  outline: none;
  transition: height 0.2s ease;
}
.now-seek:hover { height: 7px; }

.now-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease;
}
.now-seek:hover::-webkit-slider-thumb { transform: scale(1.15); }
.now-seek::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.now-seek:focus-visible {
  box-shadow: 0 0 0 2px rgba(3, 3, 3, 0.9), 0 0 0 4px rgba(236, 72, 153, 0.6);
}

/* =========================================================================
   STUDIO MUSIC PLAYLIST THUMBNAILS & DYNAMIC ALBUM ART
   ========================================================================= */
.playlist-track-thumb-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--container-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  background: var(--sub-card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.playlist-track-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.track-row:hover .playlist-track-thumb {
  transform: scale(1.08);
}

.playlist-eq-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: inherit;
  z-index: 2;
}

.mini-eq-bar {
  width: 3px;
  background: linear-gradient(to top, #0066ff, #00d2ff);
  border-radius: 2px;
  animation: miniEqAnim 0.7s infinite alternate ease-in-out;
}
.mini-eq-bar:nth-child(1) { height: 6px; animation-delay: 0.1s; }
.mini-eq-bar:nth-child(2) { height: 16px; animation-delay: 0.3s; }
.mini-eq-bar:nth-child(3) { height: 10px; animation-delay: 0.2s; }

@keyframes miniEqAnim {
  0% { height: 4px; }
  100% { height: 18px; }
}

/* Turntable Vinyl Center Disc with Album Cover */
.studio-disc-center {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  overflow: hidden;
}

.studio-disc-center.has-cover #studio-disc-icon {
  display: none;
}

/* Dynamic Island Album Cover Icon */
.island-mini-art {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  overflow: hidden;
}

.island-mini-art.has-cover #island-media-icon {
  display: none;
}

/* ==========================================================================
   YOUTUBE MUSIC PLATFORM ARCHITECTURE (3-COLUMN: SIDEBAR + STUDIO + CHARTS)
   ========================================================================== */
.music-platform-wrapper {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
  margin-bottom: 36px;
}

@media (max-width: 1280px) {
  .music-platform-wrapper {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .music-charts-sidebar {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .music-platform-wrapper {
    grid-template-columns: 1fr;
  }
  .music-left-nav {
    display: none;
  }
  .music-charts-sidebar {
    grid-column: 1 / -1;
  }
}

/* Right Charts & Queue Sidebar (Opposite to Left Nav) */
.music-charts-sidebar {
  position: sticky;
  top: 90px;
  contain: layout style;
}

.music-sidebar-card {
  background: var(--container-bg);
  backdrop-filter: var(--container-blur);
  -webkit-backdrop-filter: var(--container-blur);
  border: 1px solid var(--container-border);
  border-radius: 24px;
  padding: 18px 14px;
  box-shadow: var(--container-shadow);
}

.music-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  padding: 0 4px;
}

.music-sidebar-subtitle {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  padding: 0 4px;
}

.music-charts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  overflow-x: hidden !important;
  padding: 2px 4px 4px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.music-charts-list::-webkit-scrollbar {
  width: 4px;
  height: 0px;
}
.music-charts-list::-webkit-scrollbar-track {
  background: transparent;
}
.music-charts-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 99px;
}
.music-charts-list::-webkit-scrollbar-thumb:hover {
  background: #0066ff;
}

.music-charts-list .track-row {
  margin-bottom: 0;
  padding: 8px 10px;
  border-radius: 12px;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Left Navigation Sidebar (YouTube Music Style) */
.music-left-nav {
  background: var(--container-bg);
  backdrop-filter: var(--container-blur);
  -webkit-backdrop-filter: var(--container-blur);
  border: 1px solid var(--container-border);
  border-radius: 24px;
  padding: 16px 12px;
  box-shadow: var(--container-shadow);
  position: sticky;
  top: 90px;
}

.music-nav-btn-new {
  width: 100%;
  background: var(--btn-sec-bg);
  border: 1px dashed var(--btn-sec-border);
  color: var(--text-main);
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.25s ease;
  margin: 8px 0 12px 0;
}
.music-nav-btn-new:hover {
  background: rgba(0, 102, 255, 0.15);
  border-color: #0066ff;
  color: #0066ff;
  transform: translateY(-1px);
}

.music-nav-section-title {
  font-size: 10px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 12px 4px;
}

.music-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.music-nav-item:hover {
  background: var(--btn-sec-hover);
  color: var(--text-main);
  transform: translateX(3px);
}

.music-nav-item.active {
  background: rgba(0, 102, 255, 0.12);
  color: #0066ff;
  border: 1px solid rgba(0, 102, 255, 0.25);
  font-weight: 700;
}

.music-nav-divider {
  height: 1px;
  background: var(--sub-card-border);
  margin: 10px 8px;
}

/* Right Main Music Area */
.music-main-area {
  min-width: 0;
}

/* Topic Suggestion Wrapper & Bar */
.music-topic-wrapper {
  position: relative;
  margin-bottom: 22px;
}

.music-topic-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 6px;
  width: 52px;
  background: linear-gradient(to right, transparent, rgba(15, 23, 42, 0.92));
  pointer-events: none;
  z-index: 3;
  border-top-right-radius: 100px;
  border-bottom-right-radius: 100px;
  transition: opacity 0.3s ease;
}

html[data-theme="light"] .music-topic-wrapper::after {
  background: linear-gradient(to right, transparent, rgba(240, 246, 255, 0.95));
}

.music-topic-wrapper.scrolled-end::after {
  opacity: 0;
}

.music-topic-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 6px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  user-select: none;
}
.music-topic-bar::-webkit-scrollbar {
  display: none;
}

.music-topic-bar.bounce-peek {
  animation: topicBarPeek 1.1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes topicBarPeek {
  0% { transform: translateX(0); }
  30% { transform: translateX(-42px); }
  60% { transform: translateX(8px); }
  80% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.music-topic-pill {
  background: var(--sub-card-bg);
  border: 1px solid var(--sub-card-border);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
  flex-shrink: 0;
}
.music-topic-pill:hover {
  color: var(--text-main);
  border-color: rgba(0, 102, 255, 0.4);
  background: var(--btn-sec-hover);
  transform: translateY(-2px) scale(1.04);
}
.music-topic-pill.active {
  background: linear-gradient(135deg, #0066ff 0%, #00d2ff 100%);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* Smart Music Sections */
.music-section {
  margin-bottom: 32px;
  contain: content;
}

.music-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.music-section-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-section-subtitle {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-sub);
}

/* Grid of Music Album/Track Cards (Section 1 & 3) */
.music-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 16px;
}

@media (max-width: 600px) {
  .music-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.music-album-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
  contain: content;
  will-change: transform;
}

.music-album-card:hover {
  background: var(--card-hover-bg);
  border-color: rgba(0, 102, 255, 0.5);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 32px rgba(0, 50, 150, 0.16);
}

.music-album-card.active {
  border-color: #0066ff;
  background: rgba(0, 102, 255, 0.08);
  box-shadow: 0 0 0 1px #0066ff, 0 8px 24px rgba(0, 102, 255, 0.2);
}

.music-album-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin-bottom: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  background: var(--sub-card-bg);
}

.music-album-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.music-album-card:hover .music-album-img {
  transform: scale(1.06);
}

.music-album-play-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0066ff, #00d2ff);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  opacity: 0;
  transform: scale(0.7) translateY(8px);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.5);
}

.music-album-card:hover .music-album-play-btn {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.music-album-card.active .music-album-play-btn {
  opacity: 1;
  transform: scale(1);
  background: #10b981;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

.music-album-playing-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 102, 255, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  display: none;
}
.music-album-card.active .music-album-playing-badge {
  display: flex;
  align-items: center;
  gap: 3px;
}

.music-album-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.music-album-artist {
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-album-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--sub-card-border);
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
}

/* Long Play List (Section 2: 3-column / compact row style like YouTube Music) */
.music-longplay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

@media (max-width: 700px) {
  .music-longplay-grid {
    grid-template-columns: 1fr;
  }
}

.music-longplay-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.3s ease;
  contain: content;
  will-change: transform;
}

.music-longplay-card:hover {
  background: var(--card-hover-bg);
  border-color: rgba(0, 102, 255, 0.4);
  transform: translateX(4px) scale(1.015);
  box-shadow: 0 8px 20px rgba(0, 50, 150, 0.1);
}

.music-longplay-card.active {
  border-color: #0066ff;
  background: rgba(0, 102, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.15);
}

.music-longplay-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  background: var(--sub-card-bg);
}

.music-longplay-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.music-longplay-card:hover .music-longplay-img {
  transform: scale(1.08);
}

.music-longplay-info {
  flex: 1;
  min-width: 0;
}

.music-longplay-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.music-longplay-meta {
  font-size: 11px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.music-longplay-duration {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--sub-card-bg);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--sub-card-border);
  flex-shrink: 0;
}

/* ==========================================================================
   PERFORMANCE & GPU HARDWARE COMPOSITING LAYER PROMOTIONS (120 FPS)
   ========================================================================== */
.music-platform-wrapper,
.music-left-nav,
.music-main-area,
.music-charts-sidebar,
.music-cards-grid,
.music-longplay-grid {
  contain: layout style;
}

.track-row {
  contain: layout style;
  will-change: transform, background;
  content-visibility: auto;
  contain-intrinsic-size: 0 46px;
}

.music-album-card {
  contain: layout style;
  will-change: transform;
  content-visibility: auto;
  contain-intrinsic-size: 0 240px;
}

.music-longplay-card {
  contain: layout style;
  will-change: transform;
  content-visibility: auto;
  contain-intrinsic-size: 0 68px;
}

.yt-card {
  contain: layout style;
  will-change: transform;
  content-visibility: auto;
  contain-intrinsic-size: 0 260px;
}

.yt-playlist-item {
  contain: layout style;
  will-change: transform, background;
  content-visibility: auto;
  contain-intrinsic-size: 0 80px;
}
