/* ============================================================
   ALBERTINE MUSIC — "Stream. Discover. Download."
   Design system: clean white + red, premium commercial feel.
   ------------------------------------------------------------
   Palette (do not change — brand contract):
   Main bg #FFFFFF · Secondary bg #F7F7F7 · Cards #FFFFFF
   Borders #E5E5E5 · Text #111111 · Muted #666666
   Accent #E50914 · Accent hover #B80710 · Light red #FFF0F1
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --bg: #FFFFFF;
  --bg-2: #F7F7F7;
  --card: #FFFFFF;
  --border: #E5E5E5;
  --border-strong: #D4D4D4;
  --text: #111111;
  --muted: #666666;
  --muted-2: #8A8A8A;
  --accent: #E50914;
  --accent-hover: #B80710;
  --accent-soft: #FFF0F1;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(17, 17, 17, 0.06);
  --shadow-md: 0 4px 14px rgba(17, 17, 17, 0.08);
  --shadow-lg: 0 10px 30px rgba(17, 17, 17, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 64px;
  --player-h: 84px;
  --bnav-h: 58px;
  --maxw: 1280px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 300;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- 3. Layout ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.content {
  min-height: calc(100vh - var(--header-h));
  padding-bottom: 0;
}
main { animation: pageIn 0.35s var(--ease); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  flex-shrink: 0;
}
.logo:hover { color: var(--text); }
.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.logo-mark svg { width: 20px; height: 20px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text b { font-size: 15px; letter-spacing: 0.14em; color: var(--text); }
.logo-text span { font-size: 9.5px; letter-spacing: 0.42em; color: var(--accent); font-weight: 700; margin-top: 2px; }

/* Header/footer logo lockup: stacked text on the LEFT, icon on the RIGHT */
.logo-mark-img {
  height: 46px;
  width: auto;
  display: block;
}
.logo-text b {
  color: #000;
  font-size: 17px;
  letter-spacing: 0.12em;
}
.logo-text span {
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--accent);
}
@media (max-width: 1024px) {
  .logo-mark-img { height: 40px; }
  .logo-text b { font-size: 15px; }
  .logo-text span { font-size: 10px; }
}
@media (max-width: 768px) {
  .logo-mark-img { height: 38px; }
  .logo-text b { font-size: 14px; }
  .logo-text span { font-size: 9.5px; }
}

.main-nav { display: flex; gap: 2px; flex: 1; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: var(--radius-full);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.nav-link svg { width: 17px; height: 17px; }
.nav-link:hover { background: var(--bg-2); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: all 0.18s var(--ease);
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.icon-btn svg { width: 18px; height: 18px; }

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}
.header-search input {
  width: 0;
  opacity: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  height: 40px;
  font-size: 14px;
  transition: width 0.28s var(--ease), opacity 0.22s var(--ease), padding 0.28s var(--ease);
}
.header-search.open input {
  width: 220px;
  opacity: 1;
  padding: 0 38px 0 16px;
}
.header-search .icon-btn { position: absolute; right: 0; top: 0; }

/* ---------- 5. Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--bg) 62%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 24px 56px;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  max-width: 720px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  margin-top: 14px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--muted);
  max-width: 560px;
}
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 44px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.stat-num { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.stat-num span { color: var(--accent); }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- 6. Sections ---------- */
.section { margin-top: 44px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-title { font-size: 22px; }
.view-all {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.view-all:hover { color: var(--accent-hover); }
.view-all svg { width: 15px; height: 15px; }

.page-head { padding: 36px 0 6px; }
.page-head h1 { font-size: clamp(28px, 3.6vw, 38px); }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 640px; }

/* ---------- 7. Grids ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 20px;
}
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-news { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---------- 8. Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.card-media { position: relative; overflow: hidden; aspect-ratio: 1 / 1; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.card:hover .card-media img { transform: scale(1.045); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.card-title:hover { color: var(--accent); }
.card-sub {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-sub a { color: var(--muted); }
.card-sub a:hover { color: var(--accent); }
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.duration { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.plays { font-size: 12px; color: var(--muted-2); display: inline-flex; align-items: center; gap: 4px; }
.plays svg { width: 12px; height: 12px; }
.views { font-size: 12px; color: var(--muted-2); display: inline-flex; align-items: center; gap: 4px; }
.views svg { width: 12px; height: 12px; }

/* Play overlay on hover */
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 17, 17, 0.28);
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}
.card:hover .play-overlay, .play-overlay:focus-within { opacity: 1; }
.play-overlay .play-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.85);
  transition: transform 0.22s var(--ease), background 0.18s var(--ease);
}
.play-overlay .play-btn:hover { background: var(--accent-hover); transform: scale(1); }
.play-overlay .play-btn svg { width: 22px; height: 22px; }

