:root {
  color-scheme: dark;
  --bg-base: #141518;
  --bg-surface: rgba(255, 255, 255, 0.08);
  --bg-surface-hover: rgba(255, 255, 255, 0.14);
  --bg-surface-active: rgba(255, 255, 255, 0.20);
  --bg-elevated: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-glow: rgba(255, 255, 255, 0.35);
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.78);
  --text-dim: rgba(255, 255, 255, 0.52);
  --teal: #22c55e;
  --teal-dark: #16a34a;
  --teal-glow: rgba(34, 197, 94, 0.35);
  --coral: #ff5a5f;
  --coral-hover: #ff7378;
  --glass-bg: rgba(18, 20, 26, 0.27);
  --glass-bg-card: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-blur: blur(10px) saturate(115%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --radius-full: 9999px;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Inter", sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Inter", sans-serif;
  --sidebar-width: 56px;
  --player-height: 72px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  background-color: var(--bg-base);
  /* Pure neutral translucent white & soft monochrome grey ambient atmosphere (no blue) */
  background-image: 
    radial-gradient(ellipse 70% 55% at 20% 15%, rgba(255, 255, 255, 0.12), transparent 70%),
    radial-gradient(ellipse 65% 50% at 85% 20%, rgba(200, 200, 205, 0.08), transparent 70%),
    radial-gradient(ellipse 85% 70% at 50% 90%, rgba(28, 29, 33, 0.96), #101114);
  background-attachment: fixed;
  background-size: cover;
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 20px 24px 115px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== Ambient YouTube Background Video Layer ===== */
.bg-video-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  display: none;
  transition: opacity 0.5s ease;
}

.bg-video-layer.active {
  display: block;
}

#bg-video-container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100vh;
  min-width: 177.78vh;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

#bg-video-container iframe,
#bg-video-container video {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
  opacity: 1;
  filter: brightness(1.02) contrast(1.02);
  transition: opacity 0.5s ease;
  object-fit: cover;
}

.bg-video-scrim {
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 22, 0.15);
  pointer-events: none;
}

html.has-bg-video,
body.has-bg-video {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

body.has-bg-video #main-area,
body.has-bg-video #main-area.main-glass-window {
  background: rgba(18, 20, 26, 0.27) !important;
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #ffffff;
}

/* ===== Glass Panels ===== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
}

/* ===== App Main Grid Layout ===== */
#app-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== Left Sidebar: Floating Vertical Capsule Dock (Reference 1) ===== */
#app-sidebar,
#app-sidebar.dock-capsule {
  width: 56px;
  min-width: 56px;
  height: auto;
  min-height: unset;
  background: rgba(18, 20, 26, 0.27);
  backdrop-filter: blur(12px) saturate(115%);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
  border: 1px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: sticky;
  top: 24px;
  z-index: 30;
}

.dock-app-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-decoration: none;
  transition: all var(--transition-fast);
  margin-bottom: 4px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.dock-app-brand:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.08);
  border-color: rgba(255, 255, 255, 0.32);
}

.dock-app-icon {
  font-size: 22px;
  line-height: 1;
  display: inline-block;
  user-select: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.dock-app-title {
  display: none;
}

.dock-capsule-icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dock-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.dock-icon:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.dock-icon.active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.dock-icon-label {
  display: none;
}


.dock-capsule-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Legacy sidebar classes preserved for test/fallback compatibility */
.sidebar-logo {
  display: none;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.sidebar-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-item.active {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-weight: 600;
}
.sidebar-bottom {
  display: none;
}
.sidebar-settings-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-size: 13.5px;
  transition: all var(--transition-fast);
}
.sidebar-settings-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

/* ===== Main View Area (Floating Glass Window - Reference 1) ===== */
#main-area,
#main-area.main-glass-window {
  flex: 1;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: calc(100vh - 140px);
  max-height: none;
  height: auto;
  background: rgba(18, 20, 26, 0.27);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  border-radius: 32px;
  padding: 24px 32px 48px;
  display: flex;
  flex-direction: column;
}

#v {
  flex: 1;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.window-inner-grid {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Inner Left Subnav Column (Reference 1) */
.inner-subnav {
  width: 200px;
  flex-shrink: 0;
  padding: 28px 16px 24px 24px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.subnav-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.subnav-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  margin: 22px 0 10px;
  cursor: pointer;
  user-select: none;
}

.subnav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.subnav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.subnav-link svg {
  flex-shrink: 0;
  opacity: 0.85;
}

.subnav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.subnav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.subnav-link.active svg {
  opacity: 1;
}

/* Inner Right Content Pane (Reference 1) */
.inner-main-pane {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 22px 28px 80px 24px;
}

/* Window Top Bar (Reference 1) */
.window-top-bar,
header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 18px 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
}

/* macOS Window History Controls */
.nav-history {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-history-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}

