/* =========================================================
   LASTMUSIC — ULTRA PREMIUM GLASSMORPHISM & MATERIAL YOU (2026)
   MOBILE FIRST / HARDWARE ACCELERATED / SYSTEMATIC LABELS
   ========================================================= */

:root {
  /* --- BASE PALETTE & BACKGROUNDS --- */
  --bg: #030611;
  --bg-2: #070c1a;
  --bg-elevated: #0c1426;

  /* --- SURFACE SURFACES (GLASS) --- */
  --surface: rgba(18, 26, 46, 0.68);
  --surface-strong: rgba(20, 30, 54, 0.88);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --surface-highlight: rgba(255, 255, 255, 0.08);

  /* --- TYPOGRAPHY COLORS --- */
  --text: #f8faff;
  --text-soft: #a8b6d4;
  --text-dim: #6d7b98;
  --text-muted: #4e5a74;

  /* --- BRAND & ACCENT COLORS --- */
  --blue: #5d8cff;
  --blue-2: #7aa5ff;
  --cyan: #38e1ff;
  --purple: #9b72ff;
  --pink: #ff6eb9;
  --gold: #f2cb74;
  --danger: #ff5271;
  --success: #3ef07a;

  /* --- RGB VALUES FOR OPACITY MIXING --- */
  --accent-rgb: 93, 140, 255;
  --purple-rgb: 155, 114, 255;
  --pink-rgb: 255, 110, 185;
  --cyan-rgb: 56, 225, 255;

  /* --- GRADIENTS --- */
  --gradient-blue: linear-gradient(135deg, #7db3ff 0%, #4f80ff 52%, #8e7aff 100%);
  --gradient-primary: linear-gradient(135deg, #6090ff 0%, #406bee 50%, #7655fa 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 100%);
  --gradient-card-elevated: linear-gradient(145deg, rgba(26, 36, 62, 0.85) 0%, rgba(13, 19, 34, 0.92) 100%);

  /* --- BORDERS & LINES --- */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --glass-border: 1px solid rgba(255, 255, 255, 0.095);
  --glass-border-focus: 1px solid rgba(122, 165, 255, 0.38);

  /* --- SHADOWS & GLOWS --- */
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow-blue: 0 0 28px rgba(93, 140, 255, 0.35);

  /* --- RADIUS --- */
  --radius-full: 9999px;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 13px;

  /* --- LAYOUT & SAFE AREAS --- */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --nav-height: 64px;

  /* --- MOTION --- */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snappy: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-short: 180ms;
  --duration-medium: 300ms;
}


/* =========================================================
   RESET & SYSTEM DEFAULTS
   ========================================================= */

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% -8%, rgba(93, 140, 255, 0.16), transparent 42%),
    radial-gradient(circle at 100% 40%, rgba(155, 114, 255, 0.08), transparent 45%),
    linear-gradient(180deg, #030611 0%, #060b17 50%, #020409 100%);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
}

button {
  background: transparent;
  border: 0;
  cursor: pointer;
  user-select: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
}

/* Card Button Defaults */
button.track-info,
button.album-card,
button.artist-card,
button.artist-list-item,
button.horizontal-track {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
}


/* =========================================================
   BACKGROUND GLOWS & AMBIENT AURORA
   ========================================================= */

.app-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -5;
}

.aurora {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.14;
  will-change: transform;
}

.aurora-1 {
  background: #315eff;
  top: -190px;
  left: -150px;
}

.aurora-2 {
  background: #963bff;
  top: 35%;
  right: -210px;
}

.aurora-3 {
  background: #00d0ff;
  bottom: -220px;
  left: 10%;
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}


/* =========================================================
   APP CONTAINER SCALING
   ========================================================= */

.app {
  width: min(100%, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  padding: calc(20px + var(--safe-top)) 18px calc(125px + var(--safe-bottom));
  isolation: isolate;
}


/* =========================================================
   GLASS UTILITY & MODERN FROSTING
   ========================================================= */

.glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: var(--glass-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow-md);
  backdrop-filter: blur(28px) saturate(155%);
  -webkit-backdrop-filter: blur(28px) saturate(155%);
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3.5px;
  border-radius: 14px;
  background: linear-gradient(135deg, #78a4ff, #435fe8);
  box-shadow: 0 10px 24px rgba(67, 102, 255, 0.36), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  transform: rotate(-3deg);
  transition: transform var(--duration-short) var(--ease);
}

.brand-mark:active {
  transform: rotate(0deg) scale(0.95);
}

.brand-wave {
  width: 3px;
  border-radius: var(--radius-full);
  background: #ffffff;
}

.brand-wave:nth-child(1) { height: 12px; }
.brand-wave:nth-child(2) { height: 22px; }
.brand-wave:nth-child(3) { height: 15px; }

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
}