/* Download mini-button on song card */
.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: all 0.16s var(--ease);
}
.dl-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.dl-btn svg { width: 14px; height: 14px; }
.dl-btn.playing { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 9. Artist cards — FULL RECTANGULAR, SHARP CORNERS ---------- */
.artist-card { overflow: hidden; }
.artist-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-2);
}
.artist-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* sharp corners — brand contract */
  transition: transform 0.4s var(--ease);
}
.artist-card:hover .artist-img img { transform: scale(1.045); }
.artist-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,17,17,0) 55%, rgba(17,17,17,0.55) 100%);
  pointer-events: none;
}
.artist-img .artist-name-on {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  z-index: 2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.artist-body { padding: 12px 14px 14px; }
.artist-pop { font-size: 13px; color: var(--muted); }
.view-artist {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.view-artist:hover { color: var(--accent-hover); }

/* ---------- 10. Song rows (tracklists) ---------- */
.song-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--card); }
.song-row {
  display: grid;
  grid-template-columns: 44px 52px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s var(--ease);
}
.song-row:last-child { border-bottom: none; }
.song-row:hover { background: var(--bg-2); }
.song-row .row-num { font-size: 13px; color: var(--muted-2); font-variant-numeric: tabular-nums; text-align: right; }
.song-row.playing .row-num { color: var(--accent); font-weight: 800; }
.song-row .row-cover {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.song-row .row-cover img { width: 100%; height: 100%; object-fit: cover; }
.song-row .row-info { min-width: 0; }
.song-row .row-title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.song-row .row-title a { color: var(--text); }
.song-row .row-title a:hover { color: var(--accent); }
.song-row .row-artist { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-row .row-artist a { color: var(--muted); }
.song-row .row-artist a:hover { color: var(--accent); }
.song-row .row-dur { font-size: 13px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.song-row .row-actions { display: flex; gap: 8px; }

/* ---------- 11. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
  transition: all 0.18s var(--ease);
  text-decoration: none;
}
.btn svg { width: 17px; height: 17px; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: var(--card); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- 12. Chips / filters ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.chip {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.16s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 13. Detail pages ---------- */
.detail-top {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: end;
  margin-top: 18px;
}
.detail-cover {
  width: 300px;
  height: 300px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover .play-overlay { opacity: 1; background: transparent; }
.detail-cover .play-overlay .play-btn { transform: scale(1); opacity: 0.95; }
.detail-cover:hover .play-overlay .play-btn { opacity: 1; }
.detail-type { font-size: 12px; font-weight: 800; letter-spacing: 0.18em; color: var(--accent); text-transform: uppercase; }
.detail-title { font-size: clamp(30px, 4vw, 46px); margin-top: 8px; letter-spacing: -0.02em; }
.detail-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: 14px; }
.detail-meta b { color: var(--text); font-weight: 700; }
.detail-meta a { color: var(--muted); font-weight: 700; }
.detail-meta a:hover { color: var(--accent); }
.detail-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

/* Artist banner — large full rectangular image, sharp corners */
.artist-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 7;
  min-height: 480px; /* keep the name overlay inside the image even if aspect-ratio is unsupported */
  overflow: hidden;
  background: var(--bg-2);
  border-radius: 0; /* sharp corners — brand contract */
}
.artist-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.artist-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17,17,17,0) 40%, rgba(17,17,17,0.72) 100%);
}
.artist-banner .artist-overlay-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 0 0 18px;
}
.artist-banner .artist-overlay-name h1 { color: #fff; font-size: clamp(30px, 4.5vw, 48px); text-shadow: 0 2px 12px rgba(0,0,0,0.45); }
.artist-banner .artist-overlay-name .genre-tag { color: #fff; opacity: 0.85; font-size: 14px; letter-spacing: 0.12em; margin-top: 4px; }

/* Artist profile — name inside the circular photo, genre below it on the banner */
.artist-head-row { display: flex; align-items: flex-end; }
.artist-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.artist-avatar {
  position: relative;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 5px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  background: var(--bg-2);
}
.artist-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artist-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.75) 100%);
}
.artist-avatar-text {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.65);
}
.artist-avatar-name { font-weight: 800; font-size: 28px; line-height: 1.1; letter-spacing: -0.01em; }
.artist-avatar-genre {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.95;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
@media (max-width: 768px) {
  .artist-avatar { width: 220px; height: 220px; border-width: 4px; }
  .artist-avatar-name { font-size: 21px; }
  .artist-avatar-genre { font-size: 12px; }
}
@media (max-width: 380px) {
  .artist-avatar { width: 180px; height: 180px; }
  .artist-avatar-name { font-size: 17px; }
  .artist-avatar-genre { font-size: 11px; }
}

.detail-desc { margin-top: 26px; max-width: 760px; color: var(--muted); line-height: 1.7; }
.detail-section { margin-top: 36px; }
.detail-section h2 { font-size: 20px; margin-bottom: 14px; }

/* Lyrics */
.lyrics-box {
  margin-top: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  white-space: pre-line;
  color: var(--text);
  line-height: 1.85;
  max-width: 760px;
}

/* Stats on song page */
.song-stats { display: flex; gap: 34px; margin-top: 20px; flex-wrap: wrap; }
.song-stat b { display: block; font-size: 22px; color: var(--text); }
.song-stat span { font-size: 12.5px; color: var(--muted); }

/* Article page */
.article-hero img {
  width: 100%;
  border-radius: var(--radius-md);
  max-height: 460px;
  object-fit: cover;
  margin-top: 22px;
}
.article-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin-top: 14px; }
.article-tag { background: var(--accent-soft); color: var(--accent); font-weight: 700; padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; }
.article-body { max-width: 780px; }
.article-body p { margin-top: 18px; font-size: 16.5px; line-height: 1.85; color: #2a2a2a; }
.article-body p:first-child::first-letter {
  font-size: 52px;
  font-weight: 800;
  float: left;
  line-height: 0.85;
  padding: 4px 10px 0 0;
  color: var(--accent);
}
.article-author { display: flex; align-items: center; gap: 12px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); }
.article-author .avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
}

