@font-face {
  font-family: "SF Pro Rounded";
  src: url("./assets/fonts/SF-Pro-Rounded-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #030407;
  --app-max-width: 430px;
  --surface: rgba(24, 27, 35, 0.5);
  --surface-strong: rgba(18, 20, 28, 0.78);
  --surface-border: rgba(255, 255, 255, 0.17);
  --glass: rgba(255, 255, 255, 0.08);
  --text: #f2f4fb;
  --muted: #9ea4b1;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "SF Pro Rounded", "Segoe UI", sans-serif;
  overflow-x: hidden;
  overscroll-behavior: none;
}

body.lock-scroll {
  overflow: hidden;
}

button,
input {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.sf-icon,
.cool-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.sf-icon.stroke,
.cool-icon.stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sf-icon.fill,
.cool-icon.fill {
  fill: currentColor;
}

.bg-layer,
.liquid-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-layer {
  background:
    linear-gradient(180deg, rgba(2, 4, 8, 0.5) 0%, rgba(2, 3, 7, 0.78) 62%, rgba(2, 3, 6, 0.93) 100%),
    radial-gradient(120% 75% at 50% 112%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 60%),
    url("./assets/background/liquid-glass.svg") center / cover no-repeat;
}

.liquid-layer {
  opacity: 0.36;
  background:
    radial-gradient(100% 70% at 50% -8%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 64%),
    radial-gradient(95% 75% at 50% 108%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: normal;
  filter: contrast(1.02);
}

.home-screen {
  position: relative;
  z-index: 2;
  width: min(100vw, var(--app-max-width));
  margin: 0 auto;
  padding: calc(var(--safe-top) + 12px) 16px calc(var(--safe-bottom) + 132px);
  animation: contentIn 0.5s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

.home-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-top: 14px;
}

.home-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)),
    rgba(12, 16, 24, 0.46);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 10px 26px rgba(0, 0, 0, 0.26);
}

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

.home-search-btn {
  width: 96%;
  justify-self: end;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.17);
  color: #ecf1fb;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    rgba(14, 18, 26, 0.48);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 14px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.home-search-btn span {
  min-width: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: rgba(236, 241, 251, 0.93);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-search-btn .cool-icon {
  width: 16px;
  height: 16px;
  opacity: 0.86;
}

.home-search-btn:active {
  transform: scale(0.985);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #eef2ff;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

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

.icon-btn.small {
  width: 38px;
  height: 38px;
}

.hero-stage {
  margin-top: 8px;
  min-height: 56vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding-top: 30px;
  position: relative;
}

.hero-ring {
  position: absolute;
  width: min(74vw, 302px);
  height: min(67vw, 274px);
  border-radius: 58% 42% 64% 36% / 40% 60% 44% 56%;
  transform: rotate(-11deg);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    radial-gradient(126% 102% at 24% 18%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.14) 36%, rgba(255, 255, 255, 0.03) 60%, rgba(255, 255, 255, 0) 76%),
    radial-gradient(88% 95% at 74% 76%, rgba(8, 12, 20, 0.08) 20%, rgba(6, 10, 18, 0.26) 60%, rgba(4, 8, 14, 0.36) 100%),
    linear-gradient(142deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(14px) saturate(1.28);
  -webkit-backdrop-filter: blur(14px) saturate(1.28);
  opacity: 0.76;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -14px 30px rgba(0, 0, 0, 0.2),
    0 20px 34px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.hero-ring::before,
.hero-ring::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-ring::before {
  inset: 9% 10%;
  border-radius: 61% 39% 57% 43% / 47% 53% 42% 58%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.01));
  opacity: 0.86;
}

.hero-ring::after {
  inset: -8% 3% 1% -3%;
  border-radius: 46% 54% 48% 52% / 62% 38% 56% 44%;
  background:
    radial-gradient(84% 62% at 74% 28%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 72%),
    radial-gradient(45% 40% at 18% 78%, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 82%);
  filter: blur(1px);
}

.flow-main-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 0;
  padding: 0;
  font-size: clamp(34px, 9vw, 44px);
  font-weight: 700;
  color: #f9fbff;
  letter-spacing: 0.01em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease;
}

.flow-main-btn:active {
  transform: scale(0.98);
}

.flow-main-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(12, 16, 24, 0.46);
  color: rgba(226, 232, 242, 0.78);
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 8px 20px rgba(0, 0, 0, 0.28);
}

.flow-play {
  width: 21px;
  height: 21px;
  margin-left: 1px;
  opacity: 0.82;
}

.flow-main-icon.is-playing .flow-play {
  margin-left: 0;
}

.flow-tune-btn {
  position: relative;
  z-index: 1;
  margin-top: 2px;
  height: 44px;
  min-width: min(80vw, 320px);
  padding: 0 18px;
  border-radius: 999px;
  color: #f6f8ff;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: transform 0.25s ease, background 0.25s ease;
}

.flow-tune-btn:active {
  transform: scale(0.98);
}

