/* ==========================================================================
   iOS 18 Apple Music ("Nhạc") — Authentic Design System & Fluid Physics
   ========================================================================== */

[hidden] {
  display: none !important;
}

:root {
  --font-ios: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI Variable", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --spring-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --spring-bounce: cubic-bezier(0.34, 1.45, 0.64, 1);

  /* Apple Music Key Red-Pink */
  --am-accent: #fa2d48;
  --am-accent-soft: rgba(250, 45, 72, 0.16);
  --am-accent-hover: #ff415b;
}

/* iOS Dark Mode (Default) */
html[data-theme="dark"] {
  --ios-bg: #000000;
  --ios-bg-secondary: #1c1c1e;
  --ios-bg-tertiary: #2c2c2e;
  --ios-glass: rgba(24, 24, 26, 0.78);
  --ios-glass-strong: rgba(28, 28, 30, 0.9);
  --ios-mini-bg: rgba(38, 38, 42, 0.84);
  --ios-text: #ffffff;
  --ios-text-secondary: rgba(235, 235, 245, 0.6);
  --ios-text-tertiary: rgba(235, 235, 245, 0.36);
  --ios-separator: rgba(255, 255, 255, 0.11);
  --ios-pill-bg: #1c1c1e;
  --ios-pill-hover: #28282b;
  --ios-circle-bg: rgba(255, 255, 255, 0.11);
  --ios-row-active: rgba(255, 255, 255, 0.08);
  --ios-shadow: rgba(0, 0, 0, 0.6);
}

/* iOS Light Mode */
html[data-theme="light"] {
  --am-accent: #fa243c;
  --am-accent-soft: rgba(250, 36, 60, 0.12);
  --ios-bg: #ffffff;
  --ios-bg-secondary: #f2f2f7;
  --ios-bg-tertiary: #e5e5ea;
  --ios-glass: rgba(249, 249, 251, 0.82);
  --ios-glass-strong: rgba(245, 245, 248, 0.94);
  --ios-mini-bg: rgba(244, 244, 248, 0.9);
  --ios-text: #000000;
  --ios-text-secondary: rgba(60, 60, 67, 0.62);
  --ios-text-tertiary: rgba(60, 60, 67, 0.38);
  --ios-separator: rgba(60, 60, 67, 0.13);
  --ios-pill-bg: #f2f2f7;
  --ios-pill-hover: #e6e6ed;
  --ios-circle-bg: rgba(118, 118, 128, 0.14);
  --ios-row-active: rgba(0, 0, 0, 0.05);
  --ios-shadow: rgba(0, 0, 0, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-ios);
  background: #08090c;
  color: var(--ios-text);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

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

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

/* ==========================================================================
   Ambient Desktop Studio Backdrop & Floating Toolbar
   ========================================================================== */

.desktop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 25%, #1d252b 0%, #090a0d 65%, #050507 100%);
  pointer-events: none;
}

.backdrop-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.48;
  background-image: url("./cover.jpg");
  background-size: cover;
  background-position: center;
}

.orb-1 {
  width: 620px;
  height: 620px;
  top: -120px;
  left: calc(50% - 460px);
  animation: floatOrb 22s ease-in-out infinite alternate;
}

.orb-2 {
  width: 540px;
  height: 540px;
  bottom: -140px;
  right: calc(50% - 440px);
  animation: floatOrb 26s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(40px, -30px, 0) scale(1.12);
  }
}

.studio-toolbar {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 50;
  display: flex;
  gap: 8px;
  align-items: center;
}

.studio-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(24, 24, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12.5px;
  font-weight: 500;
  transition: transform 0.16s ease, background 0.2s ease;
}

.studio-pill:hover {
  background: rgba(42, 42, 48, 0.88);
}

.studio-pill:active {
  transform: scale(0.96);
}

/* ==========================================================================
   iOS Device Shell (iPhone 16 Pro Frame vs Fullscreen Mode)
   ========================================================================== */

.device-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ios-device {
  position: relative;
  width: 412px;
  height: min(868px, calc(100dvh - 32px));
  background: var(--ios-bg);
  color: var(--ios-text);
  border-radius: 52px;
  box-shadow:
    0 0 0 3px #3a3d42,
    0 0 0 7px #1a1b1e,
    0 0 0 8.5px rgba(255, 255, 255, 0.16),
    0 32px 90px rgba(0, 0, 0, 0.78);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color 0.28s ease, color 0.28s ease;
}