.brand-subtitle {
  margin-top: 1px;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  font-weight: 700;
  text-transform: uppercase;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
  transition: transform var(--duration-short) var(--ease), background var(--duration-short) ease, border-color var(--duration-short) ease;
}

.icon-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.09);
}

.icon {
  font-size: 18px;
  color: var(--text-soft);
  opacity: 0.9;
}


/* =========================================================
   HERO CARD
   ========================================================= */

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 285px;
  border-radius: var(--radius-xl);
  padding: 30px 28px;
  background: linear-gradient(135deg, rgba(29, 44, 82, 0.9) 0%, rgba(9, 15, 27, 0.98) 65%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-card::before {
  content: "";
  position: absolute;
  width: 290px;
  height: 290px;
  top: -120px;
  right: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 140, 255, 0.38), transparent 70%);
  filter: blur(25px);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  bottom: -110px;
  left: -70px;
  background: #6a4bff;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 290px;
}

.eyebrow,
.section-kicker {
  display: block;
  color: #8da4db;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 12px 0 10px;
  font-size: clamp(30px, 8vw, 45px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.hero-card h1 span {
  background: linear-gradient(110deg, #e3eeff 0%, #82abff 50%, #bcaaff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  margin: 0;
  color: #abb6d0;
  font-size: 11.5px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.primary-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 15px;
  color: #ffffff;
  background: var(--gradient-blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 24px rgba(66, 119, 255, 0.32);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform var(--duration-short) var(--ease), filter var(--duration-short) ease, box-shadow var(--duration-short) ease;
}

.secondary-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 15px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #dbe3f5;
  transition: transform var(--duration-short) var(--ease), background var(--duration-short) ease;
}

.primary-btn:active,
.secondary-btn:active {
  transform: scale(0.96);
}

.primary-btn span {
  font-size: 19px;
  line-height: 1;
}

.primary-btn.full {
  width: 100%;
  margin-top: 10px;
}

.hero-disc {
  position: absolute;
  top: 50%;
  right: -55px;
  width: 195px;
  height: 195px;
  border: 1px solid rgba(214, 228, 255, 0.18);
  border-radius: 50%;
  background:
    repeating-radial-gradient(
      circle,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 2px,
      transparent 7px
    ),
    linear-gradient(145deg, #2b3c60, #10182b 62%, #29375c);
  box-shadow:
    inset 0 0 0 10px rgba(0, 0, 0, 0.18),
    inset 0 0 0 28px rgba(255, 255, 255, 0.03),
    0 0 50px rgba(82, 123, 255, 0.2);
  transform: translateY(-40%);
  opacity: 0.88;
  animation: slowSpin 24s linear infinite;
}

.hero-disc::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(196, 218, 255, 0.14);
  border-radius: 50%;
  content: "";
}

.hero-disc-inner {
  position: absolute;
  inset: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(204, 220, 255, 0.2);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #5574b0, #263453 50%, #111a2c);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.3);
}

.hero-disc-hole {
  width: 20px;
  height: 20px;
  border: 5px solid #1a2641;
  border-radius: 50%;
  background: #080d18;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

@keyframes slowSpin {
  to { transform: translateY(-40%) rotate(360deg); }
}


/* =========================================================
   QUICK GRID SHORTCUTS
   ========================================================= */

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.quick-card {
  display: flex;
  min-width: 0;
  min-height: 88px;
  align-items: center;
  gap: 12px;
  padding: 14px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  text-align: left;
  background: var(--gradient-card-elevated);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--duration-short) var(--ease), border-color var(--duration-short) ease, background var(--duration-short) ease;
}

.quick-card:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.quick-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  font-size: 22px;
}

.quick-icon.purple {
  background: rgba(var(--purple-rgb), 0.14);
  color: #bca6ff;
}

.quick-icon.pink {
  background: rgba(var(--pink-rgb), 0.13);
  color: #ff85cb;
}

.quick-icon.blue {
  background: rgba(var(--accent-rgb), 0.14);
  color: #8db0ff;
}

.quick-icon.cyan {
  background: rgba(var(--cyan-rgb), 0.13);
  color: #55d8ff;
}

.quick-card strong {
  display: block;
  color: #f1f4ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.quick-card span {
  display: block;
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 500;
}


/* =========================================================
   SECTIONS & SECTION HEADERS
   ========================================================= */

.content-section {
  margin-top: 32px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.text-btn {
  background: transparent;
  color: #92b0ff;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 0 4px 10px;
  transition: opacity var(--duration-short) ease, transform var(--duration-short) ease;
}

.text-btn:active {
  opacity: 0.65;
  transform: translateX(2px);
}


/* =========================================================
   HORIZONTAL LISTS & ROW CONTAINERS
   ========================================================= */

.horizontal-list,
.album-row,
.search-tabs,
.library-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.horizontal-list::-webkit-scrollbar,
.album-row::-webkit-scrollbar,
.search-tabs::-webkit-scrollbar,
.library-tabs::-webkit-scrollbar {
  display: none;
}

.horizontal-list,
.album-row {
  padding: 4px 2px 14px;
  scroll-snap-type: x mandatory;
}

.horizontal-track {
  min-width: 148px;
  max-width: 148px;
  flex: 0 0 148px;
  padding: 9px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--gradient-card);
  border: 1px solid var(--line);
  scroll-snap-align: start;
  transition: transform var(--duration-short) var(--ease), border-color var(--duration-short) ease, background var(--duration-short) ease;
}

.horizontal-track:active {
  transform: scale(0.96);
  border-color: rgba(113, 151, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.horizontal-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.horizontal-title {
  margin: 10px 2px 0;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.horizontal-artist {
  margin: 4px 2px 2px;
  font-size: 9.5px;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* =========================================================
   ALBUMS
   ========================================================= */

.album-card {
  min-width: 138px;
  max-width: 138px;
  flex: 0 0 138px;
  padding: 9px;
  overflow: hidden;
  border-radius: 20px;
  text-align: left;
  background: var(--gradient-card);
  border: 1px solid var(--line);
  scroll-snap-align: start;
  transition: transform var(--duration-short) var(--ease), border-color var(--duration-short) ease;
}

.album-card:active {
  transform: scale(0.96);
  border-color: rgba(113, 151, 255, 0.35);
}

.album-art {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.album-name {
  margin: 10px 2px 0;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-meta {
  margin: 4px 2px 2px;
  color: var(--text-soft);
  font-size: 9.5px;
  line-height: 1.4;
}


/* =========================================================
   ARTISTS
   ========================================================= */

.artist-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: none;
}

.artist-row::-webkit-scrollbar {
  display: none;
}

.artist-card {
  min-width: 76px;
  text-align: center;
  transition: transform var(--duration-short) var(--ease);
}

.artist-card:active {
  transform: scale(0.93);
}

.artist-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.artist-name {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* =========================================================
   EMPTY STATES
   ========================================================= */

.empty-small {
  width: 100%;
  padding: 28px 16px;
  text-align: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.09);
}

.empty-small span {
  display: block;
  color: #728ac0;
  font-size: 26px;
}

.empty-small p {
  margin: 8px 0 0;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 500;
}


/* =========================================================
   PAGES NAVIGATION & ANIMATION
   ========================================================= */

.page {
  display: none;
  animation: pageIn 280ms var(--ease) both;
}

.page.active {
  display: block;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.page-heading {
  margin: 14px 2px 22px;
}

.page-heading h1 {
  margin: 4px 0 4px;
  font-size: 32px;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.page-heading p {
  margin: 0;
  color: var(--text-dim);
  font-size: 11px;
}

.library-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.round-add {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: rgba(101, 139, 255, 0.14);
  color: #9ab4ff;
  border: 1px solid rgba(101, 139, 255, 0.22);
  font-size: 22px;
  display: grid;
  place-items: center;
  transition: transform var(--duration-short) var(--ease), background var(--duration-short) ease;
}

.round-add:active {
  transform: scale(0.92);
  background: rgba(101, 139, 255, 0.24);
}


/* =========================================================
   SEARCH
   ========================================================= */

.search-box {
  display: flex;
  align-items: center;
  height: 54px;
  padding: 0 16px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color var(--duration-short) ease, background var(--duration-short) ease;
}

.search-box:focus-within {
  border-color: rgba(122, 165, 255, 0.45);
  background: rgba(255, 255, 255, 0.075);
}

.search-icon {
  font-size: 22px;
  color: #8da2cf;
}

.search-box input {
  flex: 1;
  min-width: 0;
  margin-left: 12px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}

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

.search-clear {
  display: none;
  background: transparent;
  color: #8e9ab0;
  font-size: 20px;
  padding: 4px;
}

.search-tabs,
.library-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 20px;
  padding: 4px;
  border-radius: 15px;
  background: rgba(11, 16, 28, 0.75);
  border: 1px solid var(--line);
}

.search-tab,
.library-tab {
  min-height: 36px;
  flex: 1 0 auto;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-dim);
  background: transparent;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--duration-short) ease, background var(--duration-short) ease, border-color var(--duration-short) ease;
}

.search-tab.active,
.library-tab.active {
  border-color: rgba(158, 192, 255, 0.16);
  color: #ffffff;
  background: linear-gradient(145deg, rgba(66, 103, 168, 0.38), rgba(39, 55, 91, 0.4));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}


/* =========================================================
   TRACK LIST & ITEMS
   ========================================================= */

.track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 74px;
  padding: 9px 11px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.015) 100%);
  transition: background var(--duration-short) ease, border-color var(--duration-short) ease, transform var(--duration-short) var(--ease), box-shadow var(--duration-short) ease;
}

.track-item:active {
  transform: scale(0.98);
  background: rgba(100, 145, 255, 0.09);
}

.track-item.playing {
  background: linear-gradient(105deg, rgba(83, 127, 255, 0.18) 0%, rgba(37, 56, 100, 0.14) 55%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(112, 151, 255, 0.3);
  box-shadow: inset 0 0 24px rgba(72, 113, 255, 0.06), 0 8px 25px rgba(0, 0, 0, 0.2);
}

.track-item.playing::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: #7ca3ff;
  box-shadow: 0 0 14px rgba(94, 143, 255, 0.9);
}

.track-art {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 14px;
  object-fit: cover;
  background: #101726;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  transition: border-color var(--duration-short) ease;
}

.track-item.playing .track-art {
  border-color: rgba(130, 164, 255, 0.45);
}

.track-info {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.track-title {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: -0.025em;
  color: #f7f9ff;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.track-item.playing .track-title {
  color: #a4c0ff;
}

.track-artist {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--text-soft);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.track-source {
  display: inline-block;
  margin-top: 5px;
  padding: 2.5px 7px;
  border-radius: 6px;
  background: rgba(94, 139, 255, 0.12);
  border: 1px solid rgba(94, 139, 255, 0.15);
  color: #92b0ff;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.track-more {
  width: 36px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  border-radius: 12px;
  background: transparent;
  color: #9aa8c0;
  font-size: 19px;
  transition: background var(--duration-short) ease, color var(--duration-short) ease;
}

.track-more:active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.track-playing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ef07a;
  box-shadow: 0 0 12px #3ef07a;
  flex: 0 0 7px;
  margin-right: 2px;
}


/* =========================================================
   LIBRARY GRID
   ========================================================= */

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.library-album {
  min-width: 0;
  padding: 9px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--gradient-card);
  border: 1px solid var(--line);
  transition: transform var(--duration-short) var(--ease), border-color var(--duration-short) ease;
}

.library-album:active {
  transform: scale(0.97);
  border-color: rgba(113, 151, 255, 0.35);
}

.library-album img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.library-album strong {
  display: block;
  margin: 9px 2px 0;
  font-size: 11.5px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-album span {
  display: block;
  margin: 4px 2px 2px;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--text-soft);
}


/* =========================================================
   ARTIST LIST
   ========================================================= */

.artist-list-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 12px;
  border-radius: 17px;
  transition: background var(--duration-short) ease;
}

.artist-list-item:active {
  background: rgba(255, 255, 255, 0.05);
}

.artist-list-item img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.artist-list-item strong {
  font-size: 11px;
  font-weight: 700;
}

.artist-list-item span {
  display: block;
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 8.5px;
}


/* =========================================================
   BOTTOM NAVIGATION
   ========================================================= */

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  display: flex;
  width: min(calc(100% - 24px), 520px);
  min-height: var(--nav-height);
  align-items: center;
  justify-content: space-around;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  background: rgba(14, 21, 38, 0.82);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
}