.nav-history-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Apple Music Inspired Top Navigation Pills (Reference 2) */
.header-pills-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 5px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.header-pill {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.header-pill:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.header-pill.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.mobile-menu-btn {
  display: none;
}

.header-search {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-btn {
  position: absolute;
  left: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-dim);
  background: none;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.search-icon-btn:hover {
  color: #ffffff;
}

.search-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: none;
  padding: 4px;
  border-radius: 50%;
}

.search-clear:hover {
  color: #ffffff;
}

input[type="search"] {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  padding: 10px 38px 10px 44px;
  outline: none;
  transition: all var(--transition-normal);
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

input[type="search"]:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transition: all var(--transition-fast);
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.sc-login-btn {
  background: rgba(255, 85, 0, 0.15);
  border-color: rgba(255, 85, 0, 0.35);
  color: #ff8844;
}

.sc-login-btn:hover {
  background: rgba(255, 85, 0, 0.28);
  border-color: #ff5500;
  color: #ffffff;
}

.header-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-user-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.header-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #ff5500;
}

.header-user-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 85, 0, 0.25);
  color: #ff7733;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Page Search Box */
.search-page-box {
  margin: 14px 0 24px;
  max-width: 720px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  padding: 5px 8px 5px 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: all var(--transition-normal);
}

.search-input-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), 0 10px 40px rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.11);
}

.search-input-icon {
  color: rgba(255, 255, 255, 0.6);
  display: grid;
  place-items: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-box-input {
  flex: 1;
  font-family: inherit;
  font-size: 15.5px;
  color: #ffffff;
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 0;
}

.search-box-input::placeholder {
  color: var(--text-dim);
}

.btn-clear-q {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-dim);
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 6px;
}

.btn-clear-q:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-search-go {
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.btn-search-go:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

/* Demo badge for preview tracks */
.tag-demo {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

/* ===== Buttons & Pills ===== */
button {
  font-family: inherit;
  font-size: 14px;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  user-select: none;
}

button:active {
  transform: scale(0.96);
}

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

.btn {
  padding: 9px 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 500;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn.primary, button.hot, .btn-coral {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.btn.primary:hover, button.hot:hover, .btn-coral:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  transform: translateY(-1px);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  color: var(--text-muted);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.chip.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 20px;
}

/* Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
}

.badge-pill.hq {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.14);
}

/* ===== Main layout ===== */
main {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 4px 0 32px 0;
}

h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 8px 0 4px;
}

h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0;
  color: #ffffff;
}

/* Home Greeting Banner & Filter Bar */
.home-greeting-banner {
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.greeting-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-bottom: 6px;
}

.greeting-subtitle {
  color: var(--text-muted);
  font-size: 14.5px;
  max-width: 680px;
}

.home-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.home-filter-pill {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.home-filter-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.home-filter-pill.active {
  background: #ffffff;
  color: #090d16;
  font-weight: 600;
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

/* Section Headings with Eyebrow Labels (Reference 2) */
.home-section {
  margin-bottom: 34px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #78889e;
  margin-bottom: 4px;
  display: block;
}

.section-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.section-nav {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.carousel-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  transform: scale(1.06);
}

p.mu {
  color: var(--text-muted);
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  margin: 16px 0;
}

.empty-state svg {
  color: var(--text-dim);
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 6px;
  color: #ffffff;
}

/* Empty likes inviting banner */
.empty-likes-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(255, 85, 0, 0.08);
  border: 1px solid rgba(255, 85, 0, 0.25);
  border-radius: var(--radius-lg);
  gap: 16px;
}

.empty-likes-text b {
  font-size: 15px;
  color: #ffffff;
  display: block;
  margin-bottom: 4px;
}

.sc-login-pill-btn {
  background: #ff5500 !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 600;
  padding: 9px 20px;
  flex-shrink: 0;
}

/* ===== Apple Music Square Artwork Cards & Horizontal Carousels ===== */
.cv {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-normal);
}

.cv.rd {
  border-radius: 50% !important;
}

/* Apple Music Horizontal Carousels */
.row, .carousel-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.row::-webkit-scrollbar, .carousel-row::-webkit-scrollbar {
  display: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
  margin-top: 14px;
}

/* Large Square Album Card (Reference 2) */
.cd {
  min-width: 205px;
  width: 205px;
  flex: 0 0 205px;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 18px;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-normal);
}

.cd:hover {
  transform: translateY(-5px);
}

.cd .cv-wrap {
  width: 205px;
  height: 205px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #202226;
  flex-shrink: 0;
  transition: box-shadow var(--transition-normal);
}

.cd:hover .cv-wrap {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.cd .cv {
  width: 100%;
  height: 100%;
  border-radius: 18px;
}

.cd.ar .cv-wrap, .cd.ar .cv {
  border-radius: 50%;
}

.cd:hover .cv {
  transform: scale(1.04);
}

/* Hover overlay with play button and like button */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.22s ease;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px;
  pointer-events: none;
  border-radius: 18px;
}

.cd:hover .card-overlay {
  opacity: 1;
}

.card-overlay button {
  pointer-events: auto;
}

.cd .go {
  position: static;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #ffffff;
  color: #080d17;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transform: translateY(6px);
  transition: all 0.22s ease;
  border: none;
  opacity: 1;
}

.cd:hover .go {
  transform: translateY(0);
}

.cd .go:hover {
  background: #ffffff;
  color: #080d17;
  transform: scale(1.08) !important;
}

