* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0b1627;
  --bg2: #0e1c32;
  --surface: #111e35;
  --surface2: #162540;
  --surface3: #1c2e4a;
  --accent: #00aeb8 !important;
  --accent-glow: rgba(0, 174, 184, 0.18);
  --accent-dim: rgba(0, 174, 184, 0.12);
  --text: #e8edf5;
  --text-muted: #7a92b4;
  --text-faint: #4a6080;
  --border: rgba(0, 174, 184, 0.12);
  --border2: rgba(255, 255, 255, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 50px;
}

body {
  background: var(--bg);
  color: var(--text);
}

/* ── BG AMBIENT ── */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      ellipse 600px 400px at 80% -10%,
      rgba(0, 174, 184, 0.07) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 400px 300px at -10% 60%,
      rgba(0, 100, 180, 0.05) 0%,
      transparent 70%
    );
}

/* ── LAYOUT ── */
.page {
  position: relative;
  z-index: 1;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 28px 60px;
}

/* ── HEADER ── */
header {
  padding: 48px 0 32px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 174, 184, 0.22);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}
.heading {
  font-size: 3rem;
  font-weight: 600;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #a8d8dc 60%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: normal;
}
h1 {
  font-size: 3rem;
  font-weight: 600;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #a8d8dc 60%,
    var(--accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: normal;
  /* letter-spacing: -1px; */
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 400;
}


.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
  transition: color 0.2s;
}

#searchInput {
  width: 320px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 13px 20px 13px 46px;
  color: var(--text);
  font-size: 13px;

  font-weight: 400;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

#searchInput::placeholder {
  color: var(--text-faint);
}

#searchInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

#searchInput:focus + .search-icon-wrap .search-icon {
  color: var(--accent);
}

/* ── STATS ROW ── */
.stats-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 120px;
  transition:
    border-color 0.2s,
    transform 0.2s;
}

.stat-card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.stat-val {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ── FILTER BAR ── */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 12px;
  z-index: 50;
  backdrop-filter: blur(12px);
  margin-bottom: 20px;
}

.filter-section {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;

  cursor: pointer;
  border: 1.5px solid rgba(0, 174, 184, 0.18);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.18s;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b1627;
  font-weight: 600;
}

.divider {
  width: 1px;
  height: 28px;
  background: var(--border2);
  flex-shrink: 0;
}

.right-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-sel {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: #fff;
  font-size: 12px;

  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.sort-sel option {
  background: var(--surface2);
}

.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1px solid var(--border);
}

.vbtn {
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-muted);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vbtn.active {
  background: var(--accent);
  color: #0b1627;
}

.vbtn svg {
  width: 14px;
  height: 14px;
}

/* ── RESULTS INFO ── */
.results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.results-row strong {
  color: var(--text);
  font-weight: 600;
}

.active-filter-tag {
  background: var(--accent-dim);
  border: 1px solid rgba(0, 174, 184, 0.25);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}

/* ── TABLE VIEW ── */
.table-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border2);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--surface2);
}

thead th {
  padding: 12px 16px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  text-align: left;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border2);
  white-space: nowrap;
}

.th-num {
  width: 50px;
  text-align: center;
}

.th-art {
  width: 56px;
}

.th-dur {
  width: 80px;
  text-align: right;
}

.th-yr {
  width: 70px;
}

.th-pop {
  width: 80px;
}

.th-act {
  width: 48px;
  text-align: center;
}

tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  transition: background 0.15s;
  cursor: pointer;
}