.nav-item {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 50px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 16px;
  color: var(--text-dim);
  background: transparent;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--duration-short) ease, background var(--duration-short) ease;
}

.nav-icon {
  display: grid;
  min-height: 24px;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}

.nav-item.active {
  color: #adc9ff;
  background: linear-gradient(180deg, rgba(75, 119, 207, 0.2), rgba(53, 78, 126, 0.45));
}

.nav-item.active::after {
  position: absolute;
  bottom: 2px;
  width: 14px;
  height: 2.5px;
  border-radius: var(--radius-full);
  background: #81b1ff;
  box-shadow: 0 0 10px rgba(110, 163, 255, 0.8);
  content: "";
}

.create-nav {
  flex: 0 0 54px;
}

.create-nav::after {
  display: none;
}

.create-circle {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(145deg, #8cbaff, #517fff 60%, #7669f7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(68, 117, 255, 0.38);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  transition: transform var(--duration-short) var(--ease);
}

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


/* =========================================================
   MINI PLAYER (FLOATING)
   ========================================================= */

.mini-player {
  position: fixed;
  left: 50%;
  bottom: calc(78px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 90;
  width: min(calc(100% - 24px), 560px);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(24, 34, 58, 0.94), rgba(10, 15, 28, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.095);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.mini-player.hidden {
  display: none !important;
}

.mini-progress {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2.5px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
}

.mini-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #6290ff, #89aeff);
  border-radius: 2px;
}

.mini-main {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  text-align: left;
  background: transparent;
}

.mini-art-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.mini-art {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mini-playing-ring {
  position: absolute;
  inset: -2px;
  border-radius: 15px;
  border: 1.5px solid transparent;
  pointer-events: none;
}

.mini-player.playing .mini-playing-ring {
  border-color: rgba(121, 153, 255, 0.6);
  animation: ringPulse 1.8s infinite;
}

@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(102, 137, 255, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(102, 137, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(102, 137, 255, 0); }
}

.mini-info {
  min-width: 0;
  margin-left: 12px;
}

.mini-info strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-info span {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 8.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-action {
  width: 38px;
  height: 46px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #abb9d3;
  font-size: 19px;
  transition: transform var(--duration-short) var(--ease), color var(--duration-short) ease;
}

.mini-action:active {
  transform: scale(0.9);
  color: #ffffff;
}

.play-mini {
  color: #ffffff;
  font-size: 18px;
}


/* =========================================================
   NOW PLAYING (FULLSCREEN SHEET)
   ========================================================= */

.now-playing {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  overflow: hidden;
  background: #060913;
  animation: nowPlayingIn 320ms var(--ease-snappy) both;
}

.now-playing.open {
  display: block;
}

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

.np-backdrop {
  position: absolute;
  inset: -50px;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 20%, rgba(70, 105, 220, 0.3), transparent 40%),
    linear-gradient(180deg, #10192e 0%, #060913 70%);
  filter: blur(2px);
}

.np-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent, rgba(0, 0, 0, 0.6));
}

.np-top {
  height: 72px;
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  align-items: center;
  padding: calc(8px + var(--safe-top)) 20px 0;
}

.np-close,
.np-more {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #b7c3dc;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: transform var(--duration-short) var(--ease), background var(--duration-short) ease;
}

.np-close:active,
.np-more:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.09);
}