.card-like-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(18, 24, 36, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.card-like-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.card-playing-indicator {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

/* Card typography (Apple Music minimalist hierarchy) */
.cd-info {
  padding: 10px 2px 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cd-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #72849b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
}

.cd b, .cd-title {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.cd a, .cd span, .cd-artist {
  display: block;
  font-size: 13px;
  color: #8d9eb3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  transition: color 0.15s;
}

.cd a:hover, .cd-artist:hover {
  color: #ffffff;
}

/* ===== Track rows (List view) ===== */
.tracks-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-bottom: calc(var(--player-height) + 36px);
}

.tr {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(22, 25, 34, 0.40);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  transition: all var(--transition-fast);
  position: relative;
  min-height: 50px;
}

.tr:hover {
  background: rgba(32, 36, 48, 0.58);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.tr.active {
  background: rgba(40, 46, 62, 0.72);
  border-color: rgba(255, 255, 255, 0.30);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 3px 0 0 #ffffff;
}

.tr.active .nm b {
  color: #ffffff;
  font-weight: 600;
}

.tr .n {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  width: 24px;
  min-width: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  flex-shrink: 0;
}

.tr .cv {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  font-size: 16px;
  flex-shrink: 0;
  object-fit: cover;
}

.tr .nm {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.tr .nm b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
  margin-bottom: 2px;
}

.tr .nm a, .tr .nm span {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tr .nm a:hover {
  color: #ffffff;
}

.tr .st {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  width: 110px;
  min-width: 110px;
  flex-shrink: 0;
  white-space: nowrap;
}

.tr .du {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  width: 48px;
  min-width: 48px;
  flex-shrink: 0;
  white-space: nowrap;
}

.tr button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.tr:hover button {
  opacity: 1;
}

.tr button:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: scale(1.08);
}

[data-like].active, [data-like-id].active {
  color: var(--coral) !important;
  background: rgba(255, 90, 95, 0.18) !important;
  border-color: rgba(255, 90, 95, 0.45) !important;
}

[data-like].active svg, [data-like-id].active svg {
  fill: currentColor;
  transform: scale(1.1);
}

/* Sound wave equalizer animation in row */
.eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  width: 14px;
}

.eq span {
  width: 3px;
  background: #ffffff;
  border-radius: 1px;
  animation: eq-bounce 1s ease-in-out infinite alternate;
}

.eq span:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.eq span:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.eq span:nth-child(3) { height: 40%; animation-delay: 0.2s; }

@keyframes eq-bounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* ===== Hero Header (Artist / Album / Playlist) ===== */
.hd {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  padding: 24px 0 20px;
  margin-bottom: 12px;
}

.hd .cv {
  width: 210px;
  height: 210px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.hd .cv.rd {
  border-radius: 50%;
}

.hd-content {
  flex: 1;
  min-width: 0;
}

.hd-badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hd h1 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  margin: 4px 0 10px;
}

.hd-meta {
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hd-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* ===== Reference 1: Artist Glass Hero Banner ===== */
.artist-hero-card {
  position: relative;
  border-radius: 26px;
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 175px;
  margin-bottom: 16px;
  overflow: hidden;
}

.artist-hero-info {
  flex: 1;
  max-width: 65%;
  z-index: 2;
}

.artist-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 4px;
}

.artist-hero-name {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #ffffff;
  line-height: 1.15;
  margin: 2px 0 6px;
}

.artist-hero-listeners {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.artist-hero-bio {
  font-size: 13px;
  margin-top: 8px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
}

.artist-hero-media {
  position: relative;
  width: 200px;
  height: 165px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  z-index: 1;
}

.artist-cutout-img {
  max-height: 165px;
  width: auto;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.artist-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}

.artist-actions-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.artist-play-pill {
  background: #22c55e !important;
  color: #000000 !important;
  font-weight: 700 !important;
  border-radius: 9999px !important;
  padding: 9px 24px !important;
  font-size: 13.5px !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35) !important;
  transition: all var(--transition-fast) !important;
}

.artist-play-pill:hover {
  transform: scale(1.03) !important;
  background: #2ed56b !important;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5) !important;
}

.artist-follow-pill {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  font-weight: 500 !important;
  border-radius: 9999px !important;
  padding: 9px 22px !important;
  font-size: 13.5px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  cursor: pointer !important;
  transition: all var(--transition-fast) !important;
}

.artist-follow-pill:hover {
  background: rgba(255, 255, 255, 0.24) !important;
}

.artist-actions-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.artist-action-link {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.artist-action-link:hover {
  color: #ffffff;
}

.popular-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin: 18px 0 10px;
}

/* ========================================================= */
/* ===== THE GLASS STUDIO PLAYER (MOCKUP EXACT REPLICA) ===== */
/* ========================================================= */
#studio-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 11, 15, 0.40);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.58s cubic-bezier(0.16, 1, 0.3, 1);
}

#studio-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Hide bottom player dock smoothly when Studio is active */
body.studio-open #pl,
#studio-overlay.active ~ #pl {
  transform: translateX(-50%) translateY(24px) scale(0.92);
  opacity: 0;
  pointer-events: none;
}

.studio-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

/* Hide left sidebar and right queue panels in studio overlay ("прибери блоки справа і зліва") */
.studio-sidebar,
.studio-queue-panel {
  display: none !important;
}