/* News cards */
.news-card .card-media { aspect-ratio: 16 / 9; }
.news-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  z-index: 2;
}
.news-date { font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.news-card .card-body p {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.back-link:hover { color: var(--accent); }
.back-link svg { width: 15px; height: 15px; }

/* ---------- 14. Search page ---------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 8px 6px 20px;
  margin-top: 24px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  max-width: 640px;
}
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-bar svg { width: 18px; height: 18px; color: var(--muted-2); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15.5px;
  padding: 8px 0;
  min-width: 0;
}
.search-count { color: var(--muted); font-size: 13.5px; margin-top: 18px; }
.search-count b { color: var(--accent); }
.result-group { margin-top: 26px; }
.result-group h2 {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.result-group h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px 8px 8px;
  transition: all 0.16s var(--ease);
  color: var(--text);
}
.result-item:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.result-item img { width: 46px; height: 46px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.result-item.artist-result img { border-radius: 0; }
.result-item .ri-info { min-width: 0; }
.result-item .ri-title { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-item .ri-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.no-results {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}
.no-results svg { width: 56px; height: 56px; color: var(--border-strong); margin: 0 auto 16px; display: block; }
.no-results h2 { font-size: 20px; color: var(--text); margin-bottom: 6px; }

/* ---------- 15. Player ---------- */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(17, 17, 17, 0.08);
}
.player-progress-line {
  height: 4px;
  background: var(--bg-2);
  cursor: pointer;
  position: relative;
}
.player-progress-line .p-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s linear;
}
.player-progress-line:hover .p-fill { background: var(--accent-hover); }
.player-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 24px;
  height: var(--player-h);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}
.p-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.p-art {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.p-art img { width: 100%; height: 100%; object-fit: cover; }
.p-art.playing::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  animation: pulseRing 2.4s ease-out infinite;
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.35); }
  70% { box-shadow: 0 0 0 8px rgba(229, 9, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}
.p-info { min-width: 0; }
.p-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.p-title a { color: var(--text); }
.p-title a:hover { color: var(--accent); }
.p-artist { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-artist a { color: var(--muted); }
.p-artist a:hover { color: var(--accent); }

.p-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: min(460px, 44vw);
}
.p-controls { display: flex; align-items: center; gap: 6px; }
.p-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s var(--ease);
}
.p-btn:hover { color: var(--accent); background: var(--accent-soft); }
.p-btn svg { width: 19px; height: 19px; }
.p-btn.active { color: var(--accent); }
.p-btn.active svg { fill: var(--accent); }
.p-play {
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s var(--ease);
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.35);
}
.p-play:hover { background: var(--accent-hover); transform: scale(1.06); }
.p-play svg { width: 20px; height: 20px; }
.p-time { display: flex; gap: 10px; align-items: center; width: 100%; font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.p-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-2);
  cursor: pointer;
  position: relative;
}
.p-bar .p-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: var(--accent);
  width: 0%;
  transition: width 0.12s linear;
}
.p-bar:hover .p-fill { background: var(--accent-hover); }

.p-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.p-dl, .p-queue {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s var(--ease);
}
.p-dl:hover, .p-queue:hover { color: var(--accent); background: var(--accent-soft); }
.p-dl svg, .p-queue svg { width: 18px; height: 18px; }
.volume-wrap { display: flex; align-items: center; gap: 6px; }
.volume-wrap .v-btn {
  width: 32px; height: 32px;
  border: none; background: transparent;
  color: var(--text);
  border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
}
.volume-wrap .v-btn:hover { color: var(--accent); }
.volume-wrap .v-btn svg { width: 18px; height: 18px; }
.vol-input {
  width: 84px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--bg-2);
  border-radius: 2px;
  cursor: pointer;
}
.vol-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}
.vol-input::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