.np-more {
  justify-self: end;
}

.np-label {
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #8fa1c9;
  text-transform: uppercase;
}

.np-content {
  height: calc(100vh - 72px - var(--safe-top));
  height: calc(100dvh - 72px - var(--safe-top));
  overflow-y: auto;
  padding: 20px 22px calc(30px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
}

.np-art-container {
  position: relative;
  width: min(80vw, 360px);
  aspect-ratio: 1;
  margin: 8px auto 26px;
  display: grid;
  place-items: center;
}

.np-art-glow {
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.38);
  filter: blur(65px);
  transform: scale(1.05);
}

.np-art-shell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  padding: 7px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform var(--duration-medium) var(--ease);
}

.np-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.np-art-shell.rotating {
  animation: albumSpin 18s linear infinite;
}

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

.np-song-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.np-song-text {
  min-width: 0;
  flex: 1;
}

.np-song-text h1 {
  margin: 0;
  font-size: clamp(20px, 6vw, 27px);
  letter-spacing: -0.05em;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np-song-text p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-large {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #adbcd4;
  font-size: 21px;
  display: grid;
  place-items: center;
  transition: transform var(--duration-short) var(--ease), color var(--duration-short) ease, background var(--duration-short) ease;
}

.favorite-large:active {
  transform: scale(0.9);
}

.favorite-large.active {
  color: #ff70c4;
  background: rgba(255, 110, 185, 0.12);
  border-color: rgba(255, 110, 185, 0.2);
}


/* =========================================================
   LIVE AUDIO VISUALIZER
   ========================================================= */

.visualizer {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
  margin: 14px 0 6px;
  opacity: 0.75;
}

.visualizer span {
  width: 3.5px;
  height: 8px;
  border-radius: var(--radius-full);
  background: #7ca1ff;
  transform-origin: center;
  animation: visualBars 1.1s ease-in-out infinite alternate;
}

.visualizer span:nth-child(2) { animation-delay: -0.2s; }
.visualizer span:nth-child(3) { animation-delay: -0.5s; }
.visualizer span:nth-child(4) { animation-delay: -0.8s; }
.visualizer span:nth-child(5) { animation-delay: -0.1s; }
.visualizer span:nth-child(6) { animation-delay: -0.7s; }
.visualizer span:nth-child(7) { animation-delay: -0.3s; }
.visualizer span:nth-child(8) { animation-delay: -0.9s; }
.visualizer span:nth-child(9) { animation-delay: -0.4s; }
.visualizer span:nth-child(10) { animation-delay: -0.6s; }
.visualizer span:nth-child(11) { animation-delay: -0.2s; }

@keyframes visualBars {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1.7); }
}