/* Center Player Panel in Studio (Liquid Audio Layout with Semitransparent Frosted Glass) */
.studio-center-player {
  width: 100%;
  max-width: 388px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px 24px;
  background: rgba(18, 20, 26, 0.30);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border-radius: 36px;
  position: relative;
  transform-origin: center center;
  will-change: transform, opacity, border-radius;
  transition: transform 0.58s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.48s cubic-bezier(0.16, 1, 0.3, 1),
              border-radius 0.58s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.studio-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.studio-collapse-btn,
.studio-search-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.studio-collapse-btn:hover,
.studio-search-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.studio-collapse-btn:active,
.studio-search-btn:active {
  transform: scale(0.95);
}

.studio-header-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.15px;
}

.studio-track-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* Recessed Bezel Outer Tray from Liquid Audio Reference */
.studio-artwork-bezel {
  width: 100%;
  max-width: 320px;
  margin: 6px auto 16px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.20);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35), 0 1px 0 rgba(255, 255, 255, 0.10);
  box-sizing: border-box;
}

.studio-artwork {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.studio-artwork .cv {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background-size: cover;
  background-position: center;
}

.studio-track-info {
  width: 100%;
  padding: 0 6px;
}

.studio-track-title {
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.studio-track-artist {
  font-size: 14px;
  font-weight: 450;
  color: rgba(255, 255, 255, 0.52);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Studio Timeline Scrubber */
.studio-timeline-wrap {
  width: 100%;
  margin-top: 14px;
}

.studio-timeline-wrap input[type="range"]#studio-sk {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 999px;
  background: linear-gradient(to right, #ffffff var(--p, 0%), rgba(255, 255, 255, 0.14) var(--p, 0%));
  outline: none;
  cursor: pointer;
  border: none;
  padding: 0;
  margin: 0;
  transition: height 0.15s ease;
}

.studio-timeline-wrap input[type="range"]#studio-sk:hover {
  height: 6px;
}

.studio-timeline-wrap input[type="range"]#studio-sk::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.studio-timeline-wrap input[type="range"]#studio-sk:hover::-webkit-slider-thumb {
  transform: scale(1.25);
}

.studio-timeline-wrap input[type="range"]#studio-sk::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.studio-time-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.42);
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}

/* Studio Playback Controls */
.studio-ctl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin: 14px 0 18px;
}

.studio-ctl-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.studio-ctl-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.studio-ctl-btn:active {
  transform: scale(0.94);
}

.studio-ctl-btn.tg.active {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.14);
}

/* Glowing Play/Pause Center Pill Button (Liquid Audio Reference) */
.studio-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #f4efff;
  color: #6c4ce0;
  border: none;
  box-shadow: 0 0 28px rgba(180, 150, 255, 0.42), 0 8px 18px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.studio-play-btn svg {
  fill: #6c4ce0;
  transition: transform 0.15s ease;
}

.studio-play-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 36px rgba(180, 150, 255, 0.6), 0 10px 22px rgba(0, 0, 0, 0.4);
}

.studio-play-btn:active {
  transform: scale(0.95);
}

/* Bottom Floating Action Pill Capsule (Save, Share, Device) */
.studio-bottom-capsule {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 10px;
  margin-top: 2px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.studio-capsule-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  padding: 6px 14px;
  border-radius: 999px;
  transition: all 0.2s ease;
  min-width: 60px;
}

.studio-capsule-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.studio-capsule-item:active {
  transform: scale(0.94);
}

.studio-capsule-label {
  font-size: 11px;
  font-weight: 500;
  color: inherit;
  letter-spacing: 0.1px;
}

.studio-like-icon,
.studio-share-icon,
.studio-eq-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

#studio-like-btn.active {
  color: #ff5277;
}

#studio-like-btn.active .studio-like-icon svg {
  fill: #ff5277;
  stroke: #ff5277;
}

#studio-like-btn.active .studio-capsule-label {
  color: #ff7594;
  font-weight: 600;
}

/* Right Queue Panel in Studio */
.studio-queue-panel {
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  overflow: hidden;
}

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

.studio-queue-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
}

.studio-queue-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

/* Currently Playing Highlighted Pill */
.studio-queue-current {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  margin-bottom: 8px;
}

.studio-queue-current .cv {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* Animated Equalizer Sound Bars */
.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  width: 16px;
  flex-shrink: 0;
}

.eq-bars .eq-bar {
  width: 3px;
  background: #ffffff;
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s ease;
}

.eq-bars.playing .eq-bar:nth-child(1) {
  animation: eq-bounce 0.7s ease-in-out infinite alternate;
}

.eq-bars.playing .eq-bar:nth-child(2) {
  animation: eq-bounce 0.7s ease-in-out 0.22s infinite alternate;
}

.eq-bars.playing .eq-bar:nth-child(3) {
  animation: eq-bounce 0.7s ease-in-out 0.42s infinite alternate;
}

@keyframes eq-bounce {
  0% { height: 3px; }
  100% { height: 16px; }
}

.studio-queue-current .nt {
  flex: 1;
  min-width: 0;
}