/* Titanium hardware side buttons */
.hw-btn {
  position: absolute;
  background: #2b2d31;
  border-radius: 3px;
  pointer-events: none;
}

/* Note: overflow:hidden on .ios-device clips outside children, so we keep frame clean */
.hw-btn {
  display: none;
}

/* Fullscreen Mode OR Narrow Native App Window / Mobile */
html[data-layout="fullscreen"] .device-stage {
  padding: 0;
}

html[data-layout="fullscreen"] .desktop-backdrop {
  display: none;
}

html[data-layout="fullscreen"] .ios-device {
  width: 100vw;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
}

html[data-layout="fullscreen"] .ios-statusbar,
html[data-layout="fullscreen"] .ios-home-indicator {
  display: none;
}

html[data-layout="fullscreen"] .ios-scroll-container,
html[data-layout="fullscreen"] .ios-navbar {
  max-width: 900px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

html[data-layout="fullscreen"] .mini-player {
  max-width: 876px;
  left: 50%;
  right: auto;
  width: calc(100% - 24px);
  transform: translateX(-50%);
}

html[data-layout="fullscreen"] .mini-player:active {
  transform: translateX(-50%) scale(0.988);
}

html[data-layout="fullscreen"] .ios-tabbar {
  justify-content: center;
  gap: 48px;
}

html[data-layout="fullscreen"] .np-stage,
html[data-layout="fullscreen"] .np-controls-dock,
html[data-layout="fullscreen"] .np-compact-header {
  max-width: 500px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 540px) {
  .device-stage {
    padding: 0;
  }
  .desktop-backdrop,
  .studio-toolbar,
  .ios-statusbar,
  .ios-home-indicator {
    display: none !important;
  }
  .ios-device {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ==========================================================================
   iOS Status Bar & Live Dynamic Island
   ========================================================================== */

.ios-statusbar {
  position: relative;
  z-index: 25;
  height: 48px;
  padding: 10px 26px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: transparent;
}

.status-time {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.02em;
  width: 62px;
  font-variant-numeric: tabular-nums;
}

.status-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 68px;
}

.dynamic-island {
  height: 31px;
  min-width: 112px;
  padding: 0 10px;
  border-radius: 999px;
  background: #000000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: min-width 0.42s var(--spring-bounce), transform 0.2s ease;
}

.dynamic-island:active {
  transform: scale(0.95);
}

.di-cover {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s ease, transform 0.35s var(--spring-bounce);
}

.di-camera {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1d2d4e 0%, #090b10 65%);
}

.di-waves {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 13px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.di-waves span {
  width: 2.2px;
  height: 4px;
  border-radius: 2px;
  background: var(--am-accent);
}

.dynamic-island.playing {
  min-width: 148px;
}

.dynamic-island.playing .di-cover {
  opacity: 1;
  transform: scale(1);
}

.dynamic-island.playing .di-waves {
  opacity: 1;
}

.dynamic-island.playing .di-waves span:nth-child(1) {
  animation: eqBounce 0.72s ease-in-out infinite alternate;
}
.dynamic-island.playing .di-waves span:nth-child(2) {
  animation: eqBounce 0.52s ease-in-out 0.15s infinite alternate;
}
.dynamic-island.playing .di-waves span:nth-child(3) {
  animation: eqBounce 0.65s ease-in-out 0.28s infinite alternate;
}
.dynamic-island.playing .di-waves span:nth-child(4) {
  animation: eqBounce 0.48s ease-in-out 0.08s infinite alternate;
}

/* ==========================================================================
   iOS Sticky Translucent Navigation Bar
   ========================================================================== */

.ios-navbar {
  position: relative;
  z-index: 20;
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.22s ease, border-color 0.22s ease;
}

.ios-navbar.scrolled {
  background: var(--ios-glass);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border-bottom-color: var(--ios-separator);
}

.nav-center-title {
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.015em;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.ios-navbar.scrolled .nav-center-title {
  opacity: 1;
  transform: translateY(0);
}

.nav-right-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-circle-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ios-circle-bg);
  color: var(--am-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.14s ease, background-color 0.18s ease;
}

.nav-circle-btn:active {
  transform: scale(0.9);
}

/* ==========================================================================
   Scroll Container & Tab Views
   ========================================================================== */

.ios-scroll-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 146px; /* clearance for Floating Mini-Player + Tab Bar */
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.ios-scroll-container::-webkit-scrollbar {
  display: none;
}

.tab-view {
  display: none;
  animation: tabFadeIn 0.22s ease;
}

.tab-view.active {
  display: block;
}

@keyframes tabFadeIn {
  from {
    opacity: 0.4;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   TAB 1: Album Hero & Tracklist (Authentic Apple Music Album Screen)
   ========================================================================== */

.album-hero {
  padding: 6px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.album-cover-wrap {
  position: relative;
  width: 218px;
  height: 218px;
  margin-bottom: 18px;
  cursor: pointer;
  transition: transform 0.3s var(--spring-ios);
}

.album-cover-wrap:active {
  transform: scale(0.96);
}

.album-cover-shadow {
  position: absolute;
  inset: 14px 8px -10px;
  width: calc(100% - 16px);
  height: calc(100% - 4px);
  object-fit: cover;
  filter: blur(24px) saturate(160%);
  opacity: 0.58;
  z-index: 0;
  pointer-events: none;
}

.album-cover-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px;
  box-shadow: 0 12px 32px var(--ios-shadow), 0 0 0 0.5px rgba(255, 255, 255, 0.14);
}

.album-title {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
}

.album-artist-btn {
  margin-top: 3px;
  font-size: 19px;
  font-weight: 500;
  color: var(--am-accent);
  letter-spacing: -0.015em;
}

.album-artist-btn:active {
  opacity: 0.65;
}

.album-meta-row {
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ios-text-secondary);
  text-transform: uppercase;
}

.lossless-pill-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--ios-circle-bg);
  color: var(--ios-text-secondary);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
}

.lossless-pill-inline:active {
  opacity: 0.7;
}

.album-actions {
  margin-top: 16px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ios-action-btn {
  height: 46px;
  border-radius: 11px;
  background: var(--ios-pill-bg);
  color: var(--am-accent);
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s ease, background-color 0.18s ease;
}

.ios-action-btn:hover {
  background: var(--ios-pill-hover);
}

.ios-action-btn:active {
  transform: scale(0.965);
}

/* ==========================================================================
   Track Rows (UITableView Hairline Inset Style)
   ========================================================================== */

.track-list {
  border-top: 0.5px solid var(--ios-separator);
}

.track-row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 8px 14px 8px 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.track-row::after {
  content: "";
  position: absolute;
  left: 48px;
  right: 0;
  bottom: 0;
  height: 0.5px;
  background: var(--ios-separator);
}

.track-row:hover {
  background: var(--ios-row-active);
}

.track-row:active {
  background: var(--ios-circle-bg);
}

.track-leading {
  width: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.track-fav-dot {
  position: absolute;
  left: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--am-accent);
}

.track-num {
  font-size: 14.5px;
  color: var(--ios-text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Animated 4-bar Apple Music Now Playing Indicator */
.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.eq-bars span {
  width: 2.5px;
  height: 4px;
  border-radius: 1.5px;
  background: var(--am-accent);
  transition: height 0.2s ease;
}

.track-row.playing .eq-bars span:nth-child(1) {
  animation: eqBounce 0.62s ease-in-out infinite alternate;
}
.track-row.playing .eq-bars span:nth-child(2) {
  animation: eqBounce 0.45s ease-in-out 0.14s infinite alternate;
}
.track-row.playing .eq-bars span:nth-child(3) {
  animation: eqBounce 0.72s ease-in-out 0.25s infinite alternate;
}
.track-row.playing .eq-bars span:nth-child(4) {
  animation: eqBounce 0.52s ease-in-out 0.08s infinite alternate;
}

.track-row.paused-active .eq-bars span:nth-child(1) { height: 5px; }
.track-row.paused-active .eq-bars span:nth-child(2) { height: 10px; }
.track-row.paused-active .eq-bars span:nth-child(3) { height: 7px; }
.track-row.paused-active .eq-bars span:nth-child(4) { height: 4px; }

@keyframes eqBounce {
  0% {
    height: 3px;
  }
  100% {
    height: 14px;
  }
}

.track-main {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
}

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

.track-title {
  font-size: 15.5px;
  font-weight: 450;
  letter-spacing: -0.012em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-row.playing .track-title,
.track-row.paused-active .track-title {
  color: var(--am-accent);
  font-weight: 600;
}

.explicit-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 3.5px;
  background: var(--ios-text-tertiary);
  color: var(--ios-bg);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1;
}

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

.track-lyric-match {
  margin-top: 3px;
  font-size: 12px;
  color: var(--am-accent);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-trailing {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.track-duration {
  font-size: 13px;
  color: var(--ios-text-secondary);
  font-variant-numeric: tabular-nums;
}

.track-more-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--ios-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.track-more-btn:hover {
  background: var(--ios-circle-bg);
  color: var(--ios-text);
}

.album-footer {
  padding: 20px 20px 16px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ios-text-secondary);
}

.album-footer p {
  margin: 0;
}

/* ==========================================================================
   TAB 2, 3, 4: Explore, Favorites, Search
   ========================================================================== */

.large-title-header {
  padding: 6px 20px 14px;
}

.ios-large-title {
  margin: 0;
  font-size: 32px;
  font-weight: 750;
  letter-spacing: -0.028em;
}

.ios-subtitle {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--ios-text-secondary);
}

.explore-section {
  margin-bottom: 24px;
}

.section-heading {
  padding: 0 20px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.section-badge {
  font-size: 12.5px;
  color: var(--ios-text-secondary);
}

.text-btn {
  font-size: 14px;
  font-weight: 500;
  color: var(--am-accent);
}

.collab-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 20px 8px;
  scrollbar-width: none;
}

.collab-carousel::-webkit-scrollbar {
  display: none;
}

.collab-card {
  flex: 0 0 156px;
  padding: 12px;
  border-radius: 14px;
  background: var(--ios-bg-secondary);
  border: 0.5px solid var(--ios-separator);
  cursor: pointer;
  transition: transform 0.16s ease;
}

.collab-card:active {
  transform: scale(0.96);
}

.collab-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.collab-card-top img {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  object-fit: cover;
}

.collab-play-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--am-accent-soft);
  color: var(--am-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.collab-guest {
  display: block;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--am-accent);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collab-song {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.credits-chip-grid {
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.credit-chip {
  padding: 8px 12px;
  border-radius: 11px;
  background: var(--ios-bg-secondary);
  border: 0.5px solid var(--ios-separator);
  text-align: left;
  transition: transform 0.14s ease, border-color 0.18s ease;
}

.credit-chip.active {
  border-color: var(--am-accent);
  background: var(--am-accent-soft);
}

.credit-chip:active {
  transform: scale(0.96);
}

.credit-chip-role {
  display: block;
  font-size: 10.5px;
  color: var(--ios-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.credit-chip-name {
  font-size: 13.5px;
  font-weight: 600;
}

.credit-chip-count {
  font-size: 11.5px;
  color: var(--am-accent);
  margin-left: 4px;
}

.filtered-credit-box {
  margin: 14px 16px 0;
  border-radius: 14px;
  background: var(--ios-bg-secondary);
  overflow: hidden;
}

.filtered-credit-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--ios-separator);
}

.filtered-role {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--am-accent);
  font-weight: 650;
}

.filtered-credit-header h3 {
  margin: 2px 0 0;
  font-size: 16px;
}

.fav-actions {
  padding: 0 20px 16px;
  margin-top: 0;
}

.empty-state {
  padding: 48px 32px;
  text-align: center;
  color: var(--ios-text-secondary);
}

.empty-icon {
  font-size: 42px;
  color: var(--am-accent);
  margin-bottom: 10px;
}

.empty-state h3 {
  margin: 0 0 8px;
  color: var(--ios-text);
  font-size: 18px;
}

.empty-state p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

/* Search Bar */
.ios-search-bar-wrap {
  padding: 0 20px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ios-search-field {
  flex: 1;
  height: 38px;
  padding: 0 11px;
  border-radius: 10px;
  background: var(--ios-bg-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-icon {
  color: var(--ios-text-secondary);
  flex-shrink: 0;
}

.ios-search-field input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 15.5px;
  min-width: 0;
}

.ios-search-field input::placeholder {
  color: var(--ios-text-secondary);
}

.search-clear-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ios-text-tertiary);
  color: var(--ios-bg);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-cancel-btn {
  color: var(--am-accent);
  font-size: 15.5px;
  font-weight: 500;
  white-space: nowrap;
}

.search-filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 14px;
  scrollbar-width: none;
}

.search-filter-chips::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--ios-bg-secondary);
  font-size: 13px;
  font-weight: 550;
  color: var(--ios-text-secondary);
  transition: all 0.16s ease;
}

.filter-chip.active {
  background: var(--am-accent);
  color: #ffffff;
}

/* ==========================================================================
   Floating Frosted Glass Mini-Player & Bottom Tab Bar (iOS 18)
   ========================================================================== */

.mini-player {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 66px;
  height: 56px;
  z-index: 30;
  border-radius: 14px;
  background: var(--ios-mini-bg);
  backdrop-filter: blur(36px) saturate(200%);
  -webkit-backdrop-filter: blur(36px) saturate(200%);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.34), 0 0 0 0.5px var(--ios-separator);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 8px;
  overflow: hidden;
  transition: transform 0.2s var(--spring-ios);
}

.mini-player:active {
  transform: scale(0.985);
}

.mini-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: transparent;
}

.mini-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--am-accent);
  transition: width 0.15s linear;
}