.visualizer.paused span {
  animation-play-state: paused;
  transform: scaleY(0.35);
}


/* =========================================================
   PROGRESS & SEEK BAR
   ========================================================= */

.seek-area {
  margin-top: 6px;
}

.seek-bar {
  width: 100%;
  height: 5px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: var(--radius-full);
  outline: none;
  background: linear-gradient(90deg, #7da5ff 0%, #7da5ff 0%, rgba(255, 255, 255, 0.1) 0%);
  cursor: pointer;
}

.seek-bar::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(114, 148, 255, 0.22), 0 3px 10px rgba(0, 0, 0, 0.4);
  transition: transform var(--duration-short) ease;
}

.seek-bar:active::-webkit-slider-thumb {
  transform: scale(1.25);
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
}


/* =========================================================
   PLAYER CONTROLS
   ========================================================= */

.main-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin-top: 20px;
}

.control-small,
.control-main {
  background: transparent;
  color: #98a5bd;
  font-size: 22px;
  transition: transform var(--duration-short) var(--ease), color var(--duration-short) ease;
}

.control-small:active,
.control-main:active {
  transform: scale(0.88);
}

.control-small {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.control-small.active {
  color: #7da5ff;
}

.control-main {
  font-size: 38px;
  font-weight: 300;
}

.play-button {
  width: 68px;
  height: 68px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 24px;
  color: #ffffff;
  background: var(--gradient-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 12px 30px rgba(75, 119, 255, 0.38);
  font-size: 24px;
  display: grid;
  place-items: center;
  transition: transform var(--duration-short) var(--ease), box-shadow var(--duration-short) ease;
}

.play-button:active {
  transform: scale(0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 18px rgba(75, 119, 255, 0.28);
}


/* =========================================================
   UTILITY ACTIONS (VOLUME / SLEEP / REPEAT)
   ========================================================= */

.utility-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 24px;
}

.utility-btn {
  display: flex;
  min-height: 70px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(190, 208, 255, 0.1);
  border-radius: 19px;
  color: #a8bbe2;
  background: var(--gradient-card-elevated);
  cursor: pointer;
  transition: transform var(--duration-short) var(--ease), border-color var(--duration-short) ease;
}

.utility-btn:active {
  transform: scale(0.95);
  border-color: rgba(190, 208, 255, 0.25);
}

.utility-btn > span {
  font-size: 21px;
  line-height: 1;
}

.utility-btn small {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
}


/* =========================================================
   BOTTOM SHEETS
   ========================================================= */

.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 300;
  width: min(100%, 620px);
  max-height: 84vh;
  transform: translate(-50%, 110%);
  opacity: 0;
  overflow-y: auto;
  padding: 10px 18px calc(25px + var(--safe-bottom));
  border-radius: 32px 32px 0 0;
  background: linear-gradient(155deg, rgba(23, 32, 54, 0.98), rgba(6, 10, 18, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -25px 80px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  transition: transform 320ms var(--ease-snappy), opacity 240ms ease;
}

.bottom-sheet.open {
  transform: translate(-50%, 0);
  opacity: 1;
}

.sheet-handle {
  width: 38px;
  height: 4.5px;
  margin: 0 auto 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.sheet-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.sheet-close {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #8fa0bd;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: transform var(--duration-short) var(--ease);
}

.sheet-close:active {
  transform: scale(0.9);
}

.sheet-content {
  max-height: 54vh;
  overflow-y: auto;
}


/* =========================================================
   SOURCE IMPORT GRID
   ========================================================= */

.source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.source-card {
  min-height: 128px;
  padding: 16px;
  text-align: left;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  transition: transform var(--duration-short) var(--ease), border-color var(--duration-short) ease;
}

.source-card:active {
  transform: scale(0.96);
  border-color: rgba(255, 255, 255, 0.18);
}

.source-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 13px;
  font-size: 20px;
}

.source-icon.blue {
  color: #86a8ff;
  background: rgba(var(--accent-rgb), 0.14);
}

.source-icon.purple {
  color: #b095ff;
  background: rgba(var(--purple-rgb), 0.14);
}

.source-icon.cyan {
  color: #53daff;
  background: rgba(var(--cyan-rgb), 0.13);
}

.source-icon.gold {
  color: #f0cc80;
  background: rgba(242, 203, 116, 0.12);
}

.source-card strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.source-card span {
  display: block;
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 8.5px;
  line-height: 1.4;
}


/* =========================================================
   MODALS & DIALOGS
   ========================================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.modal-backdrop.open {
  display: flex;
  animation: backdropIn 220ms ease;
}

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

.modal {
  width: min(100%, 520px);
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(22, 31, 52, 0.98), rgba(7, 11, 20, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  animation: modalIn 260ms var(--ease-snappy);
}

@keyframes modalIn {
  from {
    transform: translateY(30px) scale(0.97);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-top h2 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.modal-close {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: #8fa0bd;
  font-size: 20px;
  display: grid;
  place-items: center;
  transition: transform var(--duration-short) var(--ease);
}

.modal-close:active {
  transform: scale(0.9);
}

.modal-description {
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.6;
  margin: 14px 0 18px;
}

.field-label {
  display: block;
  margin-top: 14px;
  color: #92a0b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  height: 50px;
  padding: 0 14px;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  transition: border-color var(--duration-short) ease;
}

.field-wrap:focus-within {
  border-color: rgba(122, 165, 255, 0.4);
}

.field-wrap > span {
  color: #7990c2;
  font-size: 18px;
}

.field-wrap input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  font-size: 11px;
}

.field-wrap input::placeholder {
  color: var(--text-dim);
}

.full {
  width: 100%;
  margin-top: 18px;
}

.edit-art-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.edit-art {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.art-upload-btn {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: #b5c3dd;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.art-upload-btn input {
  display: none;
}

.compact-modal {
  padding-bottom: 22px;
}

.timer-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.timer-options button {
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #b5c3dd;
  border: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 700;
  transition: background var(--duration-short) ease, transform var(--duration-short) var(--ease);
}

.timer-options button:active {
  background: rgba(91, 135, 255, 0.16);
  transform: scale(0.95);
}

.danger-btn {
  min-height: 44px;
  border-radius: 14px;
  background: rgba(255, 82, 113, 0.1);
  color: #ff8598;
  border: 1px solid rgba(255, 82, 113, 0.15);
  font-size: 10px;
  font-weight: 700;
  transition: background var(--duration-short) ease, transform var(--duration-short) var(--ease);
}

.danger-btn:active {
  background: rgba(255, 82, 113, 0.18);
  transform: scale(0.96);
}


/* =========================================================
   SETTINGS
   ========================================================= */

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0 16px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 15px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.settings-meta strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.settings-meta span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: var(--text-dim);
}

.storage-left-red {
  color: var(--danger) !important;
  font-weight: 700;
}


/* =========================================================
   CONTEXT MENU SHEET
   ========================================================= */

.context-song {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 6px 4px 16px;
  border-bottom: 1px solid var(--line);
}

.context-song img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 14px;
}

.context-song strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
}

