:root {
  --bg: #09111f;
  --bg-soft: #101b30;
  --panel: rgba(11, 22, 39, 0.86);
  --panel-strong: rgba(14, 28, 48, 0.96);
  --line: rgba(126, 172, 214, 0.2);
  --line-strong: rgba(126, 172, 214, 0.34);
  --text: #eff6ff;
  --muted: #99acc5;
  --accent: #7ee081;
  --accent-strong: #36d399;
  --accent-alt: #7bd7ff;
  --danger: #ff8f8f;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --radius: 24px;
  --radius-sm: 16px;
  --font-display: "Avenir Next", "Trebuchet MS", sans-serif;
  --font-body: "Avenir", "Gill Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.music-v2-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(54, 211, 153, 0.15), transparent 28%),
    radial-gradient(circle at top right, rgba(123, 215, 255, 0.18), transparent 32%),
    linear-gradient(180deg, #07101d 0%, #0c1629 45%, #0a1221 100%);
}

body.music-v2-body.lyrics-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.app-shell,
.admin-shell {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.sidebar,
.panel,
.hero,
.auth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 24px;
}

.brand h1,
.hero h2,
.panel h2,
.admin-header h1,
.auth-card h1 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.05;
}

.eyebrow,
.card-label {
  margin: 0 0 10px;
  color: var(--accent-alt);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
}

.lede,
.hero-copy,
.sidebar-card p,
.playlist-card p,
.auth-card p,
.admin-header p {
  color: var(--muted);
  line-height: 1.5;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  margin: 28px 0;
}

.sidebar-nav a,
.recent-item,
.admin-song-card {
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 12px 14px;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.sidebar-nav a:hover,
.recent-item:hover,
.admin-song-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(123, 215, 255, 0.08);
}

.sidebar-card {
  border-radius: 18px;
  padding: 16px;
  background: var(--panel-strong);
}

.sidebar-card strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 4px;
}

.content {
  display: grid;
  gap: 24px;
  padding-bottom: 140px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 20px;
  padding: 28px;
}

.hero-panel,
.playlist-card,
.admin-song-card,
.song-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 33, 57, 0.92), rgba(9, 17, 31, 0.96));
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hero-panel {
  padding: 18px;
}

.hero-song-panel {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.hero-song-panel.is-current-song {
  border-color: rgba(126, 224, 129, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 42px rgba(0, 0, 0, 0.22);
}

.hero-song-panel.is-playing {
  background:
    radial-gradient(circle at top right, rgba(126, 224, 129, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(22, 40, 55, 0.96), rgba(8, 17, 31, 0.98));
}

.hero-art-wrap {
  margin-bottom: 0;
}

.hero-art,
.hero-art-fallback,
.song-card-image,
.player-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(123, 215, 255, 0.22), rgba(126, 224, 129, 0.18));
  color: white;
  font-family: var(--font-display);
}

.hero-actions,
.toolbar,
.player-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #072012;
  border-color: rgba(126, 224, 129, 0.7);
  font-weight: 700;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
}

.button.is-hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.panel {
  padding: 24px;
}

.panel-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.panel-header-tight {
  margin-bottom: 22px;
}