.studio-queue-current .nt b {
  display: block;
  font-size: 14px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-queue-current .nt small {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.studio-queue-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.studio-queue-item .cv {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.studio-queue-item .nt {
  flex: 1;
  min-width: 0;
}

.studio-queue-item .nt b {
  display: block;
  font-size: 13.5px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-queue-item .nt small {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.studio-queue-item .du {
  font-size: 12.5px;
  color: var(--text-dim);
}

.studio-add-queue-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
  transition: all var(--transition-fast);
}

.studio-add-queue-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ========================================================= */
/* ===== BOTTOM PLAYER BAR MODES ===== */
/* ========================================================= */
/* ========================================================= */
/* ===== FLOATING BOTTOM PLAYER DOCK (REFERENCE 1 GLASS PILL) ===== */
/* ========================================================= */
#pl {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  width: min(940px, calc(100vw - 40px));
  height: 72px;
  background: rgba(18, 20, 26, 0.28);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  z-index: 40;
  will-change: transform, opacity;
  transition: transform 0.52s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.42s ease;
}

/* Left: Playback Controls (Reference 1: |◀  ⏸  ▶|) */
.ctl-dock-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ctl-dock-left .btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}

.ctl-dock-left .btn-icon:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

#pp, .player-play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #1a1e27;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

#pp:hover, .player-play-btn:hover {
  background: #ffffff;
  transform: scale(1.05);
}

#pp:active, .player-play-btn:active {
  transform: scale(0.95);
}

/* Center: Track Info & Embedded Timeline (No inner square) */
.player-card-center {
  flex: 1;
  max-width: 440px;
  min-width: 240px;
  margin: 0 14px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.player-card-center:hover {
  background: transparent;
  border-color: transparent;
  opacity: 0.92;
}

#pcw {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

#pcw .cv {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  font-size: 18px;
}

.player-center-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nt {
  min-width: 0;
}

#pt {
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

#pb {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

#t1, #t2 {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 26px;
}

#t2 {
  text-align: right;
}

#sk {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  accent-color: #ffffff;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  outline: none;
  border: none;
}

/* Right: Tools (Shuffle, Volume, Repeat, Like, Queue) (Reference 1) */
.ctl-dock-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ctl-dock-right .btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--transition-fast);
}

.ctl-dock-right .btn-icon:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.24);
}

.ctl-dock-right .btn-icon.active {
  color: #ff5a5f;
  background: rgba(255, 90, 95, 0.18);
  border-color: rgba(255, 90, 95, 0.35);
}

.vol-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

#vl {
  width: 72px;
  height: 3px;
  border-radius: 2px;
  accent-color: #ffffff;
  cursor: pointer;
  outline: none;
  border: none;
}

.queue-btn {
  position: relative;
}

.queue-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: #ffffff;
  color: #141518;
  font-size: 9px;
  font-weight: 700;
  border-radius: var(--radius-full);
  padding: 1px 4.5px;
  line-height: 1.2;
}



.tg.active {
  color: #ffffff !important;
}

.tg.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
}

#rp[data-mode="2"]::before {
  content: "1";
  position: absolute;
  font-size: 9px;
  font-weight: 700;
  top: 7px;
  right: 7px;
  color: #ffffff;
}

.timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: var(--text-dim);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.timeline span {
  width: 38px;
  flex-shrink: 0;
}

.timeline span:last-child {
  text-align: right;
}

/* Player Right Column */
.player-rt {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.vol-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vol-wrap input[type="range"] {
  width: 96px;
}

.queue-btn {
  position: relative;
}

.queue-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ffffff;
  color: #070b12;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

/* Sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #ffffff var(--p, 0%), rgba(255, 255, 255, 0.15) var(--p, 0%));
  width: 100%;
  cursor: pointer;
  outline: none;
  transition: height var(--transition-fast);
}

input[type="range"]:hover {
  height: 6px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-fast);
}

input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.25);
}

input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Mode toggle buttons in player */
.player-mode-selector {
  display: flex;
  gap: 4px;
  margin-left: 6px;
}

/* ===== Side Queue Drawer ===== */
#qd {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(390px, 100%);
  z-index: 35;
  background: rgba(14, 20, 32, 0.92);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-left: 1px solid var(--border);
  padding: 20px 18px calc(var(--player-height) + 20px);
  overflow-y: auto;
  transform: translateX(105%);
  transition: transform var(--transition-normal);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
}

#qd.open {
  transform: translateX(0);
}

.qh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.qh h2 {
  font-size: 18px;
  margin: 0;
}

.tr.queue-item {
  grid-template-columns: 42px 1fr 34px;
  padding: 6px 8px;
  gap: 10px;
}

.tr.queue-item .cv {
  width: 42px;
  height: 42px;
}