.mini-player-tap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  height: 100%;
}

.mini-cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

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

.mini-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mini-title {
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-artist {
  display: block;
  font-size: 12px;
  color: var(--ios-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.mini-ctrl-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ios-text);
  transition: transform 0.14s ease, background-color 0.16s ease;
}

.mini-ctrl-btn:active {
  transform: scale(0.86);
  background: var(--ios-circle-bg);
}

/* Bottom Tab Bar */
.ios-tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  padding-bottom: 8px;
  z-index: 30;
  background: var(--ios-glass-strong);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border-top: 0.5px solid var(--ios-separator);
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 12px;
  color: var(--ios-text-secondary);
  font-size: 10px;
  font-weight: 550;
  transition: color 0.16s ease, transform 0.14s ease;
}

.tab-item.active {
  color: var(--am-accent);
}

.tab-item:active {
  transform: scale(0.92);
}

.ios-home-indicator {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 128px;
  height: 4.5px;
  border-radius: 999px;
  background: var(--ios-text);
  opacity: 0.26;
  z-index: 95;
  pointer-events: none;
}

/* ==========================================================================
   FULL-SCREEN NOW PLAYING SHEET (iOS 18 Liquid Artwork Mesh)
   ========================================================================== */

.now-playing-sheet {
  position: absolute;
  inset: 0;
  z-index: 60;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  padding: 8px 24px 20px;
  transform: translateY(103%);
  transition: transform 0.48s var(--spring-ios);
  overflow: hidden;
  border-radius: inherit;
}