.context-song span {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 9px;
}

.context-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.context-actions button {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 10px;
  background: transparent;
  color: #c1ccde;
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 13px;
  transition: background var(--duration-short) ease;
}

.context-actions button:active {
  background: rgba(255, 255, 255, 0.06);
}

.context-actions button span {
  width: 24px;
  color: #849fdb;
  text-align: center;
  font-size: 17px;
}

.context-actions .danger-text {
  color: #ff758a;
}


/* =========================================================
   TOAST NOTIFICATION
   ========================================================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  z-index: 900;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-radius: 16px;
  background: rgba(16, 23, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  color: #eff3ff;
  font-size: 10.5px;
  font-weight: 600;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 240ms ease, transform 240ms var(--ease);
}

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

.toast-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(94, 145, 255, 0.16);
  color: #8db0ff;
  font-size: 11px;
}


/* =========================================================
   QUEUE LIST
   ========================================================= */

.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 15px;
  transition: background var(--duration-short) ease;
}

.queue-item.current {
  background: rgba(91, 135, 255, 0.1);
  border: 1px solid rgba(91, 135, 255, 0.18);
}

.queue-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
}

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

.queue-item-info strong {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item-info span {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 8px;
}

.queue-remove {
  background: transparent;
  color: #6a7791;
  font-size: 18px;
  padding: 6px;
  transition: color var(--duration-short) ease;
}

.queue-remove:active {
  color: var(--danger);
}


/* =========================================================
   HOVER INTERACTIONS (DESKTOP / POINTER FINE)
   ========================================================= */

@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover,
  .round-add:hover {
    border-color: rgba(153, 192, 255, 0.38);
    transform: translateY(-2px);
  }

  .primary-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(66, 119, 255, 0.4);
  }

  .quick-card:hover,
  .horizontal-track:hover,
  .album-card:hover,
  .library-album:hover {
    border-color: rgba(140, 175, 255, 0.28);
    transform: translateY(-3px);
  }

  .track-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
  }
}