/* Queue panel */
.queue-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  top: var(--header-h);
  width: 360px;
  max-width: 92vw;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 140;
  transform: translateX(105%);
  transition: transform 0.28s var(--ease);
  display: flex;
  flex-direction: column;
}
.queue-panel.open { transform: translateX(0); }
.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.queue-head h3 { font-size: 17px; }
.queue-list { overflow-y: auto; flex: 1; padding: 8px 0; }
.queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 20px;
  cursor: pointer;
  transition: background 0.14s var(--ease);
}
.queue-item:hover { background: var(--bg-2); }
.queue-item.playing { background: var(--accent-soft); }
.queue-item img { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.queue-item .qi-info { min-width: 0; flex: 1; }
.queue-item .qi-title { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item .qi-artist { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item .qi-dur { font-size: 12px; color: var(--muted-2); }
.queue-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- 16. Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), visibility 0.22s;
}
.modal-backdrop.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  width: 460px;
  max-width: 100%;
  max-height: 82vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s var(--ease);
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 17px; }
.modal-close {
  width: 34px; height: 34px;
  border: none;
  background: var(--bg-2);
  color: var(--text);
  border-radius: var(--radius-full);
  font-size: 16px;
  transition: all 0.15s var(--ease);
}
.modal-close:hover { background: var(--accent); color: #fff; }
.modal-body { padding: 20px 22px; }
.pl-create {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.pl-create input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 9px 16px;
  outline: none;
  transition: border-color 0.16s;
}
.pl-create input:focus { border-color: var(--accent); }
.pl-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.pl-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.pl-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.pl-item img { width: 40px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; }
.pl-item .pli-name { font-weight: 700; font-size: 14px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item .pli-count { font-size: 12px; color: var(--muted-2); }
.pl-item .pli-check { color: var(--accent); }
.pl-item.in-playlist { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- 17. Toasts ---------- */
.toast-wrap {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.28s var(--ease);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast svg { width: 16px; height: 16px; color: #4ade80; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 18. Not found states ---------- */
.notfound {
  text-align: center;
  padding: 60px 20px;
}
.notfound-code {
  font-size: clamp(72px, 12vw, 120px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
}
.notfound h1 { font-size: clamp(22px, 3vw, 30px); margin-top: 8px; }
.notfound p { color: var(--muted); margin-top: 10px; max-width: 420px; margin-left: auto; margin-right: auto; }
.notfound .notfound-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* ---------- 19. Footer ---------- */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 44px 0 30px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer-brand p { color: var(--muted); font-size: 13.5px; margin-top: 12px; max-width: 260px; }
.footer-col h4 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 34px;
  padding-top: 20px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12.5px;
}
.footer-bottom b { color: var(--accent); }

/* ---------- 20. Mobile bottom navigation ---------- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 140;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: none;
  height: var(--bnav-h);
}
.bn-inner { display: grid; grid-template-columns: repeat(5, 1fr); height: 100%; }
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  border: none;
  background: none;
  transition: color 0.15s var(--ease);
  padding: 0;
}
.bn-item svg { width: 21px; height: 21px; }
.bn-item.active { color: var(--accent); }
.bn-item:hover { color: var(--accent); }

.more-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 180;
  background: var(--bg);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  box-shadow: 0 -10px 40px rgba(17, 17, 17, 0.18);
  transform: translateY(105%);
  transition: transform 0.28s var(--ease);
  padding-bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom));
}
.more-sheet.open { transform: translateY(0); }
.sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 10px auto 6px; }
.sheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-top: 1px solid var(--border);
  transition: background 0.14s;
}
.sheet-item:hover { background: var(--bg-2); color: var(--accent); }
.sheet-item svg { width: 20px; height: 20px; }
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  z-index: 170;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s var(--ease), visibility 0.22s;
}
.sheet-backdrop.open { opacity: 1; visibility: visible; }

/* ---------- 21. Settings ---------- */
.settings-panel {
  max-width: 640px;
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.settings-card h3 { font-size: 15.5px; }
.settings-card p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.settings-card select {
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  background: var(--bg);
  color: var(--text);
  outline: none;
}
.settings-card select:focus { border-color: var(--accent); }
.vol-row { display: flex; align-items: center; gap: 12px; }
.vol-row input[type="range"] { width: 160px; }
.vol-row span { font-size: 13px; color: var(--muted); width: 40px; text-align: right; font-variant-numeric: tabular-nums; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border-strong);
  border-radius: 26px;
  transition: background 0.2s var(--ease);
}
.switch .slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- 22. My Playlists (user playlists) ---------- */
.my-playlist-card { cursor: default; }
.mp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mp-head h3 { font-size: 15px; }
.mp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mp-song {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 8px;
  background: var(--card);
}
.mp-song img { width: 38px; height: 38px; border-radius: var(--radius-sm); object-fit: cover; }
.mp-song .ms-info { flex: 1; min-width: 0; }
.mp-song .ms-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-song .ms-artist { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-danger:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 23. Skeletons ---------- */
.skeleton {
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, var(--bg-2) 25%, #EFEFEF 37%, var(--bg-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.sk-card { height: 240px; }

/* ---------- 24. Toolbar (music page) ---------- */
.toolbar { display: flex; gap: 14px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.toolbar input[type="search"] {
  flex: 1;
  max-width: 360px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.toolbar input[type="search"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Load more */
.load-more-wrap { text-align: center; margin-top: 34px; }

/* ---------- 25. Responsive ---------- */
@media (max-width: 1024px) {
  .main-nav .nav-link span { display: none; }
  .main-nav .nav-link { padding: 9px 12px; }
}
@media (max-width: 900px) {
  .detail-top { grid-template-columns: 220px 1fr; gap: 24px; }
  .detail-cover { width: 220px; height: 220px; }
  .player-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .p-center { display: none; }
  .queue-panel { bottom: 0; top: 0; }
}
@media (max-width: 768px) {
  :root { --player-h: 74px; }
  .container, .header-inner, .footer-inner, .hero-inner { padding-left: 16px; padding-right: 16px; }
  .main-nav { display: none; }
  .header-search.open input { width: 60vw; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .grid-3, .grid-news { grid-template-columns: repeat(2, 1fr); }
  .detail-top { grid-template-columns: 1fr; gap: 18px; }
  .detail-cover { width: 100%; max-width: 300px; height: auto; aspect-ratio: 1; }
  .hero-inner { padding-top: 44px; padding-bottom: 40px; }
  .hero-stats { gap: 28px; }
  .song-row { grid-template-columns: 30px 46px 1fr auto; gap: 10px; padding: 8px 12px; }
  .song-row .row-dur { display: none; }
  .bottom-nav { display: block; }
  /* FIX: Reduced bottom padding for song pages */
  .content { padding-bottom: calc(var(--bnav-h) + 20px); }
  .toast-wrap { bottom: calc(var(--bnav-h) + 12px); }
  .site-footer { padding-bottom: calc(var(--bnav-h) + 24px); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .player { bottom: var(--bnav-h); }
  .queue-panel { bottom: calc(var(--bnav-h) + var(--player-h)); top: auto; max-height: 60vh; }
  .p-dl, .p-queue, .volume-wrap { display: none; }
  .player-inner { height: var(--player-h); padding: 8px 12px; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .p-art { width: 46px; height: 46px; }
  .artist-banner { aspect-ratio: 4 / 3; min-height: 300px; }
  .article-body p { font-size: 15.5px; }
  .settings-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  
  /* FIX: Remove extra space below song player on mobile */
  body[data-page="song"] .content {
    padding-bottom: 10px !important;
    min-height: auto !important;
  }
  
  body[data-page="song"] .player-detail {
    margin: 10px 0 4px !important;
  }
  
  body[data-page="song"] .player-detail + .section {
    margin-top: 12px !important;
  }
  
  /* Hide bottom player on song pages */
  body[data-page="song"] .player {
    display: none !important;
  }
}
@media (max-width: 480px) {
  body { font-size: 14.5px; }
  .grid, .grid-3, .grid-news { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section { margin-top: 34px; }
  .section-title { font-size: 19px; }
  .card-body { padding: 10px 10px 12px; }
  .hero h1 { font-size: 32px; }
  .hero-actions .btn { flex: 1; }
  .detail-actions .btn { flex: 1; }
  .card-title { font-size: 13.5px; }
  .card-sub { font-size: 12px; }
  .result-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .footer-inner { grid-template-columns: 1fr; }
  .logo-text span { display: none; }
  .p-title { font-size: 13px; }
  .p-artist { font-size: 11.5px; }
}

/* ---------- 26. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ============================================================
   CUSTOM FIXES - ALL IN ONE
   ============================================================ */

/* ---------- Hide Genre and View Artist on ALL Artists ---------- */
.artist-pop,
.view-artist {
  display: none !important;
}

/* ---------- Make Artist Images Fill the Space ---------- */
.artist-card .artist-img {
  aspect-ratio: 1 / 1 !important;
}
.artist-card .artist-img img {
  object-fit: cover;
}
.artist-card .artist-body {
  display: none !important;
}

/* ---------- Make Playlists Scroll Horizontally ---------- */
#playlists-grid .grid,
.playlists-grid .grid,
section:has(#playlists-grid) .grid,
#playlists-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  gap: 16px !important;
  padding-bottom: 10px !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch !important;
}
#playlists-grid .grid .card,
#playlists-grid .card,
.playlists-grid .card {
  flex: 0 0 200px !important;
  min-width: 180px !important;
  max-width: 220px !important;
  scroll-snap-align: start !important;
}
#playlists-grid .grid::-webkit-scrollbar,
.playlists-grid::-webkit-scrollbar {
  height: 4px;
}
#playlists-grid .grid::-webkit-scrollbar-track,
.playlists-grid::-webkit-scrollbar-track {
  background: var(--bg-2);
  border-radius: 2px;
}
#playlists-grid .grid::-webkit-scrollbar-thumb,
.playlists-grid::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 2px;
}
#playlists-grid .grid::after,
.playlists-grid::after {
  content: "";
  flex: 0 0 20px;
}

/* ---------- Hide Category on ALL News ---------- */
.news-tag {
  display: none !important;
}

/* ---------- Hide All Meta Info on Song Cards ---------- */
.song-card .card-meta {
  display: none !important;
}
.song-card .card-body {
  padding-bottom: 8px !important;
}

/* ---------- Hide All Meta Info on Mix Cards ---------- */
.mix-card .card-meta {
  display: none !important;
}
.mix-card .card-body {
  padding-bottom: 8px !important;
}

/* ---------- Hide Hero Tag, Buttons, and Stats ---------- */
.hero-tag,
.hero-actions,
.hero-stats {
  display: none !important;
}

/* ---------- Clickable Song Cards ---------- */
.song-card,
.song-row {
  cursor: pointer;
}
.song-card:focus-visible,
.song-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   SONG PLAYER - COMPLETE FIX
   ============================================================ */

/* ---------- Hide Play Buttons on Song Cards ---------- */
.song-card .play-overlay,
.song-card .play-overlay .play-btn,
.song-card .play-btn {
  display: none !important;
}

/* ---------- Hide Play Button on Detail Cover ---------- */
.detail-cover .play-overlay,
.detail-cover .play-overlay .play-btn,
.detail-cover .play-btn {
  display: none !important;
}

/* ---------- Hide Queue, Download, Volume on Player ---------- */
.player-detail .p-queue,
.player-detail .p-dl,
.player-detail .volume-wrap {
  display: none !important;
}

/* ---------- MAIN PLAYER STYLES ---------- */
.player-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 16px 0 6px;
  overflow: hidden;
}

.player-detail .player-progress-line {
  height: 3px;
  cursor: pointer;
  background: var(--bg-2);
  position: relative;
}

.player-detail .player-progress-line .p-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s linear;
}

.player-detail .player-progress-line:hover .p-fill {
  background: var(--accent-hover);
}

.detail-player-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
}

/* ---------- LEFT SECTION (Artwork + Info) ---------- */
.player-detail .p-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 180px;
  min-width: 0;
}

.player-detail .p-art {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.player-detail .p-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-detail .p-info {
  min-width: 0;
}

.player-detail .p-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-detail .p-title a {
  color: var(--text);
}

.player-detail .p-title a:hover {
  color: var(--accent);
}

.player-detail .p-artist {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- CENTER SECTION (Controls + Progress) ---------- */
.dp-controls {
  flex: 2 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.player-detail .p-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player-detail .p-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s var(--ease);
  cursor: pointer;
}

.player-detail .p-btn:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.player-detail .p-btn svg {
  width: 16px;
  height: 16px;
}

.player-detail .p-btn.active {
  color: var(--accent);
}

.player-detail .p-btn.active svg {
  fill: var(--accent);
}

.player-detail .p-play {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s var(--ease);
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.3);
  cursor: pointer;
}

.player-detail .p-play:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.player-detail .p-play svg {
  width: 17px;
  height: 17px;
}

.player-detail .p-time {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  font-size: 10.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.player-detail .p-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--bg-2);
  cursor: pointer;
  position: relative;
}

.player-detail .p-bar .p-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: var(--accent);
  width: 0%;
  transition: width 0.12s linear;
}

.player-detail .p-bar:hover .p-fill {
  background: var(--accent-hover);
}

/* ---------- RIGHT SECTION (Hidden) ---------- */
.player-detail .p-right {
  display: none !important;
}

/* ============================================================
   MOBILE RESPONSIVE FIXES FOR PLAYER
   ============================================================ */

/* ---------- Tablets and Small Laptops ---------- */
@media (max-width: 900px) {
  .player-detail {
    margin: 14px 0 6px;
  }
  
  .detail-player-inner {
    padding: 8px 14px;
    gap: 10px;
  }
  
  .player-detail .p-art {
    width: 42px;
    height: 42px;
  }
  
  .player-detail .p-title {
    font-size: 12.5px;
  }
  
  .player-detail .p-artist {
    font-size: 11px;
  }
  
  .dp-controls {
    flex: 1 1 200px;
  }
}

/* ---------- Mobile Phones ---------- */
@media (max-width: 768px) {
  .player-detail {
    margin: 10px 0 4px;
    border-radius: var(--radius-sm);
  }
  
  .detail-player-inner {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  
  /* Left section */
  .player-detail .p-left {
    flex: 1 1 100%;
    gap: 10px;
  }
  
  .player-detail .p-art {
    width: 38px;
    height: 38px;
  }
  
  .player-detail .p-title {
    font-size: 12px;
  }
  
  .player-detail .p-artist {
    font-size: 10.5px;
  }
  
  /* Controls section */
  .dp-controls {
    flex: 1 1 100%;
    gap: 4px;
  }
  
  .player-detail .p-controls {
    gap: 2px;
  }
  
  .player-detail .p-btn {
    width: 28px;
    height: 28px;
  }
  
  .player-detail .p-btn svg {
    width: 14px;
    height: 14px;
  }
  
  .player-detail .p-play {
    width: 32px;
    height: 32px;
  }
  
  .player-detail .p-play svg {
    width: 15px;
    height: 15px;
  }
  
  .player-detail .p-time {
    font-size: 10px;
    gap: 6px;
  }
}

/* ---------- Very Small Phones ---------- */
@media (max-width: 480px) {
  .player-detail {
    margin: 8px 0 3px;
    border-radius: var(--radius-sm);
  }
  
  .detail-player-inner {
    padding: 6px 10px;
    gap: 6px;
  }
  
  .player-detail .p-left {
    gap: 8px;
  }
  
  .player-detail .p-art {
    width: 32px;
    height: 32px;
  }
  
  .player-detail .p-title {
    font-size: 11px;
  }
  
  .player-detail .p-artist {
    font-size: 10px;
  }
  
  .player-detail .p-btn {
    width: 24px;
    height: 24px;
  }
  
  .player-detail .p-btn svg {
    width: 12px;
    height: 12px;
  }
  
  .player-detail .p-play {
    width: 28px;
    height: 28px;
  }
  
  .player-detail .p-play svg {
    width: 13px;
    height: 13px;
  }
  
  .player-detail .p-time {
    font-size: 9px;
    gap: 4px;
  }
  
  .player-detail .p-bar {
    height: 2px;
  }
  
  .player-detail .player-progress-line {
    height: 2px;
  }
}

/* ---------- Landscape Mode on Phones ---------- */
@media (max-width: 768px) and (orientation: landscape) {
  .player-detail {
    margin: 6px 0 3px;
  }
  
  .detail-player-inner {
    padding: 6px 12px;
    gap: 6px;
  }
  
  .player-detail .p-art {
    width: 32px;
    height: 32px;
  }
  
  .player-detail .p-title {
    font-size: 11px;
  }
  
  .player-detail .p-artist {
    font-size: 10px;
  }
  
  .player-detail .p-btn {
    width: 24px;
    height: 24px;
  }
  
  .player-detail .p-btn svg {
    width: 12px;
    height: 12px;
  }
  
  .player-detail .p-play {
    width: 28px;
    height: 28px;
  }
  
  .player-detail .p-play svg {
    width: 13px;
    height: 13px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .player-detail .p-play:hover {
    transform: none !important;
  }
}

/* Hide Play and Add to Playlist buttons on song detail page */
.detail-actions .btn-accent[data-action="play"],
.detail-actions .btn-outline[data-action="add-pl"] {
  display: none !important;
}

.detail-actions .btn-outline[data-action="download"] {
  border: none !important;
}

/* ============================================================
   SONG PAGE LAYOUT — Cover → Player → Download/Share → Info
   ============================================================ */

/* Cover block (top of the song page) */
body[data-page="song"] .song-cover-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

body[data-page="song"] .detail-cover {
  width: min(320px, 100%);
  height: auto;
  aspect-ratio: 1;
}

/* Download + Share row, directly under the player */
.song-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Title / artist / stats block (directly under the cover) */
.song-info-body {
  margin-top: 14px;
}

@media (max-width: 480px) {
  .song-actions-row .btn {
    flex: 1;
  }
}

/* ============================================================
   SPINNING PLAY BUTTON (loading state)
   ============================================================ */

@keyframes albSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.player-detail .p-play.loading {
  animation: albSpin 0.8s linear infinite;
  opacity: 0.55;
  pointer-events: none;
}

/* ============================================================
   30. Responsive polish — fits all screen sizes
   (desktop, tablet, mobile)
   ============================================================ */

/* No horizontal scrolling ever */
html,
body {
  overflow-x: clip;
}

/* never let images or layout blocks blow past the viewport */
img {
  max-width: 100%;
}
.container,
.header-inner,
.detail-top,
.dp-controls,
.p-left,
.song-info-body,
.song-actions-row,
.song-cover-wrap {
  min-width: 0;
}

/* long headings / lyrics / results wrap instead of overflowing */
.section-head {
  flex-wrap: wrap;
  gap: 8px 14px;
}
.detail-actions {
  flex-wrap: wrap;
}
.detail-title,
.card-title,
.hero h1,
.lyrics-box,
.detail-desc,
.section-title,
.result-item {
  overflow-wrap: break-word;
}
.song-row .row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* tighter header on tablets so the wider logo never crowds the nav */
@media (max-width: 1100px) {
  .header-inner {
    gap: 12px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .nav-link {
    padding: 9px 10px;
  }
}

/* extra-small phones */
@media (max-width: 380px) {
  .grid,
  .grid-3,
  .grid-news {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .song-row {
    grid-template-columns: 26px 42px 1fr auto;
    gap: 8px;
    padding: 8px 10px;
  }
  .logo-mark-img {
    height: 34px;
  }
}

/* ============================================================
   31. Artist page — All Tracks list (medium covers)
   ============================================================ */
#artist-tracks {
  border: none;
  border-radius: 0;
  background: transparent;
}
#artist-tracks .song-row {
  grid-template-columns: 34px 64px 1fr;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: none;
}
/* no play button, no song length, no download button on these rows */
#artist-tracks .row-dur,
#artist-tracks .row-actions {
  display: none;
}
/* "Load More" button under the tracks, aligned right */
.load-more-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.load-more-wrap[hidden] {
  display: none;
}
#artist-tracks .row-cover,
#artist-tracks .row-cover img {
  width: 64px;
  height: 64px;
}
@media (max-width: 768px) {
  #artist-tracks .song-row {
    grid-template-columns: 28px 60px 1fr;
    gap: 10px;
  }
  #artist-tracks .row-cover,
  #artist-tracks .row-cover img {
    width: 60px;
    height: 60px;
  }
}
@media (max-width: 380px) {
  #artist-tracks .song-row {
    grid-template-columns: 24px 54px 1fr;
    gap: 8px;
  }
  #artist-tracks .row-cover,
  #artist-tracks .row-cover img {
    width: 54px;
    height: 54px;
  }
}

/* ============================================================
   32. Hot 100 tracklist + Videos page
   ============================================================ */
#hot100-list,
#todays-hits-list,
#new-releases-list {
  border: none;
  border-radius: 0;
  background: transparent;
}
#hot100-list .song-row,
#todays-hits-list .song-row,
#new-releases-list .song-row {
  grid-template-columns: 34px 64px 1fr;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: none;
}
/* clean tracklist: no play button, no duration, no download */
#hot100-list .row-dur,
#hot100-list .row-actions,
#todays-hits-list .row-dur,
#todays-hits-list .row-actions,
#new-releases-list .row-dur,
#new-releases-list .row-actions {
  display: none;
}
#hot100-list .row-cover,
#hot100-list .row-cover img,
#todays-hits-list .row-cover,
#todays-hits-list .row-cover img,
#new-releases-list .row-cover,
#new-releases-list .row-cover img {
  width: 64px;
  height: 64px;
}
@media (max-width: 768px) {
  #hot100-list .song-row,
  #todays-hits-list .song-row,
  #new-releases-list .song-row {
    grid-template-columns: 28px 60px 1fr;
    gap: 10px;
  }
  #hot100-list .row-cover,
  #hot100-list .row-cover img,
  #todays-hits-list .row-cover,
  #todays-hits-list .row-cover img,
  #new-releases-list .row-cover,
  #new-releases-list .row-cover img {
    width: 60px;
    height: 60px;
  }
}
@media (max-width: 380px) {
  #hot100-list .song-row,
  #todays-hits-list .song-row,
  #new-releases-list .song-row {
    grid-template-columns: 24px 54px 1fr;
    gap: 8px;
  }
  #hot100-list .row-cover,
  #hot100-list .row-cover img,
  #todays-hits-list .row-cover,
  #todays-hits-list .row-cover img,
  #new-releases-list .row-cover,
  #new-releases-list .row-cover img {
    width: 54px;
    height: 54px;
  }
}