.now-playing-sheet.open {
  transform: translateY(0%);
}

/* Animated Living Mesh Artwork Backdrop */
.np-mesh-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #101518;
  overflow: hidden;
}

.np-mesh-img {
  position: absolute;
  width: 170%;
  height: 170%;
  object-fit: cover;
  filter: blur(64px) saturate(195%) contrast(112%);
  opacity: 0.78;
}

.mesh-a {
  top: -35%;
  left: -35%;
  animation: meshRotateA 28s linear infinite;
}

.mesh-b {
  bottom: -35%;
  right: -35%;
  opacity: 0.6;
  animation: meshRotateB 34s linear infinite;
}

@keyframes meshRotateA {
  0% { transform: rotate(0deg) scale(1.1); }
  50% { transform: rotate(180deg) scale(1.24); }
  100% { transform: rotate(360deg) scale(1.1); }
}

@keyframes meshRotateB {
  0% { transform: rotate(360deg) scale(1.15); }
  50% { transform: rotate(180deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1.15); }
}

.np-mesh-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 13, 16, 0.38) 0%,
    rgba(12, 14, 18, 0.52) 55%,
    rgba(8, 9, 12, 0.78) 100%
  );
}

/* Top Grabber */
.np-grabber-zone {
  padding: 8px 0 10px;
  display: flex;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.np-grabber {
  width: 38px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: background-color 0.18s ease, width 0.18s ease;
}

.np-grabber-zone:hover .np-grabber {
  background: rgba(255, 255, 255, 0.62);
  width: 44px;
}

/* Compact Header for Lyrics & Queue Modes */
.np-compact-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 0 12px;
  flex-shrink: 0;
}