tbody tr:hover {
  background: rgba(0, 174, 184, 0.05);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr.playing-row {
  background: rgba(0, 174, 184, 0.07);
}

td {
  padding: 11px 16px;
  vertical-align: middle;
}

.td-num {
  text-align: center;
}

.num-text {
  font-size: 13px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.playing-row .num-text {
  display: none;
}

.wave {
  display: none;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 16px;
}

.playing-row .wave {
  display: flex;
}

.bar {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: wave 1s ease-in-out infinite;
}

.bar:nth-child(1) {
  animation-delay: 0s;
  animation-name: wave1;
}

.bar:nth-child(2) {
  animation-delay: 0.15s;
  animation-name: wave2;
}

.bar:nth-child(3) {
  animation-delay: 0.3s;
  animation-name: wave3;
}

@keyframes wave1 {
  0%,
  100% {
    height: 4px;
  }

  50% {
    height: 14px;
  }
}

@keyframes wave2 {
  0%,
  100% {
    height: 10px;
  }

  50% {
    height: 4px;
  }
}

@keyframes wave3 {
  0%,
  100% {
    height: 6px;
  }

  50% {
    height: 12px;
  }
}

.td-art {
  position: relative;
}

.art-box {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.15s;
}

tbody tr:hover .art-box {
  transform: scale(1.04);
}

.play-over {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.15s;
}

tbody tr:hover .play-over {
  opacity: 1;
}

.play-over svg {
  width: 14px;
  height: 14px;
  fill: var(--accent);
}

.song-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.playing-row .song-name {
  color: var(--accent);
}

.song-album {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
  font-weight: 400;
}

.artist-name {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
}

.artist-name:hover {
  color: var(--accent);
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.b-album {
  background: rgba(0, 174, 184, 0.12);
  color: #4dd8e0;
  border: 1px solid rgba(0, 174, 184, 0.2);
}

.b-single {
  background: rgba(130, 100, 220, 0.14);
  color: #b498f0;
  border: 1px solid rgba(130, 100, 220, 0.2);
}

.b-ost {
  background: rgba(240, 160, 60, 0.12);
  color: #f0b84d;
  border: 1px solid rgba(240, 160, 60, 0.2);
}

.b-remix {
  background: rgba(220, 80, 120, 0.12);
  color: #f07fb8;
  border: 1px solid rgba(220, 80, 120, 0.2);
}

.b-ep {
  background: rgba(80, 180, 100, 0.14);
  color: #7dd98a;
  border: 1px solid rgba(80, 180, 100, 0.22);
}

.yr-cell {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 400;
}

.dur-cell {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
}

.pop-cell {
  padding-right: 20px;
}

.pop-bar-bg {
  height: 3px;
  background: var(--surface3);
  border-radius: 2px;
  width: 60px;
}

.pop-bar {
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s;
}

.menu-btn {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  width: 30px;
  height: 30px;
}

.menu-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

/* ── GRID VIEW ── */
.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 174, 184, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.card.playing-card {
  border-color: var(--accent);
}

.card-art {
  width: 100%;
  aspect-ratio: 1;
  font-size: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  position: relative;
  overflow: hidden;
}

.card-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 100%,
    rgba(0, 174, 184, 0.08),
    transparent 60%
  );
}

.card-play-over {
  position: absolute;
  inset: 0;
  background: rgba(11, 22, 39, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover .card-play-over {
  opacity: 1;
}

.card-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.card:hover .card-play-btn {
  transform: scale(1.05);
}

.card-play-btn svg {
  width: 16px;
  height: 16px;
  fill: #0b1627;
  margin-left: 2px;
}

.card-body {
  padding: 12px 14px 14px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.playing-card .card-title {
  color: var(--accent);
}

.card-artist {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
}

.card-dur {
  font-size: 10px;
  color: var(--text-faint);
  font-weight: 500;
}

/* ── PLAYING BAR ── */
.now-playing-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(14, 28, 50, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 174, 184, 0.18);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.now-playing-bar.visible {
  transform: translateY(0);
}

.np-art {
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.np-info {
  flex: 1;
  min-width: 0;
}

.np-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-artist {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.np-progress {
  flex: 2;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.progress-bar {
  height: 3px;
  background: var(--surface3);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 35%;
  transition: width 0.1s linear;
}

.np-times {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-faint);
}

.np-close {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: color 0.15s;
}

.np-close:hover {
  color: var(--text);
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.empty-emoji {
  font-size: 56px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.empty-reset {
  margin-top: 20px;
  background: transparent;
  border: 1.5px solid rgba(0, 174, 184, 0.3);
  color: var(--accent);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 13px;

  font-weight: 500;
  transition: all 0.18s;
}

.empty-reset:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

/* ── LOAD MORE ── */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 28px 0 0;
}

.load-more {
  background: transparent;
  border: 1.5px solid rgba(0, 174, 184, 0.28);
  color: var(--accent);
  padding: 11px 32px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 13px;

  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.load-more:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.load-more svg {
  width: 14px;
  height: 14px;
  stroke: var(--accent);
  fill: none;
}

/* ── SKELETON ── */
.skel {
  background: linear-gradient(
    90deg,
    var(--surface) 25%,
    var(--surface2) 50%,
    var(--surface) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  display: inline-block;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .th-pop,
  .td-pop,
  .th-yr,
  .td-yr {
    display: none;
  }

  #searchInput {
    width: 240px;
  }
}

@media (max-width: 640px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 0 20px;
  }

  #searchInput {
    width: 100%;
  }

  .search-wrap {
    width: 100%;
  }

  .th-dur,
  .td-dur {
    display: none;
  }

  .now-playing-bar {
    padding: 12px 16px;
  }

  .np-progress {
    display: none;
  }
}
