:root {
  --bg-black: #000000;
  --panel-bg: #141414;
  --surface: #1d1d1f;
  --surface-hover: rgba(255, 255, 255, 0.065);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text-primary: #ffffff;
  --text-secondary: #9a9aa0;
  --text-muted: #66666d;

  --ym-yellow: #ffdf00;
  --ym-yellow-hover: #ffe738;
  --danger: #ff5555;

  /* Dynamic track cover tint (updated via JS from album artwork) */
  --player-tint: #25233a;
  --player-tint-dark: #1b192b;

  --sidebar-w: 256px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
}

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

html, body {
  height: 100%;
  background: var(--bg-black);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* ---------- App Shell ---------- */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  background: var(--bg-black);
  overflow: hidden;
}

/* ---------- Left Pure-Black Sidebar ---------- */

.sidebar {
  background: var(--bg-black);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 16px;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 10px 28px;
  text-align: left;
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.04;
}

.brand-top {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ym-yellow);
  letter-spacing: -0.01em;
}

.brand-bottom {
  font-size: 22px;
  font-weight: 900;
  color: var(--ym-yellow);
  letter-spacing: -0.03em;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px;
  border-radius: 12px;
  color: #8b8b92;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.15s, background 0.15s;
  text-align: left;
  width: 100%;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: #ffffff;
  font-weight: 600;
}

.nav-badge {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: #8b8b92;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: 99px;
}

.sidebar-action {
  margin: 20px 0 22px;
}

.btn-upload-sidebar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 99px;
  background: #1a1a1d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 600;
  font-size: 14.5px;
  transition: background 0.15s, border-color 0.15s;
}

.btn-upload-sidebar:hover {
  background: #252529;
  border-color: rgba(255, 223, 0, 0.35);
}

.playlists-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 14px;
}

.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 8px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.playlist-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 9px;
  color: #8b8b92;
  font-size: 13.5px;
  transition: background 0.14s, color 0.14s;
  text-align: left;
  width: 100%;
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.playlist-item.active {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  font-weight: 600;
}

.playlist-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-item-count {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-left: 8px;
}

.playlist-empty {
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Bottom-Left Account Card */
.sidebar-account {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.account-login-btn,
.account-logged {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.account-login-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 223, 0, 0.3);
}

.account-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #222329;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

.account-avatar-active {
  background: var(--ym-yellow);
  color: #000000;
}

.account-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.account-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-role,
.account-role-pill {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.account-role-pill {
  color: var(--ym-yellow);
  font-weight: 600;
}

.nav-badge-warn {
  background: rgba(255, 223, 0, 0.18);
  color: var(--ym-yellow);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 14px 22px 0;
}

.auth-tab {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.15s, color 0.15s;
}

.auth-tab.active {
  background: var(--ym-yellow);
  color: #000000;
}

.mod-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-approve-sm {
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--ym-yellow);
  color: #000000;
  font-size: 12px;
  font-weight: 700;
}

.btn-approve-sm:hover {
  background: var(--ym-yellow-hover);
}

.btn-reject-sm {
  padding: 6px 11px;
  border-radius: 99px;
  background: rgba(255, 85, 85, 0.15);
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
}

.btn-reject-sm:hover {
  background: rgba(255, 85, 85, 0.25);
}

/* ---------- Main Right Column ---------- */

.main-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-black);
}

/* ---------- Buttons ---------- */

.btn-yellow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 99px;
  background: var(--ym-yellow);
  color: #09090b;
  font-weight: 700;
  font-size: 13.5px;
  transition: background 0.15s, transform 0.12s;
}

.btn-yellow:hover:not(:disabled) {
  background: var(--ym-yellow-hover);
}

.btn-yellow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: #ffffff;
  font-weight: 500;
  font-size: 13px;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.13);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 99px;
  color: #d4d4d8;
  font-weight: 500;
  font-size: 13.5px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.15s, color 0.15s;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-ghost:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s, color 0.15s;
}

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