.flow-status {
  margin: 2px 0 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(14, 18, 26, 0.46);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  font-size: 13px;
  color: #f4f7ff;
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  max-width: min(92vw, 340px);
}

.home-feed-wrap {
  margin-top: 26px;
  position: relative;
  padding-bottom: 120px;
}

.home-feed-wrap::after {
  content: "";
  position: absolute;
  left: -16px;
  right: -16px;
  bottom: 0;
  height: 130px;
  background: linear-gradient(180deg, rgba(4, 6, 10, 0) 0%, rgba(4, 6, 10, 0.86) 75%, rgba(4, 6, 10, 0.97) 100%);
  pointer-events: none;
}

.feed-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.feed-title-row h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

#homeStatus {
  margin-top: 12px;
}

.home-feed {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.feed-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  --stagger: 0;
}

.feed-cover {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(140deg, #2a2d36, #151821);
}

.feed-main {
  min-width: 0;
}

.feed-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-play {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--surface-border);
  background: var(--surface-strong);
  color: #f7f9ff;
  font-size: 0;
  transition: transform 0.24s ease;
}

.feed-play::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}

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

.search-screen {
  position: fixed;
  z-index: 40;
  inset: 0;
  width: min(100vw, var(--app-max-width));
  margin: 0 auto;
  padding: calc(var(--safe-top) + 8px) 16px calc(var(--safe-bottom) + 138px);
  background: rgba(8, 10, 16, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow-y: auto;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.search-box {
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0 6px 0 12px;
}

.search-box input {
  border: none;
  min-width: 0;
  width: 100%;
  font-size: 17px;
  color: #f4f6fd;
}

.search-box button {
  height: 30px;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #12151c;
  font-size: 13px;
}

.search-tabs,
.quick-chips {
  margin-top: 13px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.search-tabs::-webkit-scrollbar,
.quick-chips::-webkit-scrollbar {
  display: none;
}

.tab-pill,
.chip-btn {
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: #f0f3fb;
  padding: 0 16px;
  white-space: nowrap;
}

.tab-pill {
  height: 42px;
  font-size: 15px;
}

.tab-pill.active {
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.chip-btn {
  height: 36px;
  font-size: 13px;
}

.search-status {
  margin: 12px 2px 8px;
  font-size: 14px;
  color: var(--muted);
}

.results-list {
  display: grid;
  gap: 12px;
}

.result-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  --stagger: 0;
}

.result-cover {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(150deg, #272a35, #11131b);
}

.result-main {
  min-width: 0;
}

.result-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-actions {
  display: flex;
  gap: 8px;
}

.small-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: #f3f6ff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.2s ease;
}

.small-icon-btn:active {
  transform: scale(0.94);
}

.player-screen {
  position: fixed;
  z-index: 60;
  inset: 0;
  width: min(100vw, var(--app-max-width));
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: rgba(4, 6, 10, 0.9);
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: manipulation;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.player-bg {
  position: absolute;
  inset: 0;
}

.player-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  filter: blur(34px) brightness(0.4) saturate(0.86);
}

.player-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 9, 14, 0.36) 0%, rgba(4, 6, 10, 0.86) 66%, rgba(4, 6, 10, 0.96) 100%),
    repeating-radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.05) 0 1.5px, rgba(255, 255, 255, 0) 2.5px 14px);
}

.player-top-row {
  position: relative;
  z-index: 3;
  padding: calc(var(--safe-top) + 22px) 16px 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.player-mode-chip {
  justify-self: center;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  padding: 0 20px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #f2f5ff;
}

.player-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 16px calc(var(--safe-bottom) + 172px);
  overflow: hidden;
}

.player-cover {
  width: min(80%, 312px);
  border-radius: 20px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.44);
  margin: 10px auto 0;
  display: block;
}

.player-meta {
  margin-top: 14px;
}

.player-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.player-meta h3 {
  margin: 0;
  font-size: 40px;
  letter-spacing: -0.03em;
  line-height: 1.08;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(0);
  padding-right: 2px;
}

.like-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05)),
    rgba(13, 17, 24, 0.34);
  color: #f2f6ff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

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

.like-btn.active {
  border-color: rgba(255, 255, 255, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 24px rgba(0, 0, 0, 0.32);
}

.player-meta h3.marquee {
  text-overflow: clip;
}

.player-meta h3 .marquee-track {
  display: inline-flex;
  align-items: baseline;
  min-width: max-content;
}

.player-meta h3 .marquee-sep {
  display: inline-block;
  width: clamp(24px, 6vw, 34px);
}

.player-meta h3.marquee .marquee-track {
  animation: titleMarqueeLoop var(--marquee-duration, 11s) linear infinite;
}

.player-meta h3.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.player-meta p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.timeline-wrap {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: #f2f5ff;
  font-size: 13px;
}

#progressRange {
  --progress: 0%;
  width: 100%;
  height: 24px;
  background: transparent;
}