.search-input,
.select-input,
.admin-form input[type="text"],
.admin-form input[type="password"],
.admin-form input[type="file"],
.admin-form select,
.admin-form textarea,
.stack-form input[type="password"] {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.view-toggle-button {
  padding: 10px 14px;
  min-width: 100px;
}

.view-toggle-button.is-active {
  background: linear-gradient(135deg, rgba(126, 224, 129, 0.92), rgba(54, 211, 153, 0.92));
  border-color: rgba(126, 224, 129, 0.78);
  color: #072012;
  font-weight: 700;
}

.song-grid,
.playlist-grid,
.admin-song-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.song-card {
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.song-grid.song-grid-list {
  grid-template-columns: 1fr;
}

.song-card-image {
  border-radius: 22px 22px 0 0;
}

.song-card-body {
  padding: 16px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}

.song-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.song-card-head h3 {
  margin: 0;
}

.song-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.song-grid.song-grid-list .song-card-body {
  justify-content: center;
}

.song-card-list {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: stretch;
}

.song-list-art {
  display: flex;
}

.song-card-list .song-card-image {
  width: 96px;
  min-width: 96px;
  height: 100%;
  min-height: 96px;
  border-radius: 22px 0 0 22px;
}

.song-list-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.song-list-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.song-grid.song-grid-list .song-card-head,
.song-list-body .song-card-head {
  align-items: center;
}

.song-grid.song-grid-list .song-card-head h3 {
  font-size: 1rem;
}

.song-list-heading {
  min-width: 0;
}

.song-list-heading h3 {
  overflow-wrap: anywhere;
}

.song-list-submeta {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.song-grid.song-grid-list .chip-row {
  margin-top: 2px;
}

.song-list-actions {
  margin-top: 0;
  justify-content: flex-end;
  align-self: center;
}

.song-grid.song-grid-list .song-card-actions .button,
.song-list-actions .button {
  padding: 9px 15px;
}

.song-card-menu {
  position: relative;
  flex: 0 0 auto;
}

.song-card-menu-trigger,
.song-menu-item {
  font: inherit;
}

.song-card-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(123, 215, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.song-card-menu-trigger span {
  letter-spacing: 0.14em;
  transform: translateY(-2px);
}

.song-card-menu-trigger.is-open,
.song-card-menu-trigger:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(126, 224, 129, 0.36);
  background: rgba(126, 224, 129, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

@media (hover: hover) {
  .song-card-menu-trigger:hover {
    transform: translateY(-1px);
    border-color: rgba(126, 224, 129, 0.36);
    background: rgba(126, 224, 129, 0.12);
  }
}

.song-card-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 3;
  width: min(220px, calc(100vw - 72px));
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(123, 215, 255, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 21, 38, 0.98), rgba(7, 14, 25, 0.98));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
}

.song-card-menu-popover[hidden] {
  display: none;
}

.song-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.song-menu-item.is-disabled,
.song-menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.song-menu-item:focus-visible,
.song-menu-item:not(:disabled):hover {
  background: rgba(123, 215, 255, 0.12);
  color: #f7fcff;
  transform: translateX(2px);
}

.song-card-meta,
.player-now small,
.recent-item small,
.admin-song-card small,
.admin-song-card span,
.status {
  color: var(--muted);
}

.song-card-meta {
  margin: 4px 0 0;
  line-height: 1.45;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-chip-row {
  margin-top: 2px;
}

.hero-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-state-pill,
.hero-queue-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(123, 215, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1;
}

.hero-state-pill {
  color: #d9ffda;
  border-color: rgba(126, 224, 129, 0.28);
  background: rgba(126, 224, 129, 0.12);
}

.chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(126, 224, 129, 0.12);
  color: #d9ffda;
  font-size: 0.8rem;
}

.hero-song-summary {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}

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

.hero-song-details div {
  padding: 12px 14px;
  border: 1px solid rgba(123, 215, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.hero-song-details dt,
.hero-song-details dd {
  margin: 0;
}

.hero-song-details dt {
  color: var(--accent-alt);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-song-details dd {
  color: var(--text);
  line-height: 1.4;
}

.hero-song-actions {
  margin-top: auto;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.playlist-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.playlist-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
  gap: 10px;
  padding: 14px 14px 16px;
}

.playlist-card .card-label {
  margin-bottom: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.playlist-card h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: balance;
}

.playlist-card p {
  margin: 0;
  font-size: 0.95rem;
}

.playlist-card .button.button-secondary {
  padding: 9px 16px;
  font-size: 0.96rem;
}

.playlist-card .button {
  margin-top: auto;
  align-self: flex-start;
}

.recent-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.recent-item,
.admin-song-card {
  text-align: left;
  color: var(--text);
  font: inherit;
}

.player-bar {
  position: fixed;
  left: auto;
  right: 18px;
  bottom: 18px;
  width: min(550px, calc(100vw - 36px));
  display: grid;
  gap: 14px;
  border: 1px solid rgba(123, 215, 255, 0.2);
  border-radius: 28px;
  padding: 14px;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(123, 215, 255, 0.18), transparent 34%),
    radial-gradient(circle at bottom left, rgba(126, 224, 129, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(12, 24, 41, 0.94), rgba(7, 13, 24, 0.97));
  backdrop-filter: blur(22px) saturate(1.15);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  z-index: 25;
  --player-progress: 0%;
  --player-volume: 100%;
}

.player-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 36%);
  pointer-events: none;
}

.player-bar > * {
  position: relative;
  z-index: 1;
}

.player-bar.is-active {
  border-color: rgba(126, 224, 129, 0.38);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(126, 224, 129, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.player-bar.is-dragging {
  cursor: grabbing;
  box-shadow:
    0 34px 96px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(123, 215, 255, 0.16);
}

.player-bar.is-collapsed .player-body {
  display: none;
}

.player-drag-handle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  cursor: default;
  touch-action: manipulation;
}

.player-drag-dots {
  width: 18px;
  height: 30px;
  border-radius: 999px;
  opacity: 0.88;
  background-image: radial-gradient(circle, rgba(239, 246, 255, 0.68) 0 1.2px, transparent 1.2px);
  background-size: 6px 6px;
  background-position: center;
  background-repeat: repeat-y;
}

.player-kicker {
  min-width: 0;
}

.player-kicker .eyebrow {
  margin-bottom: 4px;
}

.player-kicker small {
  color: var(--muted);
}

.player-utility {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(123, 215, 255, 0.18);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.player-utility:focus-visible {
  transform: translateY(-1px);
  background: rgba(123, 215, 255, 0.08);
  border-color: rgba(123, 215, 255, 0.32);
}

@media (hover: hover) {
  .player-utility:hover {
    transform: translateY(-1px);
    background: rgba(123, 215, 255, 0.08);
    border-color: rgba(123, 215, 255, 0.32);
  }
}

@media (max-width: 900px) {
  .hero-song-panel {
    grid-template-columns: 1fr;
  }

  .hero-song-details {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) {
  .player-drag-handle {
    cursor: grab;
    touch-action: none;
  }
}

.player-compact-play {
  display: none;
  min-width: 68px;
}

.player-bar.is-collapsed .player-compact-play {
  display: inline-flex;
}

.player-search-toggle {
  min-width: 108px;
}

.player-search-tray {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 180ms ease, opacity 180ms ease, margin 180ms ease;
}

.player-bar.is-search-collapsed .player-search-tray {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: -6px;
}

.player-search-tray > * {
  min-height: 0;
}

.player-search-field {
  display: block;
  overflow: hidden;
}

.player-search-input {
  width: 100%;
  min-height: 48px;
  padding-inline: 16px;
  border-radius: 16px;
  border-color: rgba(123, 215, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
    rgba(7, 14, 25, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.player-search-input::placeholder {
  color: rgba(153, 172, 197, 0.9);
}

.player-search-input:focus-visible {
  outline: 2px solid rgba(123, 215, 255, 0.34);
  outline-offset: 2px;
  border-color: rgba(123, 215, 255, 0.34);
}

.player-body {
  display: grid;
  gap: 16px;
}

.player-now {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.player-art-frame {
  width: 92px;
  min-width: 92px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.player-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.player-copy p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.16rem;
  line-height: 1.1;
}

.player-copy small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.player-copy p,
.player-copy small,
.player-kicker small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.player-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(123, 215, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(239, 246, 255, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player-pill-button {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.player-pill-button.is-active {
  border-color: rgba(126, 224, 129, 0.42);
  background: rgba(126, 224, 129, 0.14);
  color: #f7fff8;
}

.player-pill-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(126, 224, 129, 0.42);
  background: rgba(126, 224, 129, 0.12);
}

@media (hover: hover) {
  .player-pill-button:hover {
    transform: translateY(-1px);
    border-color: rgba(126, 224, 129, 0.42);
    background: rgba(126, 224, 129, 0.12);
  }
}

.player-progress-shell {
  display: grid;
  gap: 8px;
}

.player-times {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

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

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

.player-control {
  min-height: 46px;
  border: 1px solid rgba(123, 215, 255, 0.2);
  border-radius: 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.player-control:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(123, 215, 255, 0.36);
  background: rgba(123, 215, 255, 0.1);
}

@media (hover: hover) {
  .player-control:hover {
    transform: translateY(-1px);
    border-color: rgba(123, 215, 255, 0.36);
    background: rgba(123, 215, 255, 0.1);
  }
}

.player-control-primary {
  min-width: 110px;
  justify-content: center;
  background: linear-gradient(135deg, rgba(126, 224, 129, 0.94), rgba(54, 211, 153, 0.92));
  color: #082114;
  border-color: rgba(126, 224, 129, 0.56);
  box-shadow: 0 10px 24px rgba(54, 211, 153, 0.22);
}

.player-control-primary:focus-visible {
  background: linear-gradient(135deg, rgba(151, 236, 154, 0.98), rgba(87, 223, 179, 0.96));
  border-color: rgba(151, 236, 154, 0.76);
  box-shadow: 0 12px 28px rgba(54, 211, 153, 0.28);
}

@media (hover: hover) {
  .player-control-primary:hover {
    background: linear-gradient(135deg, rgba(151, 236, 154, 0.98), rgba(87, 223, 179, 0.96));
    border-color: rgba(151, 236, 154, 0.76);
    box-shadow: 0 12px 28px rgba(54, 211, 153, 0.28);
  }
}

.player-control-secondary {
  min-width: 72px;
}

.player-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 164px;
  color: var(--muted);
  font-size: 0.78rem;
}

.player-volume span {
  flex: 0 0 auto;
  line-height: 1;
}

.player-volume .player-range {
  flex: 1 1 auto;
}

.player-range {
  width: 100%;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(126, 224, 129, 0.95), rgba(123, 215, 255, 0.92)) 0 / var(--player-progress) 100% no-repeat,
    rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
}

.player-range-volume {
  height: 6px;
  background:
    linear-gradient(90deg, rgba(123, 215, 255, 0.96), rgba(126, 224, 129, 0.88)) 0 / var(--player-volume) 100% no-repeat,
    rgba(255, 255, 255, 0.12);
}

.player-range::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(7, 16, 29, 0.9);
  border-radius: 50%;
  background: #eff6ff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.26);
}

.player-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(7, 16, 29, 0.9);
  border-radius: 50%;
  background: #eff6ff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.26);
}

.player-range::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.player-range::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 224, 129, 0.95), rgba(123, 215, 255, 0.92));
}

.player-range-volume::-moz-range-track {
  height: 6px;
}

.player-range-volume::-moz-range-progress {
  height: 6px;
  background: linear-gradient(90deg, rgba(123, 215, 255, 0.96), rgba(126, 224, 129, 0.88));
}

.player-range:focus-visible::-webkit-slider-thumb,
.player-range:focus-visible::-moz-range-thumb {
  outline: 2px solid rgba(123, 215, 255, 0.42);
  outline-offset: 2px;
}

.player-bar audio {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.lyrics-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(3, 8, 16, 0.72);
  backdrop-filter: blur(14px);
}

.lyrics-modal-backdrop.is-open {
  display: grid;
}

.lyrics-modal {
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(9, 19, 35, 0.98), rgba(8, 14, 26, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

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

.lyrics-modal-top h2 {
  margin: 0;
}

.lyrics-modal-meta {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.lyrics-modal-body {
  overflow: auto;
  padding: min(18vh, 120px) 6px min(22vh, 140px) 0;
  border-radius: 0;
  border: 1px solid var(--line);
  border-width: 1px 0 0;
  background: transparent;
  line-height: 1.7;
  white-space: normal;
  overscroll-behavior: contain;
  scroll-padding-block: 45%;
}

.lyrics-section {
  margin: 18px 0 8px;
  color: var(--accent-alt);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lyrics-section:first-child {
  margin-top: 0;
}

.lyrics-line {
  padding: 6px 14px;
  margin-right: 8px;
  border-radius: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(239, 246, 255, 0.82);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.lyrics-line.is-active {
  background: rgba(126, 224, 129, 0.16);
  color: #f7fff8;
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 rgba(126, 224, 129, 0.88);
}

.lyrics-line-spacer {
  min-height: 0.85rem;
}

.lyrics-empty {
  margin: 0;
  color: var(--muted);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(520px, 100%);
  padding: 28px;
}

.stack-form,
.admin-form {
  display: grid;
  gap: 16px;
}

.admin-body .admin-shell {
  grid-template-columns: 1fr;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 0 4px;
}

.admin-panel {
  margin-top: 12px;
}

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

.form-grid label,
.form-grid fieldset {
  display: grid;
  gap: 8px;
}

.form-grid span,
.form-grid legend,
.stack-form span {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.full-width,
.category-group {
  grid-column: 1 / -1;
}

.checkbox-group,
.category-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin: 0;
}

.checkbox-group label,
.category-list label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
  color: var(--text);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.field-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.admin-song-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.status {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.status.success {
  color: #d7ffe0;
  background: rgba(54, 211, 153, 0.12);
}

.status.error {
  color: #ffd4d4;
  background: rgba(255, 143, 143, 0.14);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell,
  .admin-shell,
  .content,
  .panel,
  .hero,
  .sidebar,
  .auth-card {
    padding: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .panel-header,
  .admin-header {
    align-items: start;
    flex-direction: column;
  }

  .toolbar {
    width: 100%;
  }

  .view-toggle,
  .search-input,
  .select-input {
    width: 100%;
  }

  .view-toggle-button {
    flex: 1 1 0;
  }

  .song-card-head {
    gap: 10px;
  }

  .song-card-list {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .song-card-list .song-card-image {
    width: 72px;
    min-width: 72px;
    min-height: 72px;
  }

  .song-list-body {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .song-list-actions {
    justify-content: flex-start;
  }

  .song-card-menu-popover {
    right: -2px;
    width: min(230px, calc(100vw - 48px));
  }

  .player-bar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    padding: 12px;
    gap: 12px;
  }

  .lyrics-modal-backdrop {
    padding: 12px;
  }

  .lyrics-modal {
    width: 100%;
    max-height: min(82vh, 680px);
    padding: 18px;
    border-radius: 24px;
  }

  .lyrics-modal-top {
    flex-direction: column;
  }

  .player-now {
    align-items: start;
  }

  .player-art-frame {
    width: 72px;
    min-width: 72px;
    border-radius: 20px;
  }

  .player-footer {
    grid-template-columns: 1fr;
  }

  .player-controls {
    justify-content: space-between;
  }

  .player-control {
    flex: 1 1 0;
    min-width: 0;
  }

  .player-control-primary {
    min-width: 0;
  }

  .player-volume {
    min-width: 0;
    justify-content: space-between;
  }

  .player-drag-handle {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
  }

  .player-drag-dots {
    display: none;
  }

  .player-search-toggle {
    min-width: 0;
    padding-inline: 10px;
  }
}

@media (max-width: 520px) {
  .content {
    padding-bottom: 220px;
  }

  .player-copy p,
  .player-kicker small,
  .player-copy small {
    white-space: normal;
  }

  .player-controls {
    gap: 8px;
  }

  .player-control {
    padding-inline: 10px;
    font-size: 0.92rem;
  }

  .player-search-tray {
    margin-top: -2px;
  }

  .player-search-input {
    min-height: 50px;
  }
}