/* ===== Dialog Modals ===== */
dialog {
  background: rgba(18, 26, 42, 0.92);
  backdrop-filter: blur(36px);
  -webkit-backdrop-filter: blur(36px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: 26px;
  width: min(480px, 92vw);
  margin: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

dialog::backdrop {
  background: rgba(4, 7, 14, 0.75);
  backdrop-filter: blur(10px);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dialog-head h2 {
  font-size: 20px;
  margin: 0;
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dialog-input {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  outline: none;
}

.dialog-input:focus {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

/* ===== Equalizer Sliders in Dialog ===== */
.eq-sliders-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 20px 0 14px;
  text-align: center;
}

.eq-band-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.eq-band-col input[type="range"] {
  writing-mode: bt-lr; /* IE */
  -webkit-appearance: slider-vertical; /* WebKit */
  width: 8px;
  height: 140px;
  padding: 0;
}

.eq-band-val {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}

.eq-band-freq {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ===== Toast notification ===== */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-height) + 20px);
  transform: translate(-50%, 20px);
  background: rgba(255, 255, 255, 0.95);
  color: #070b12;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-weight: 600;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
}

#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ===== Skeletons & Loading ===== */
.sk {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.cd.sk-card {
  height: 240px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Error Box ===== */
.error-card {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.error-card p {
  color: var(--danger);
  font-size: 14px;
}

/* ===== Responsive adjustments for Tablets and Smart Mobile Devices ===== */

/* Tablets & Small Laptops (<= 1080px) */
@media (max-width: 1080px) {
  .studio-wrapper {
    grid-template-columns: 1fr;
    max-width: 480px;
    height: auto;
    max-height: 94vh;
  }
  .studio-sidebar,
  .studio-queue-panel {
    display: none !important;
  }
}

/* Tablets & Mobile Navigation (<= 860px) */
@media (max-width: 860px) {
  #app-layout {
    position: static !important;
    z-index: auto !important;
  }

  .sidebar-backdrop {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 180 !important;
    pointer-events: auto !important;
  }

  .sidebar-backdrop.active {
    display: block !important;
  }

  /* Mobile Sidebar Drawer */
  #app-sidebar,
  #app-sidebar.dock-capsule {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    width: 270px !important;
    max-width: 82vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 200 !important;
    border-radius: 0 24px 24px 0 !important;
    background: rgba(18, 20, 26, 0.96) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-left: none !important;
    box-shadow: 12px 0 50px rgba(0, 0, 0, 0.75) !important;
    padding: calc(20px + env(safe-area-inset-top, 14px)) 16px calc(24px + env(safe-area-inset-bottom, 16px)) !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: stretch !important;
    pointer-events: auto !important;
  }

  #app-sidebar.open {
    display: flex !important;
    animation: drawerSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }

  @keyframes drawerSlideIn {
    from {
      transform: translateX(-100%);
      opacity: 0;
    }
    to {
      transform: translateX(0);
      opacity: 1;
    }
  }

  #app-sidebar .dock-app-brand {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: auto !important;
    padding: 4px 12px 14px 6px !important;
    margin-bottom: 8px !important;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    gap: 12px !important;
    text-decoration: none !important;
  }

  #app-sidebar .dock-app-brand:hover {
    transform: none !important;
    background: transparent !important;
  }

  #app-sidebar .dock-app-icon {
    font-size: 28px !important;
    line-height: 1 !important;
  }

  #app-sidebar .dock-app-title {
    display: inline-block !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: -0.3px !important;
    color: #ffffff !important;
  }

  #app-sidebar .dock-capsule-icons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: stretch;
  }

  #app-sidebar .dock-icon {
    width: 100%;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 16px;
    gap: 14px;
    color: var(--text-muted);
  }

  #app-sidebar .dock-icon.active {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }

  #app-sidebar .dock-icon-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
  }

  #app-sidebar .dock-capsule-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 14px;
    align-items: stretch;
  }

  #app-sidebar .dock-capsule-bottom .dock-icon {
    width: 100%;
  }

  .inner-subnav {
    display: none !important;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
  }

  .nav-history,
  .header-pills-nav {
    display: none !important;
  }
}