#progressRange::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)) 0/var(--progress) 100% no-repeat,
    rgba(255, 255, 255, 0.16);
}

#progressRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: #f4f7ff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

#progressRange::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

#progressRange::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
}

#progressRange::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: #f4f7ff;
}

.control-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1fr 1fr;
  align-items: center;
  gap: 8px;
}

.round-btn {
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #f2f5ff;
  border: 1px solid var(--surface-border);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.05)),
    rgba(16, 19, 26, 0.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.22s ease, background 0.22s ease;
}

.round-btn .sf-icon,
.round-btn .cool-icon {
  width: 24px;
  height: 24px;
}

.round-btn.main {
  height: 72px;
  border-radius: 999px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.29), rgba(255, 255, 255, 0.1)),
    rgba(18, 22, 32, 0.45);
}

.round-btn.main .sf-icon,
.round-btn.main .cool-icon {
  width: 30px;
  height: 30px;
}

.round-btn.soft {
  height: 50px;
}

.round-btn:active {
  transform: scale(0.96);
}

.round-btn.active,
.mini-icon-btn.active {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 20px rgba(0, 0, 0, 0.3);
}

.player-bottom-row {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.pill-btn {
  min-width: 0;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06)),
    rgba(15, 18, 25, 0.36);
  color: #f2f5ff;
  font-size: 13px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.22s ease;
}

.pill-btn:active {
  transform: scale(0.97);
}

.queue-drawer {
  position: fixed;
  z-index: 70;
  inset: 0;
  pointer-events: none;
}

.queue-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.queue-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: min(100vw, var(--app-max-width));
  margin: 0 auto;
  max-height: min(82vh, 680px);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  background: rgba(28, 31, 40, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: none;
  padding: 8px 14px calc(var(--safe-bottom) + 14px);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transform: translateY(105%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-drawer.open {
  pointer-events: auto;
}

.queue-drawer.open .queue-scrim {
  opacity: 1;
}

.queue-drawer.open .queue-panel {
  transform: translateY(0);
}

.queue-handle {
  width: 84px;
  height: 5px;
  border-radius: 999px;
  margin: 2px auto 4px;
  background: rgba(255, 255, 255, 0.32);
}

.queue-now {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

#queueNowCover {
  width: 56px;
  height: 56px;
  border-radius: 11px;
  object-fit: cover;
  background: linear-gradient(130deg, #252933, #121621);
}

.queue-now-meta {
  min-width: 0;
}

#queueNowTitle {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#queueNowArtist {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.queue-title-row h3 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.01em;
}

#queueHint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.queue-list {
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 2px;
}

.queue-item-btn {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #f1f4ff;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
}

.queue-item-btn.active {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.56) inset;
}

.queue-cover {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  object-fit: cover;
}

.queue-item-title {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.queue-item-mark {
  font-size: 21px;
  opacity: 0.6;
}

.mini-player {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  width: min(calc(100vw - 24px), 406px);
  margin: 0 auto;
  bottom: calc(var(--safe-bottom) + 74px);
  border-radius: 22px;
  border: 1px solid var(--surface-border);
  background: rgba(18, 20, 28, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 30px rgba(0, 0, 0, 0.34);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  transition: transform 0.24s ease;
}

.mini-player.empty .mini-main,
.mini-player.empty .mini-actions {
  opacity: 0;
  pointer-events: none;
}

.mini-main {
  width: 100%;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
}

#miniCover {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  object-fit: cover;
  background: linear-gradient(130deg, #2a2e3a, #121620);
}

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

#miniTitle {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#miniArtist {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-actions {
  display: flex;
  gap: 8px;
}

.mini-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--surface-border);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(14, 17, 24, 0.48);
  display: grid;
  place-items: center;
  color: #f3f6ff;
}

.mini-icon-btn .sf-icon,
.mini-icon-btn .cool-icon {
  width: 20px;
  height: 20px;
}

.bottom-nav {
  position: fixed;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;
  width: min(100vw, var(--app-max-width));
  margin: 0 auto;
  height: calc(var(--safe-bottom) + 60px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  background: rgba(8, 11, 17, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding-bottom: var(--safe-bottom);
}

.nav-btn {
  display: grid;
  place-items: center;
  color: #9ca3b0;
}

.nav-btn .sf-icon,
.nav-btn .cool-icon {
  width: 23px;
  height: 23px;
}

.nav-btn.active {
  color: #f3f6ff;
}

.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(0.985);
}

.search-screen,
.player-screen,
.mini-player,
.queue-panel,
.home-search-btn,
.flow-main-btn,
.flow-tune-btn,
.flow-status,
.pill-btn,
.round-btn,
.small-icon-btn {
  will-change: transform, opacity;
}

.feed-item.enter,
.result-item.enter,
.queue-item-btn.enter {
  animation: itemIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--stagger, 0) * 40ms);
}

@keyframes itemIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes titleMarqueeLoop {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-1 * var(--marquee-distance, 0px)));
  }
}