/* Videos page cards */
.video-card {
  cursor: pointer;
}
.video-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.video-card .play-btn {
  pointer-events: none;
}

/* ============================================================
   33. Static pages (About / Contact / Privacy Policy)
   ============================================================ */
.static-body {
  max-width: 760px;
}
.static-body h2 {
  font-size: 18px;
  margin: 26px 0 8px;
}
.static-body p,
.static-body li {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 10px;
}
.static-body ul {
  padding-left: 20px;
}
.static-body a {
  color: var(--accent);
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-top: 18px;
}

/* ============================================================
   34. Homepage hero banner
   ============================================================ */
/* clean white hero — the banner is a direct child of the hero section
   and fills 100% of its width, so it can never sit to one side */
.hero {
  background: #fff;
  border-bottom: none;
  padding: 0;
}
.hero-picture {
  display: block;
  /* span the real viewport width (under the scrollbar too) so no
     gap ever shows on the right; overflow-x: clip keeps it clean */
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.hero-banner {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}
.hero-inner {
  max-width: none;
  padding: 0;
}
/* the banner carries the brand name — keep the h1 in the DOM for
   screen readers / SEO but don't duplicate it visually */
.hero h1 {
  display: none;
}


/* ---- App download page ---- */
.app-download { max-width: 720px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.app-card {
  display: flex;
  gap: 22px;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  margin: 24px 0;
}
.app-icon { width: 96px; height: 96px; border-radius: 20px; flex-shrink: 0; }
.app-info h2 { margin: 0 0 6px; font-size: 22px; }
.app-info p { margin: 0 0 12px; color: var(--muted); }
.app-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; font-size: 13px; color: var(--muted-2); }
.app-btn { margin-top: 4px; }
.app-steps-title { margin: 28px 0 10px; font-size: 18px; }
.app-steps { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 10px; }
.app-note { font-size: 13px; color: var(--muted); }
@media (max-width: 480px) {
  .app-card { flex-direction: column; text-align: center; align-items: center; }
  .app-meta { justify-content: center; }
}

/* App page — dual install options */
.app-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
@media (max-width: 480px) {
  .app-btns { flex-direction: column; align-items: stretch; }
  .app-btns .app-btn { text-align: center; }
}