.btn-danger-ghost {
  padding: 9px 15px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--danger);
  border: 1px solid rgba(255, 85, 85, 0.3);
}

.btn-danger-ghost:hover {
  background: rgba(255, 85, 85, 0.14);
}

.icon-btn, .icon-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.15s, background 0.15s, transform 0.12s;
  position: relative;
}

.icon-btn {
  width: 36px;
  height: 36px;
}

.icon-btn-sm {
  width: 26px;
  height: 26px;
}

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

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.icon-btn.active {
  color: var(--ym-yellow);
}

/* ==========================================================
   SCREEN 1: MY WAVE FULL STAGE (Yandex Music exact aesthetic)
   ========================================================== */

.wave-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000000;
  overflow: hidden;
  display: flex;
}

.wave-stage-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.wave-stage-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 410px) 1fr;
  align-items: center;
  padding: 24px 52px 24px 36px;
  gap: 24px;
}

/* Left Vertical Scenario Rail — Expressive Floating Icons (No Boxes) */
.wave-rail {
  height: 100%;
  max-height: 700px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 40px 6px;
  scrollbar-width: none;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 13%,
    black 87%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 13%,
    black 87%,
    transparent 100%
  );
}

.wave-rail::-webkit-scrollbar {
  display: none;
}

.wave-scenario {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border-radius: 14px;
  text-align: left;
  color: rgba(255, 255, 255, 0.72);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.wave-scenario:hover {
  transform: translateX(5px);
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
}

.wave-scenario.active {
  background: rgba(255, 255, 255, 0.085);
  color: #ffffff;
}

.wave-scenario.active .ws-label {
  color: var(--ym-yellow);
  font-weight: 700;
}

.ws-pill {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.wave-scenario:hover .ws-pill,
.wave-scenario.active .ws-pill {
  transform: scale(1.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.ws-pill-yellow { color: #ffdf00; background: rgba(255, 223, 0, 0.11); }
.ws-pill-gold   { color: #f5c842; background: rgba(245, 200, 66, 0.11); }
.ws-pill-teal   { color: #38d9a9; background: rgba(56, 217, 169, 0.11); }
.ws-pill-coral  { color: #ff6b81; background: rgba(255, 107, 129, 0.12); }
.ws-pill-rose   { color: #f06595; background: rgba(240, 101, 149, 0.12); }
.ws-pill-amber  { color: #ffa94d; background: rgba(255, 169, 77, 0.12); }
.ws-pill-sky    { color: #74c0fc; background: rgba(116, 192, 252, 0.12); }
.ws-pill-indigo { color: #91a7ff; background: rgba(145, 167, 255, 0.12); }

.ws-label {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.ws-label-accent {
  color: var(--ym-yellow);
}

/* Center Wave Player */
.wave-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 30px;
  padding: 16px 20px;
}

.wave-stage-title {
  font-size: clamp(56px, 6.2vw, 88px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--ym-yellow);
  text-shadow: 0 10px 44px rgba(0, 0, 0, 0.4);
}

.wave-cover-box {
  width: 136px;
  height: 136px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(20, 22, 30, 0.85);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.58);
  transition: transform 0.2s ease;
}

.wave-cover-box:hover {
  transform: scale(1.06);
}

.wave-cover {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.wave-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Capsule Bar Row */
.wave-capsule-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 720px;
}

.wave-vol-wrap, .mp-vol-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wave-vol-popover {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 48px;
  height: 186px;
  padding: 16px 0;
  border-radius: 99px;
  background: rgba(22, 23, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 40;
}

.wave-vol-popover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 16px;
}

.wave-vol-wrap:hover .wave-vol-popover,
.wave-vol-wrap.dragging .wave-vol-popover,
.mp-vol-wrap:hover .wave-vol-popover,
.mp-vol-wrap.dragging .wave-vol-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.wave-vol-track {
  position: relative;
  width: 8px;
  height: 100%;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  overflow: hidden;
}

.wave-vol-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 85%;
  border-radius: 99px;
  background: #ffffff;
}

.wave-round-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--ym-yellow);
  background: rgba(24, 26, 34, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  transition: background 0.15s, transform 0.12s;
}

.wave-round-btn svg {
  width: 21px;
  height: 21px;
}

.wave-round-btn:hover {
  background: rgba(40, 44, 58, 0.85);
  transform: scale(1.06);
}

.wave-round-btn.liked svg {
  fill: var(--ym-yellow);
}

.wave-round-btn.active {
  background: rgba(255, 223, 0, 0.18);
  border-color: rgba(255, 223, 0, 0.45);
}

.wave-capsule {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 60px;
  border-radius: 99px;
  background: rgba(24, 28, 40, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  cursor: pointer;
}

.wave-capsule-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.wave-capsule-text {
  position: relative;
  z-index: 1;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ym-yellow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wave-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.wave-transport-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--ym-yellow);
  display: grid;
  place-items: center;
  transition: transform 0.14s, background 0.14s;
}

.wave-transport-icon svg {
  width: 26px;
  height: 26px;
}

.wave-transport-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(1.1);
}

.wave-play-btn {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--ym-yellow);
  color: #000000;
  display: grid;
  place-items: center;
  box-shadow: 0 14px 38px rgba(255, 223, 0, 0.32);
  transition: transform 0.16s ease;
}

.wave-play-btn svg {
  width: 30px;
  height: 30px;
}

.wave-play-btn:hover {
  transform: scale(1.07);
}

.wave-stage.is-active .wave-play-btn {
  animation: wavePulseRing 2.1s ease-out infinite;
}

@keyframes wavePulseRing {
  0% { box-shadow: 0 0 0 0 rgba(255, 223, 0, 0.45), 0 14px 38px rgba(255, 223, 0, 0.28); }
  70% { box-shadow: 0 0 0 26px rgba(255, 223, 0, 0), 0 14px 38px rgba(255, 223, 0, 0.28); }
  100% { box-shadow: 0 0 0 0 rgba(255, 223, 0, 0), 0 14px 38px rgba(255, 223, 0, 0.28); }
}

.wave-lyric-preview {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 680px;
  padding: 13px 26px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(14px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 17px;
  font-weight: 700;
  transition: background 0.18s, border-color 0.18s;
}

.wave-lyric-preview:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.18);
}

.wave-lyric-spark {
  color: var(--ym-yellow);
  font-size: 16px;
  flex-shrink: 0;
}

.wave-lyric-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.28em;
  animation: waveLineEnter 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes waveLineEnter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.wave-lyric-word {
  display: inline-block;
  background-image: linear-gradient(
    90deg,
    #ffffff var(--fill, 0%),
    rgba(255, 255, 255, 0.32) calc(var(--fill, 0%) + 8%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s ease;
}

.wave-lyric-word.current {
  transform: translateY(-1px) scale(1.02);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.wave-lyric-word.current.sustained {
  background-image: linear-gradient(
    90deg,
    #fff7cc 0%,
    #ffe359 var(--fill, 0%),
    rgba(255, 255, 255, 0.34) calc(var(--fill, 0%) + 10%)
  );
  transform: translateY(-2px) scale(1.05);
  filter: drop-shadow(0 0 14px rgba(255, 228, 95, 0.5));
}

.wave-ai-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: -12px;
}

.wave-ai-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Hide floating bottom mini-player on the full Wave screen (just like Screen 1) */
body.view-is-wave .mini-player {
  display: none;
}

/* ==========================================================
   SCREEN 2: COLLECTION / CATALOG ROUNDED DARK PANEL
   ========================================================== */

.panel-surface {
  flex: 1;
  min-height: 0;
  margin: 8px 8px 8px 0;
  background: var(--panel-bg);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-topbar {
  padding: 16px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 520px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 46px;
  padding: 0 38px 0 44px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #1f1f22;
  font-size: 15px;
  color: #ffffff;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.search-box input::placeholder {
  color: #7c7c84;
}

.search-box input:focus {
  border-color: rgba(255, 255, 255, 0.22);
  background: #252529;
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 16px;
}

.search-clear:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.panel-inner {
  flex: 1;
  overflow-y: auto;
  padding: 22px 28px 36px;
}

.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.view-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.view-subtitle {
  margin-top: 6px;
  font-size: 15.5px;
  color: var(--text-secondary);
}

.subtitle-accent {
  color: #eb4d9c;
  font-weight: 600;
}

.view-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Yandex Music Collection Sections */
.ym-section {
  margin-bottom: 34px;
}

.ym-section-head {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  text-align: left;
  transition: opacity 0.15s;
}

.ym-section-head:hover {
  opacity: 0.88;
}

.ym-tile {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ym-tile-liked {
  background: linear-gradient(135deg, #c6372f 0%, #6e1a21 100%);
  color: #ff9c8a;
  box-shadow: 0 8px 20px rgba(198, 55, 47, 0.35);
}

.ym-tile-year {
  background: linear-gradient(135deg, #3b5bdb 0%, #c92a76 55%, #f59f00 100%);
  color: #ffdf00;
  font-size: 13px;
  font-weight: 900;
  line-height: 0.95;
  text-align: center;
}

.ym-section-meta h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ym-section-meta .chevron {
  color: var(--text-secondary);
  font-weight: 500;
}

.ym-section-meta p {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.block-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.block-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.tracks-counter {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------- Artist Profile Page (Yandex Music exact style) ---------- */

.artist-hero {
  position: relative;
  margin: -22px -28px 30px;
  padding: 22px 32px 34px;
  background: linear-gradient(180deg, #3c3e45 0%, #1d1e22 65%, #141414 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.artist-hero-nav {
  margin-bottom: 18px;
}

.artist-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: grid;
  place-items: center;
  transition: background 0.15s, transform 0.12s;
}

.artist-back-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.06);
}

.artist-hero-main {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.artist-avatar-lg {
  width: 184px;
  height: 184px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #232429;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.artist-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.artist-hero-info {
  flex: 1;
  min-width: 240px;
}

.artist-eyebrow {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 4px;
}

.artist-name-lg {
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #ffffff;
}

.artist-stats-pill {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.34);
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.artist-bio {
  margin-top: 10px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.72);
  max-width: 580px;
}

.artist-bio:empty {
  display: none;
}

.artist-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.artist-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 310px);
  gap: 36px;
  align-items: start;
}

.artist-col-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.artist-col-title span {
  color: var(--text-secondary);
}

.artist-release-card {
  cursor: pointer;
}

.release-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #202025;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  margin-bottom: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
}

.release-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.release-play-fab {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ym-yellow);
  color: #000000;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.artist-release-card:hover .release-play-fab,
.release-card:hover .release-play-fab {
  opacity: 1;
  transform: translateY(0);
}

.release-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.release-sub {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ---------- Redesigned Catalog Home (Artists Row + Releases Grid) ---------- */

.artists-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 18px;
}

.artist-circle-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.16s, transform 0.16s, border-color 0.16s;
}

.artist-circle-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.artist-circle-img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  overflow: hidden;
  background: #222328;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  margin-bottom: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.artist-circle-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.artist-circle-name {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-circle-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.releases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 18px;
}

.release-card {
  padding: 12px;
  border-radius: 16px;
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.16s, transform 0.16s, border-color 0.16s;
}

.release-card:hover {
  background: #222227;
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.artist-link {
  cursor: pointer;
  transition: color 0.14s;
}

.artist-link:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

.artist-avatar-picker {
  display: flex;
  align-items: center;
  gap: 16px;
}

.artist-avatar-preview {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  background: #232328;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.artist-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-avatar-label {
  cursor: pointer;
}

@media (max-width: 960px) {
  .artist-body-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Redesigned Collection Smart Cards & Filter Tabs ---------- */

.col-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.col-card {
  position: relative;
  height: 162px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1a1a1e;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.col-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.col-card-liked {
  background: linear-gradient(145deg, #2b1820 0%, #19161b 100%);
}

.col-card-karaoke {
  background: linear-gradient(145deg, #282315 0%, #18181b 100%);
}

.col-card-all {
  background: linear-gradient(145deg, #192130 0%, #16181e 100%);
}

.col-card-create {
  background: #17171a;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.14);
}

.col-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.col-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: grid;
  place-items: center;
}

.col-icon-liked {
  background: rgba(235, 77, 114, 0.18);
  color: #ff6b8b;
}

.col-icon-karaoke {
  background: rgba(255, 223, 0, 0.14);
  color: var(--ym-yellow);
}

.col-icon-all {
  background: rgba(120, 174, 245, 0.15);
  color: #8cc2ff;
}

.col-icon-add {
  background: rgba(255, 255, 255, 0.07);
  color: #d4d4d8;
}

.col-card-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ym-yellow);
  color: #000000;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.col-card:hover .col-card-play {
  opacity: 1;
  transform: translateY(0);
}

.col-card-bottom h3 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.015em;
}

.col-card-bottom p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.col-filter-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.col-tab {
  padding: 9px 18px;
  border-radius: 99px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.col-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.col-tab.active {
  background: #ffffff;
  color: #09090b;
  font-weight: 600;
}

/* Clean Full-Width Track List */
.clean-track-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ym-track-item {
  display: grid;
  grid-template-columns: 36px 54px minmax(0, 1.8fr) minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.13s ease;
}

.ym-track-item:hover {
  background: rgba(255, 255, 255, 0.055);
}

.ym-track-item.is-current {
  background: rgba(255, 255, 255, 0.075);
}

.ym-track-num {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}

.ym-track-album {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ym-lyrics-pill {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.ym-lyrics-pill.ready {
  color: var(--ym-yellow);
  background: rgba(255, 223, 0, 0.11);
}

@media (max-width: 1040px) {
  .col-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ym-track-item {
    grid-template-columns: 28px 44px minmax(0, 1fr) auto auto auto;
  }
  .ym-track-album {
    display: none;
  }
}

.ym-track-cover {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: #232327;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.ym-track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ym-cover-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.56);
  color: #ffffff;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.14s;
}

.ym-track-item:hover .ym-cover-play-overlay,
.ym-track-item.is-current .ym-cover-play-overlay {
  opacity: 1;
}

.ym-track-meta {
  flex: 1;
  min-width: 0;
}

.ym-track-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ym-track-title {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ym-track-item.is-current .ym-track-title {
  color: var(--ym-yellow);
}

.ym-lyrics-dot {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.08);
}

.ym-lyrics-dot.ready {
  color: var(--ym-yellow);
  background: rgba(255, 223, 0, 0.12);
}

.ym-track-artist {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.ym-track-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ym-track-dur {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 38px;
  text-align: right;
}

.ym-more-btn {
  opacity: 0;
  width: 28px;
  height: 28px;
}

.ym-track-item:hover .ym-more-btn {
  opacity: 1;
}

.like-heart.liked {
  color: var(--ym-yellow);
}

.like-heart.liked svg {
  fill: var(--ym-yellow);
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bars span {
  width: 2.5px;
  background: var(--ym-yellow);
  border-radius: 2px;
  animation: eqBounce 0.85s ease-in-out infinite;
}

.eq-bars span:nth-child(2) { animation-delay: 0.2s; }
.eq-bars span:nth-child(3) { animation-delay: 0.4s; }

@keyframes eqBounce {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

/* ---------- Empty State ---------- */

.empty-state {
  margin: 36px auto;
  max-width: 400px;
  text-align: center;
  padding: 36px 24px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
}

.empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: #1f1f22;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ==========================================================
   FLOATING COLOR-TINTED BOTTOM MINI PLAYER (Screen 2 style)
   ========================================================== */

.mini-player {
  position: relative;
  height: 90px;
  margin: 0 8px 8px 0;
  border-radius: 18px;
  background: linear-gradient(90deg, var(--player-tint) 0%, var(--player-tint-dark) 100%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 24px 0 14px;
  gap: 18px;
  flex-shrink: 0;
  transition: background 0.45s ease;
  z-index: 30;
}

.mp-progress-top {
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 4px;
  cursor: pointer;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.mp-progress-top-fill {
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.65);
  transition: width 0.08s linear;
}

.mp-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mp-cover-btn {
  width: 62px;
  height: 62px;
  border-radius: 11px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: transform 0.14s;
}

.mp-cover-btn:hover {
  transform: scale(1.04);
}

.mp-cover {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.mp-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mp-meta {
  min-width: 0;
}

.mp-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.mp-artist {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.mp-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.transport-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.play-circle-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ym-yellow);
  color: #000000;
  display: grid;
  place-items: center;
  transition: transform 0.12s ease;
}

.play-circle-btn svg {
  width: 21px;
  height: 21px;
}

.play-circle-btn:hover {
  transform: scale(1.06);
}

.repeat-one-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 800;
  color: var(--ym-yellow);
}

.mp-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.mp-time-inline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}

/* ==========================================================
   SCREEN 3: EXPANDED FULL-SCREEN KARAOKE PLAYER (Yandex style)
   ========================================================== */

.expanded-player {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #101118;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.26s ease;
}

.expanded-player.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.ep-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.ep-shell {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: radial-gradient(
    circle at 28% 50%,
    rgba(0, 0, 0, 0.14) 0%,
    rgba(0, 0, 0, 0.36) 100%
  );
}

.ep-top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 0;
  flex-shrink: 0;
}

.ep-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ep-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.ep-sync-pill button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.14s;
}

.ep-sync-pill button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.ep-sync-pill span {
  padding: 0 5px;
  font-variant-numeric: tabular-nums;
}

.ep-collapse-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  transition: background 0.15s, transform 0.14s;
}

.ep-collapse-circle:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06);
}

.ep-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 64px 36px;
  max-width: 1460px;
  width: 100%;
  margin: 0 auto;
}

/* Left Artwork Card with Overlay Controls */
.ep-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.ep-artwork-card {
  position: relative;
  width: min(360px, 34vw);
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.48);
  will-change: transform, box-shadow;
  transition: width 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.ep-body.centered .ep-artwork-card,
.ep-body.centered .ep-track-centered,
.ep-body.centered .ep-scrubber {
  width: min(410px, 44vw);
}

.ep-artwork {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.4);
}

.ep-artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ep-art-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.5) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.ep-artwork-card:hover .ep-art-overlay,
.ep-artwork-card:focus-within .ep-art-overlay {
  opacity: 1;
}

.ep-art-circle,
.ep-art-play {
  outline: none;
}

.ep-art-circle {
  border-radius: 50%;
  background: rgba(16, 16, 20, 0.62);
  color: #ffffff;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  position: relative;
  transition: background 0.15s, transform 0.14s, box-shadow 0.15s;
}

.ep-art-circle:hover {
  background: rgba(16, 16, 20, 0.82);
  transform: scale(1.07);
}

.ep-art-circle.active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.ep-art-top-right {
  width: 42px;
  height: 42px;
  align-self: flex-end;
}

.ep-art-center-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ep-art-sm {
  width: 36px;
  height: 36px;
}

.ep-art-md {
  width: 44px;
  height: 44px;
}

.ep-art-lg {
  width: 52px;
  height: 52px;
}

.ep-art-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ym-yellow);
  color: #000000;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  transition: transform 0.14s;
}

.ep-art-play:hover {
  transform: scale(1.07);
}

.ep-art-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px 2px;
}

.ep-track-centered {
  text-align: center;
  width: min(360px, 34vw);
  transition: width 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.ep-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-artist {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-scrubber {
  width: min(360px, 34vw);
  transition: width 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.seek-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.seek-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0;
  transition: opacity 0.15s;
}

.seek-slider:hover::-webkit-slider-thumb {
  opacity: 1;
}

.ep-times {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* Right Column: Smoothly Slides In/Out when Toggling Karaoke / Queue */
.ep-right {
  flex: 1 1 0;
  max-width: 720px;
  height: 100%;
  min-height: 0;
  margin-left: 64px;
  position: relative;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateX(0);
  overflow: hidden;
  transition:
    max-width 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    margin-left 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease,
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

.ep-body.centered .ep-right {
  max-width: 0;
  margin-left: 0;
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
}

.ep-panel {
  display: none;
  flex: 1;
  min-height: 0;
  position: relative;
}

.ep-panel.active {
  display: flex;
  flex-direction: column;
}

.karaoke-container {
  flex: 1;
  overflow-y: auto;
  padding: 24vh 20px 38vh;
  scroll-behavior: smooth;
  text-align: center;
  scrollbar-width: none;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 16%,
    black 84%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 16%,
    black 84%,
    transparent 100%
  );
}

.karaoke-container::-webkit-scrollbar {
  display: none;
}

.karaoke-line {
  font-size: clamp(25px, 2.8vw, 38px);
  font-weight: 800;
  line-height: 1.34;
  letter-spacing: -0.025em;
  padding: 13px 18px;
  margin-bottom: 14px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  filter: blur(0.65px);
  transform: scale(0.96);
  transition:
    color 0.3s ease,
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.32s ease,
    background 0.18s ease;
}

.karaoke-line:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
  filter: blur(0);
}

.karaoke-line.past {
  color: rgba(255, 255, 255, 0.28);
  filter: blur(0.45px);
}

.karaoke-line.active {
  color: rgba(255, 255, 255, 0.38);
  filter: blur(0);
  transform: scale(1.045);
}

.karaoke-word {
  display: inline-block;
  margin-right: 0.27em;
  will-change: transform, filter;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), filter 0.22s ease;
}

/* Liquid left-to-right karaoke fill sweep on the active line! */
.karaoke-line.active .karaoke-word {
  background-image: linear-gradient(
    90deg,
    #ffffff var(--fill, 0%),
    rgba(255, 255, 255, 0.3) calc(var(--fill, 0%) + 6%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Normal currently sung word: clean crisp white sweep */
.karaoke-line.active .karaoke-word.current {
  transform: translateY(-1px) scale(1.015);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.28));
}

/* Held / sustained word: subtle lift, soft warm-gold shimmer & delicate glow */
.karaoke-line.active .karaoke-word.current.sustained {
  background-image: linear-gradient(
    90deg,
    #fff7cc 0%,
    #ffe359 var(--fill, 0%),
    rgba(255, 255, 255, 0.34) calc(var(--fill, 0%) + 10%)
  );
  transform: translateY(-2px) scale(1.045);
  filter: drop-shadow(0 0 16px rgba(255, 228, 95, 0.48));
}

.karaoke-line.active .karaoke-word.spoken {
  transform: translateY(0) scale(1);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

/* Instrumental Pause / Interlude Breathing Dots (Apple Music style) */
.karaoke-pause-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  transition: height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease, margin 0.35s ease;
}

.karaoke-pause-dots.visible {
  height: 36px;
  opacity: 1;
  margin: 8px 0 16px;
}

.karaoke-pause-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0.85);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.karaoke-pause-dots span.lit {
  background: #ffffff;
  transform: scale(1.15);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
}

.karaoke-status-box {
  margin: auto;
  max-width: 420px;
  text-align: center;
  padding: 36px 28px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.karaoke-status-box h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 14px 0 8px;
}

.karaoke-status-box p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 18px;
}

.karaoke-progress-bar {
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  margin: 14px 0 8px;
}

.karaoke-progress-fill {
  height: 100%;
  background: var(--ym-yellow);
  border-radius: 99px;
  transition: width 0.35s ease;
}

.spinner-md {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border: 2.5px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--ym-yellow);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.resync-btn {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 18px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
}

/* Queue Panel */
.queue-header {
  display: flex;
  justify-content: space-between;
  padding: 12px 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.queue-list {
  flex: 1;
  overflow-y: auto;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s;
}

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

.queue-item.is-current {
  background: rgba(255, 223, 0, 0.12);
}

.queue-item.is-current .queue-title {
  color: var(--ym-yellow);
}

.queue-title {
  font-size: 14px;
  font-weight: 600;
}

.queue-artist {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.62);
}

.queue-dur {
  margin-left: auto;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
  font-variant-numeric: tabular-nums;
}

.row-cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

.row-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.row-meta {
  min-width: 0;
}

/* ---------- Modals ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: #17171a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.modal-sm {
  max-width: 410px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.modal-close {
  font-size: 20px;
  line-height: 1;
}

.modal-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 6px;
}

.dropzone {
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--ym-yellow);
  background: rgba(255, 223, 0, 0.05);
}

.dropzone-title {
  margin-top: 10px;
  font-size: 14px;
  color: #ffffff;
}

.link-accent {
  color: var(--ym-yellow);
  font-weight: 600;
}

.dropzone-hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.selected-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 130px;
  overflow-y: auto;
}

.selected-file-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-radius: 8px;
  background: #222226;
  font-size: 12.5px;
}

.selected-file-size {
  color: var(--text-muted);
  font-size: 11.5px;
}

.form-grid, .form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.field input, .field select, textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #101012;
  color: #ffffff;
  font-size: 13.5px;
  outline: none;
}

.field input:focus, .field select:focus, textarea:focus {
  border-color: rgba(255, 223, 0, 0.5);
}

textarea {
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.whisper-settings {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--ym-yellow);
}

.upload-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.progress-bar-track {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--ym-yellow);
  transition: width 0.25s ease;
}

/* ---------- Context Menu ---------- */

.context-menu {
  position: fixed;
  z-index: 95;
  min-width: 210px;
  background: #1c1c20;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65);
}

.ctx-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.12s;
}

.ctx-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ctx-item.danger {
  color: var(--danger);
}

.ctx-divider {
  height: 1px;
  background: var(--border);
  margin: 5px 0;
}

.ctx-label {
  padding: 5px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ---------- Toasts ---------- */

.toast-container {
  position: fixed;
  right: 22px;
  bottom: 96px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 11px 16px;
  border-radius: 12px;
  background: #202025;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */

@media (max-width: 1040px) {
  .ym-two-col-grid {
    grid-template-columns: 1fr;
  }
  .ep-body {
    grid-template-columns: 1fr;
    padding: 16px 24px 28px;
    gap: 24px;
    overflow-y: auto;
  }
  .ep-artwork-card, .ep-track-centered, .ep-scrubber {
    width: min(260px, 70vw);
  }
}

@media (max-width: 900px) {
  .wave-stage-grid {
    grid-template-columns: 1fr;
    padding: 16px;
    overflow-y: auto;
  }
  .wave-rail {
    flex-direction: row;
    max-height: none;
    height: auto;
    padding: 8px 0;
    mask-image: none;
    -webkit-mask-image: none;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .wave-scenario {
    flex-shrink: 0;
  }
}

@media (max-width: 720px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .panel-surface {
    margin: 0;
    border-radius: 0;
  }
  .mini-player {
    margin: 0;
    border-radius: 0;
    grid-template-columns: 1fr auto;
  }
  .mp-right {
    display: none;
  }
  .form-grid, .form-grid-2 {
    grid-template-columns: 1fr;
  }
}