.np-compact-art-btn {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
  transition: transform 0.16s ease;
}

.np-compact-art-btn:active {
  transform: scale(0.93);
}

.np-compact-art-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.np-compact-meta {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.np-compact-title-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.np-compact-title {
  font-size: 15.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-compact-artist {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Middle Stage */
.np-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.np-panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.np-panel.active {
  display: flex;
  animation: panelFade 0.26s var(--spring-ios);
}

@keyframes panelFade {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Artwork Mode + Signature Apple Music Scale Physics */
.np-artwork-panel {
  justify-content: space-between;
}

.np-artwork-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0 14px;
}

.np-artwork-frame img {
  width: min(100%, 334px);
  max-height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.62), 0 0 0 0.5px rgba(255, 255, 255, 0.16);
  transform: scale(1);
  transition: transform 0.52s var(--spring-bounce), box-shadow 0.52s ease;
}

.np-artwork-frame.paused img {
  transform: scale(0.81);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38), 0 0 0 0.5px rgba(255, 255, 255, 0.12);
}

.np-track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 6px;
  flex-shrink: 0;
}

.np-track-titles {
  flex: 1;
  min-width: 0;
}

.np-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.marquee-wrap {
  overflow: hidden;
  min-width: 0;
}

.np-title {
  margin: 0;
  font-size: 20.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-e {
  background: rgba(255, 255, 255, 0.34);
  color: #111;
}

.np-artist {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 450;
  color: rgba(255, 255, 255, 0.68);
  text-align: left;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.np-artist:hover {
  color: rgba(255, 255, 255, 0.92);
}

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

.np-circle-btn {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s var(--spring-bounce), background-color 0.18s ease, color 0.18s ease;
}

.np-circle-btn:active {
  transform: scale(0.84);
}

.np-circle-btn.favorited {
  color: #ff375f;
  background: rgba(255, 55, 95, 0.24);
}

/* ==========================================================================
   MODE 2: Apple Music Live Lyrics View
   ========================================================================== */

.lyrics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.lyrics-badge-label {
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
}

.lyrics-autoscroll-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11.5px;
  font-weight: 600;
}

.lyrics-autoscroll-pill.active {
  background: rgba(255, 255, 255, 0.88);
  color: #111111;
}

.lyrics-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 18px 2px 64px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 88%, transparent 100%);
  scrollbar-width: none;
}