/* Smartphones & Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  /* Full-bleed edge-to-edge layout: Remove all outer dead zones */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  body {
    padding: 0 0 calc(96px + env(safe-area-inset-bottom, 16px)) 0 !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
  }

  #app-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    position: static !important;
    z-index: auto !important;
  }

  #main-area,
  #main-area.main-glass-window {
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    padding: calc(10px + env(safe-area-inset-top, 8px)) 16px 24px !important;
    width: 100% !important;
    min-height: 100vh !important;
    margin: 0 !important;
    background: rgba(14, 16, 22, 0.27) !important;
    backdrop-filter: blur(10px) saturate(115%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(115%) !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Header Bar Optimization with Blurred Translucent Glass */
  .window-top-bar,
  header {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    margin: calc(-10px - env(safe-area-inset-top, 8px)) -16px 14px -16px !important;
    padding: calc(10px + env(safe-area-inset-top, 8px)) 16px 10px 16px !important;
    gap: 8px !important;
    align-items: center !important;
    background: rgba(14, 16, 22, 0.45) !important;
    backdrop-filter: blur(16px) saturate(130%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(130%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  .header-search {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .search-wrapper {
    width: 100% !important;
  }

  input, select, textarea,
  input[type="search"],
  .search-box-input {
    font-size: 16px !important; /* Prevents unwanted iOS Safari viewport auto-zoom */
  }

  input[type="search"] {
    height: 38px !important;
    padding: 6px 30px 6px 36px !important;
  }

  .search-icon-btn {
    left: 4px !important;
    width: 30px !important;
    height: 30px !important;
  }

  .header-actions {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  #btn-open-studio,
  #btn-header-eq {
    display: none !important;
  }

  #btn-header-settings {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
  }

  .sc-login-btn span,
  .header-user-btn .header-user-name,
  .header-user-btn .header-user-badge,
  .user-pill-title {
    display: none !important;
  }

  .sc-login-btn,
  .header-user-btn,
  .user-profile-pill {
    padding: 0 !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .header-user-avatar {
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
  }

  /* Home Greeting & Filter Pills */
  .home-greeting-banner {
    margin-bottom: 20px !important;
  }

  .greeting-title {
    font-size: 22px !important;
    letter-spacing: -0.3px !important;
    line-height: 1.25 !important;
    margin-bottom: 4px !important;
  }

  .greeting-subtitle {
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: var(--text-muted) !important;
  }

  .home-filter-pills {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
    margin: 12px -16px 20px !important;
    padding: 2px 16px 6px !important;
    gap: 8px !important;
  }

  .home-filter-pills::-webkit-scrollbar {
    display: none !important;
  }

  .home-filter-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 6px 14px !important;
    font-size: 12.5px !important;
  }

  .chips {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    margin: 8px -16px 16px !important;
    padding: 2px 16px 6px !important;
    gap: 8px !important;
  }

  .chips::-webkit-scrollbar {
    display: none !important;
  }

  .chip {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 7px 14px !important;
    font-size: 13px !important;
  }

  /* Section Headings & Horizontal Carousels */
  .home-section {
    margin-bottom: 24px !important;
  }

  .section-head {
    margin-bottom: 10px !important;
  }

  .section-head h2 {
    font-size: 18px !important;
    font-weight: 700 !important;
  }

  .section-eyebrow {
    font-size: 10px !important;
    margin-bottom: 2px !important;
  }

  .section-sub {
    display: none !important;
  }

  .section-nav {
    display: none !important;
  }

  .row, .carousel-row {
    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    margin: 0 -16px !important;
    padding: 4px 16px 14px !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none !important;
  }

  .row::-webkit-scrollbar,
  .carousel-row::-webkit-scrollbar {
    display: none !important;
  }

  .cd {
    min-width: 145px !important;
    width: 145px !important;
    flex: 0 0 145px !important;
    scroll-snap-align: start !important;
  }

  .cd .cv-wrap {
    width: 145px !important;
    height: 145px !important;
    border-radius: 16px !important;
  }

  .cd .cv {
    border-radius: 16px !important;
  }

  .cd b, .cd-title {
    font-size: 13.5px !important;
    margin-top: 6px !important;
  }

  .cd a, .cd span, .cd-artist {
    font-size: 12px !important;
  }

  /* Grid Layout (Search, Library) */
  .grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .grid .cd {
    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  .grid .cd .cv-wrap {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 !important;
  }

  .tracks-table {
    gap: 6px !important;
    margin-top: 6px !important;
  }

  .tr {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 7px 10px !important;
    border-radius: 12px !important;
    background: rgba(22, 25, 34, 0.40) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16) !important;
    min-height: 48px !important;
  }

  .tr:hover {
    background: rgba(32, 36, 48, 0.58) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
  }

  .tr.active {
    background: rgba(40, 46, 62, 0.72) !important;
    border-color: rgba(255, 255, 255, 0.30) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), inset 3px 0 0 #ffffff !important;
  }

  .tr .n {
    width: 20px !important;
    min-width: 20px !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.55) !important;
    font-weight: 500 !important;
  }

  .tr .cv {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    object-fit: cover !important;
  }

  .tr .nm {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .tr .nm b {
    font-size: 13.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #ffffff !important;
    margin-bottom: 2px !important;
  }

  .tr .nm a,
  .tr .nm span {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.62) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tr .st,
  .tr .du,
  .tr .al,
  .tr .op {
    display: none !important;
  }

  .tr button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  /* Floating Bottom Player Dock (iOS Apple Music-style Translucent Glass Pill) */
  #pl {
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100vw - 20px) !important;
    max-width: 440px !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 12px)) !important;
    height: 62px !important;
    padding: 0 10px 0 8px !important;
    border-radius: 9999px !important;
    gap: 8px !important;
    z-index: 90 !important;
    backdrop-filter: blur(16px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(120%) !important;
    background: rgba(18, 20, 26, 0.32) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  #player-np-clickable {
    order: 1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  #pcw {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) !important;
  }

  #pcw .cv {
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px !important;
    font-size: 18px !important;
  }

  .player-center-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  .player-center-info .nt {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
  }

  .player-center-info .nt b,
  #pl #pt {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    line-height: 1.25 !important;
  }

  .player-center-info .nt small,
  #pl #pb {
    font-size: 11.5px !important;
    color: rgba(255, 255, 255, 0.65) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    line-height: 1.2 !important;
    margin-top: 2px !important;
  }

  .player-center-info .timeline,
  #pl .timeline {
    display: none !important;
  }

  .ctl-dock-left {
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  .ctl-dock-left #pv {
    display: none !important;
  }

  .ctl-dock-left #pp,
  #pl #pp {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #090d16 !important;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.3) !important;
  }

  .ctl-dock-left #pp svg,
  #pl #pp svg {
    width: 20px !important;
    height: 20px !important;
  }

  .ctl-dock-left #nx,
  #pl #nx {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    color: rgba(255, 255, 255, 0.85) !important;
    display: inline-flex !important;
  }

  .ctl-dock-right {
    order: 3 !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  .ctl-dock-right #sh,
  .ctl-dock-right #rp,
  .ctl-dock-right .vol-wrap,
  .ctl-dock-right #qb {
    display: none !important;
  }

  .ctl-dock-right #lk,
  #pl #lk {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
  }

  /* Studio Overlay Sheet on Mobile */
  #studio-overlay {
    padding: calc(10px + env(safe-area-inset-top, 8px)) 12px calc(14px + env(safe-area-inset-bottom, 12px)) !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .studio-wrapper {
    width: 100% !important;
    max-width: 440px !important;
    height: auto !important;
  }

  .studio-center-player {
    width: 100% !important;
    max-width: 360px !important;
    max-height: calc(100vh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 32px !important;
    background: rgba(18, 20, 26, 0.32) !important;
    backdrop-filter: blur(16px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(120%) !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
  }

  .studio-center-player::-webkit-scrollbar {
    display: none !important;
  }

  .studio-artwork-bezel {
    width: min(230px, 58vw) !important;
    max-width: 230px !important;
    margin: 4px auto 12px !important;
    padding: 10px !important;
    border-radius: 22px !important;
    background: rgba(0, 0, 0, 0.20) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  .studio-artwork {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    margin-bottom: 0 !important;
    border-radius: 16px !important;
  }

  .studio-artwork .cv {
    border-radius: 16px !important;
  }

  .studio-track-title {
    font-size: 18px !important;
    margin-bottom: 3px !important;
  }

  .studio-track-artist {
    font-size: 13px !important;
    margin-bottom: 6px !important;
  }

  .studio-ctl-row {
    gap: 8px !important;
    margin: 10px 0 14px !important;
  }

  .studio-play-btn {
    width: 58px !important;
    height: 58px !important;
  }

  .studio-play-btn svg {
    width: 26px !important;
    height: 26px !important;
  }

  .studio-ctl-btn {
    width: 38px !important;
    height: 38px !important;
  }

  .studio-ctl-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  .studio-bottom-capsule {
    padding: 6px 8px !important;
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
  }

  .studio-capsule-item {
    padding: 4px 10px !important;
    min-width: 50px !important;
  }

  /* Hero Headers on Mobile (Album, Artist, Playlist) */
  .hd {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 16px !important;
    padding: 14px 0 16px !important;
  }

  .hd .cv {
    width: 170px !important;
    height: 170px !important;
    border-radius: 20px !important;
    margin: 0 auto !important;
  }

  .hd .cv.rd {
    border-radius: 50% !important;
  }

  .hd-content {
    width: 100% !important;
  }

  .hd h1 {
    font-size: 24px !important;
    margin: 4px 0 8px !important;
  }

  .hd-meta {
    justify-content: center !important;
    font-size: 13px !important;
    gap: 6px !important;
  }

  .hd-actions {
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 14px !important;
  }

  /* Artist Glass Hero Banner on Mobile */
  .artist-hero-card {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 20px 16px !important;
    min-height: auto !important;
    gap: 14px !important;
    border-radius: 24px !important;
  }

  .artist-hero-info {
    max-width: 100% !important;
    width: 100% !important;
  }

  .artist-hero-name {
    font-size: 24px !important;
  }

  .artist-hero-media {
    width: 130px !important;
    height: 130px !important;
    justify-content: center !important;
  }

  .artist-cutout-img {
    max-width: 125px !important;
    max-height: 125px !important;
    border-radius: 50% !important;
  }

  .artist-actions-bar {
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: center !important;
  }

  .artist-actions-left {
    width: 100% !important;
    justify-content: center !important;
  }

  .artist-actions-right {
    width: 100% !important;
    justify-content: center !important;
    gap: 16px !important;
  }

  /* Dialogs and Modals on Mobile */
  dialog {
    width: min(440px, calc(100vw - 28px)) !important;
    padding: 20px 18px !important;
    border-radius: 24px !important;
    background: rgba(18, 20, 26, 0.92) !important;
    backdrop-filter: blur(20px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65) !important;
  }

  .empty-likes-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 16px !important;
  }

  .sc-login-pill-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .search-page-box {
    margin: 10px 0 16px !important;
  }
}

/* Extra Small Screens (<= 380px) */
@media (max-width: 380px) {
  #pl #nx {
    display: none !important;
  }

  .greeting-title {
    font-size: 20px !important;
  }

  .cd {
    min-width: 130px !important;
    width: 130px !important;
    flex: 0 0 130px !important;
  }

  .cd .cv-wrap {
    width: 130px !important;
    height: 130px !important;
  }

  .studio-center-player {
    max-width: 330px !important;
    padding: 14px 14px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .studio-artwork-bezel {
    max-width: 200px !important;
  }

  .tr [data-add-to-pl] {
    display: none !important;
  }
}