/* =========================================================
   RESPONSIVE DESIGN & MOBILE POLISH
   ========================================================= */

@media (min-width: 700px) {
  .app {
    padding-left: 0;
    padding-right: 0;
  }

  .hero-card {
    min-height: 310px;
  }

  .np-art-container {
    width: 380px;
  }
}

@media (max-width: 600px) {
  .app {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }

  .topbar {
    margin-bottom: 20px;
  }

  .hero-card {
    min-height: 270px;
    padding: 24px 20px;
  }

  .hero-content {
    max-width: 80%;
  }

  .hero-disc {
    width: 185px;
    height: 185px;
    right: -65px;
  }

  .content-section {
    margin-top: 28px;
  }

  .track-item {
    gap: 11px;
    padding: 8px 10px;
  }

  .track-art {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .bottom-nav {
    width: calc(100% - 20px);
    bottom: max(8px, env(safe-area-inset-bottom));
  }

  .mini-player {
    width: calc(100% - 20px);
    bottom: calc(76px + var(--safe-bottom));
  }

  .bottom-sheet {
    max-height: min(84vh, 760px);
    overscroll-behavior: contain;
  }

  .modal {
    width: min(100% - 24px, 440px);
    max-height: calc(100dvh - 36px - var(--safe-top) - var(--safe-bottom));
  }
}

@media (max-width: 390px) {
  .app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-card {
    min-height: 250px;
    padding: 20px 16px;
  }

  .hero-content h1 {
    font-size: clamp(28px, 8.5vw, 34px);
  }

  .hero-disc {
    width: 155px;
    height: 155px;
    right: -60px;
  }

  .quick-card {
    gap: 9px;
    padding: 10px;
  }

  .quick-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .track-item {
    gap: 10px;
    padding: 7px 9px;
  }

  .track-art {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 12px;
  }

  .horizontal-track {
    min-width: 132px;
    max-width: 132px;
    flex-basis: 132px;
  }

  .album-card {
    min-width: 126px;
    max-width: 126px;
    flex-basis: 126px;
  }

  .np-art-container {
    width: min(78vw, 320px);
    margin-bottom: 20px;
  }

  .utility-row {
    gap: 7px;
  }
}

@media (max-height: 700px) {
  .np-content {
    padding-top: 6px;
  }

  .np-art-container {
    width: min(58vh, 300px, 76vw);
    margin-top: 0;
    margin-bottom: 12px;
  }

  .main-controls {
    margin-top: 12px;
  }

  .utility-row {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
/* =========================================================
   AESTHETIC REQUEST POP-UP MODAL (NEO-GLASS & MATERIAL YOU)
   ========================================================= */

.request-backdrop {
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 4, 10, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 600;
}

.request-modal {
  width: min(100%, 480px);
  border-radius: var(--radius-xl, 30px);
  padding: 24px 22px;
  background: linear-gradient(155deg, rgba(22, 33, 58, 0.94) 0%, rgba(6, 10, 20, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.7), 
    0 0 35px rgba(79, 133, 255, 0.2), 
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(30px) scale(0.96);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.modal-backdrop.open .request-modal {
  transform: translateY(0) scale(1);
}

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

.request-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.request-orb {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(79, 133, 255, 0.3));
  border: 1px solid rgba(0, 240, 255, 0.35);
  display: grid;
  place-items: center;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
}

.request-orb .icon {
  font-size: 20px;
}

.request-brand h2 {
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.04em;
  margin: 2px 0 0;
}

.request-brand h2 span {
  background: linear-gradient(110deg, #00f0ff, #7aa5ff 60%, #ff79c6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.field-icon {
  font-size: 16px;
  color: var(--text-soft, #aeb8cc);
  opacity: 0.9;
}

.mandatory-wrap {
  position: relative;
  border-color: rgba(79, 133, 255, 0.25);
}

.req-chip {
  font-size: 7.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.12);
  color: var(--cyan, #00f0ff);
  border: 1px solid rgba(0, 240, 255, 0.25);
  pointer-events: none;
}

/* Dynamic Live Preview Box */
.request-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px dashed rgba(0, 240, 255, 0.25);
  animation: fadeIn 0.25s ease both;
}

.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan, #00f0ff);
  box-shadow: 0 0 12px var(--cyan, #00f0ff);
  flex-shrink: 0;
}

.preview-text {
  min-width: 0;
  flex: 1;
}

.preview-text strong {
  display: block;
  font-size: 11px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-text span {
  display: block;
  font-size: 8.5px;
  color: var(--text-dim, #707b91);
}

.request-submit-btn {
  margin-top: 18px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.request-submit-btn.loading {
  pointer-events: none;
  opacity: 0.65;
  filter: grayscale(0.5);
}

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