.lyrics-scroll::-webkit-scrollbar {
  display: none;
}

.lyric-line {
  margin: 0 0 18px;
  font-size: 23px;
  font-weight: 750;
  line-height: 1.32;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.36);
  filter: blur(0.45px);
  transform-origin: left center;
  transition: color 0.35s ease, transform 0.35s var(--spring-ios), filter 0.35s ease;
  cursor: pointer;
}

.lyric-line:hover {
  color: rgba(255, 255, 255, 0.72);
  filter: none;
}

.lyric-line.active {
  color: #ffffff;
  filter: none;
  transform: scale(1.02);
  text-shadow: 0 4px 22px rgba(255, 255, 255, 0.24);
}

.lyric-line.near {
  color: rgba(255, 255, 255, 0.62);
  filter: none;
}

.lyric-spacer {
  height: 14px;
}

.lyrics-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  padding: 24px;
}

.lyrics-empty strong {
  font-size: 17px;
  color: #ffffff;
  margin-bottom: 6px;
}

.lyrics-empty p {
  font-size: 13.5px;
  margin: 0;
  line-height: 1.45;
}

/* ==========================================================================
   MODE 3: Playing Next / Queue View
   ========================================================================== */

.queue-mode-pills {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding-bottom: 12px;
  flex-shrink: 0;
}

.queue-pill {
  position: relative;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.14s ease;
}

.queue-pill:active {
  transform: scale(0.95);
}

.queue-pill.active {
  background: rgba(255, 255, 255, 0.9);
  color: #111111;
}

.infinity-glyph {
  font-size: 20px;
  line-height: 1;
}

.repeat-one-badge {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.18);
}

.queue-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 8px;
  flex-shrink: 0;
}

.queue-list-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.queue-list-header span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.58);
}

.queue-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 12px;
}

.queue-scroll::-webkit-scrollbar {
  display: none;
}

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

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

.queue-item img {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

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

.queue-item-title {
  font-size: 14.5px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.58);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-remove-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

/* ==========================================================================
   Lower Dock: Elastic Scrubber, Transport, Volume & Utility Icons
   ========================================================================== */

.np-controls-dock {
  flex-shrink: 0;
  padding-top: 8px;
}

/* iOS 18 Elastic Knobless Slider */
.elastic-slider {
  padding: 10px 0;
  cursor: pointer;
  touch-action: none;
}

.elastic-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
  transition: height 0.22s var(--spring-bounce), background-color 0.2s ease;
}

.elastic-slider:hover .elastic-track,
.elastic-slider.dragging .elastic-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.3);
}

.elastic-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  transition: background-color 0.2s ease;
}

.elastic-slider:hover .elastic-fill,
.elastic-slider.dragging .elastic-fill {
  background: #ffffff;
}

.np-time-row {
  margin-top: -2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.np-time {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.56);
  font-variant-numeric: tabular-nums;
  min-width: 40px;
}

#time-remaining {
  text-align: right;
}

.np-lossless-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: background-color 0.18s ease, transform 0.14s ease;
}

.np-lossless-badge:hover {
  background: rgba(255, 255, 255, 0.24);
}

.np-lossless-badge:active {
  transform: scale(0.95);
}

/* Primary Transport */
.np-transport {
  padding: 14px 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.transport-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s var(--spring-bounce), background-color 0.18s ease;
}

.transport-btn:active {
  transform: scale(0.84);
  background: rgba(255, 255, 255, 0.16);
}

.play-pause-big {
  width: 68px;
  height: 68px;
}

/* Volume Bar */
.np-volume-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 0 10px;
}

.volume-slider {
  flex: 1;
}

.vol-icon-btn {
  color: rgba(255, 255, 255, 0.58);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.16s ease, transform 0.14s ease;
}

.vol-icon-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

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

/* Bottom 3 Utility Buttons */
.np-utility-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 2px;
}

.utility-toggle-btn {
  width: 44px;
  height: 36px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.65);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.utility-toggle-btn:hover {
  color: #ffffff;
}

.utility-toggle-btn.active {
  background: rgba(255, 255, 255, 0.88);
  color: #121316;
}

/* ==========================================================================
   iOS Bottom Sheets (Context Menu, Credits, Audio & EQ, Toast)
   ========================================================================== */

.ios-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 75;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeBackdrop 0.2s ease;
}

@keyframes fadeBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ios-bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  max-height: 82%;
  padding: 8px 16px 26px;
  border-radius: 24px 24px 0 0;
  background: var(--ios-bg-secondary);
  color: var(--ios-text);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: sheetSlideUp 0.32s var(--spring-ios);
}

.ios-bottom-sheet.tall {
  max-height: 86%;
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0%); }
}

.sheet-grabber {
  width: 36px;
  height: 4.5px;
  border-radius: 999px;
  background: var(--ios-text-tertiary);
  margin: 2px auto 12px;
  flex-shrink: 0;
}

.sheet-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 12px;
  border-bottom: 0.5px solid var(--ios-separator);
  flex-shrink: 0;
}

.sheet-nav-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.sheet-done-btn {
  font-size: 16px;
  font-weight: 650;
  color: var(--am-accent);
}

.sheet-track-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 14px;
  border-bottom: 0.5px solid var(--ios-separator);
  margin-bottom: 12px;
}

.sheet-track-preview img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
}

.sheet-track-info {
  min-width: 0;
  flex: 1;
}

.sheet-track-info h4 {
  margin: 0;
  font-size: 15.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-track-info p {
  margin: 2px 0 4px;
  font-size: 13px;
  color: var(--ios-text-secondary);
}

.sheet-track-quality {
  font-size: 11px;
  font-weight: 600;
  color: var(--am-accent);
}

.sheet-menu-group {
  border-radius: 13px;
  background: var(--ios-bg-tertiary);
  overflow: hidden;
  margin-bottom: 10px;
}

.sheet-menu-item {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15.5px;
  border-bottom: 0.5px solid var(--ios-separator);
  transition: background-color 0.14s ease;
}

.sheet-menu-item:last-child {
  border-bottom: none;
}

.sheet-menu-item:active {
  background: var(--ios-circle-bg);
}

.sheet-icon {
  font-size: 16px;
  color: var(--ios-text-secondary);
}

/* Credits Sheet Body */
.credits-sheet-body {
  overflow-y: auto;
  padding: 12px 4px 8px;
  scrollbar-width: none;
}

.credits-sheet-body::-webkit-scrollbar {
  display: none;
}

.credit-group-card {
  border-radius: 13px;
  background: var(--ios-bg-tertiary);
  padding: 12px 15px;
  margin-bottom: 10px;
}

.credit-group-title {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ios-text-secondary);
}

.credit-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 0.5px solid var(--ios-separator);
  font-size: 14px;
}

.credit-row:last-child {
  border-bottom: none;
}

.credit-row-name {
  font-weight: 600;
}

.credit-row-role {
  font-size: 12.5px;
  color: var(--ios-text-secondary);
  text-align: right;
}

/* EQ & Audio Sheet */
.eq-sheet-body {
  overflow-y: auto;
  padding-top: 12px;
  scrollbar-width: none;
}

.audio-quality-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 13px;
  background: var(--ios-bg-tertiary);
  margin-bottom: 10px;
}

.aq-wave-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--am-accent-soft);
  color: var(--am-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.audio-quality-banner strong {
  display: block;
  font-size: 13.5px;
}

.audio-quality-banner p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--ios-text-secondary);
}

.eq-spectrum-canvas {
  width: 100%;
  height: 54px;
  border-radius: 11px;
  background: var(--ios-bg-tertiary);
  margin-bottom: 10px;
  display: block;
}

.ios-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--ios-bg-tertiary);
  margin-bottom: 12px;
}

.ios-toggle-row strong {
  font-size: 14px;
  display: block;
}

.ios-toggle-row p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--ios-text-secondary);
}

.ios-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.36);
  transition: background-color 0.22s ease;
  cursor: pointer;
}

.ios-switch-slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s var(--spring-ios);
}

.ios-switch input:checked + .ios-switch-slider {
  background: #34c759;
}

.ios-switch input:checked + .ios-switch-slider::before {
  transform: translateX(20px);
}

.eq-presets-label {
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ios-text-secondary);
  margin: 4px 4px 8px;
}

.eq-presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.eq-preset-btn {
  height: 38px;
  border-radius: 10px;
  background: var(--ios-bg-tertiary);
  font-size: 13.5px;
  font-weight: 550;
  transition: all 0.16s ease;
}

.eq-preset-btn.active {
  background: var(--am-accent);
  color: #ffffff;
}

/* LAN & Shortcuts Cards */
.lan-card,
.shortcuts-card {
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--ios-bg-tertiary);
  margin-bottom: 10px;
}

.lan-card strong,
.shortcuts-card strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 4px;
}

.lan-card p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--ios-text-secondary);
}

.qr-box {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.qr-box img {
  padding: 8px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.lan-url-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--ios-bg);
}

.lan-url-box code {
  font-size: 12px;
  color: var(--am-accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lan-sub-note {
  margin: 8px 0 0 !important;
  font-size: 11px !important;
  opacity: 0.78;
}

.copy-lan-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 7px;
  background: var(--am-accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 12px;
  color: var(--ios-text-secondary);
  margin-top: 8px;
}

kbd {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--ios-bg);
  color: var(--ios-text);
  font-size: 11px;
  font-family: inherit;
  border: 0.5px solid var(--ios-separator);
}

/* iOS Toast Pill */
.ios-toast {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(34, 34, 38, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 0 0.5px rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  animation: toastPop 0.28s var(--spring-bounce);
  pointer-events: none;
}

.toast-icon {
  color: var(--am-accent);
}

@keyframes toastPop {
  from {
    opacity: 0;
    transform: translate(-50%, -12px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

/* Responsive compact tuning for shorter laptop screens (e.g. 720p / 125% DPI) */
@media (max-height: 780px) {
  .now-playing-sheet {
    padding: 4px 20px 14px;
  }
  .np-artwork-frame {
    padding: 2px 0 8px;
  }
  .np-artwork-frame img {
    width: min(100%, 260px);
  }
  .np-transport {
    padding: 6px 12px;
  }
  .play-pause-big {
    width: 58px;
    height: 58px;
  }
  .np-volume-row {
    padding: 0 0 4px;
  }
}
