:root {
  --bg: #0a0c12;
  --card: #11141d;
  --card2: #161a26;
  --line: #232838;
  --text: #eef1f8;
  --muted: #7d8496;
  --muted2: #aab1c2;
  --headbg: rgba(10,12,18,.9);
  --brand: linear-gradient(135deg, #22d3ee, #a855f7, #f59e0b);
}
html[data-theme="light"] {
  --bg: #f2f3f7;
  --card: #ffffff;
  --card2: #f7f8fb;
  --line: #e2e5ee;
  --text: #14161f;
  --muted: #868da1;
  --muted2: #565d70;
  --headbg: rgba(255,255,255,.9);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
  transition: background .3s ease, color .3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body[dir="rtl"] { direction: rtl; }
a { color: #22d3ee; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.container { max-width: 1180px; margin: 0 auto; width: 100%; }
.site-main { flex: 1; padding: 0 15px 90px; transition: opacity .15s ease; }
.site-main.is-navigating { opacity: .5; }
.page-section { padding-top: 18px; }

/* ===== Top bar ===== */
.site-header {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: var(--headbg); backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.03);
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; color: var(--text); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--brand);
  display: grid; place-items: center; color: #0a0c12; font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 14px rgba(34,211,238,.25);
}
.brand-text { font-weight: 700; font-size: 15px; letter-spacing: .1em; }
.brand-accent { background: linear-gradient(90deg, #22d3ee, #a855f7); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Install */
.install-btn {
  display: inline-grid; width: 40px; height: 36px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--line); cursor: pointer; flex: none; padding: 0;
  place-items: center; position: relative; color: var(--muted2);
  transition: color .16s ease, background .16s ease, border-color .2s ease;
}
.install-btn:hover, .install-btn:focus-visible { color: var(--text); background: var(--card2); border-color: #a855f7; outline: none; }
.install-btn:active { transform: scale(.92); }
.install-btn[hidden] { display: none; }
.install-icon { width: 17px; height: 17px; color: currentColor; pointer-events: none; }

/* Install nav item */
.install-nav-item { color: #a855f7; font-weight: 600; }
.install-nav-item[hidden] { display: none; }

/* Search */
.search-toggle {
  display: inline-grid; width: 40px; height: 36px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--line); cursor: pointer; flex: none; padding: 0;
  place-items: center; position: relative; color: var(--muted2);
  transition: color .16s ease, background .16s ease, border-color .2s ease;
}
.search-toggle:hover, .search-toggle:focus-visible { color: var(--text); background: var(--card2); border-color: #22d3ee; outline: none; }
.search-toggle:active { transform: scale(.92); }
.search-icon { width: 16px; height: 16px; color: currentColor; pointer-events: none; }

/* Search modal */
.search-modal {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
}
.search-modal[hidden] { display: none; }
.search-modal-backdrop {
  position: absolute; inset: 0; background: rgba(5,7,12,.6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.search-modal-panel {
  position: relative; width: min(640px, 92vw);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.search-modal-form {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.search-modal-icon {
  width: 18px; height: 18px; flex: none; color: var(--muted); pointer-events: none;
}
.search-modal-form input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px; font-family: inherit;
}
.search-modal-form input::placeholder { color: var(--muted); }
.search-modal-close {
  flex: none; width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  background: var(--card2); border: 1px solid var(--line); color: var(--muted);
  font-size: 14px; line-height: 1; display: grid; place-items: center;
}
.search-modal-close:hover { color: var(--text); }
.search-modal-list {
  max-height: 60vh; overflow-y: auto; padding: 6px;
}
.suggestion-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: var(--text); text-decoration: none; cursor: pointer;
}
.suggestion-item.is-active, .suggestion-item:hover { background: var(--card2); text-decoration: none; }
.suggestion-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--g, #22d3ee); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g, #22d3ee) 18%, transparent);
}
.suggestion-title {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggestion-genre {
  flex: none; font-size: 11px; color: var(--muted); max-width: 40%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right;
}

/* Theme toggle */
.theme-toggle {
  position: relative; flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; padding: 0;
  background: var(--card); border: 1px solid var(--line); color: var(--muted2);
  overflow: hidden; transition: color .25s ease, background .25s ease, border-color .2s ease, transform .2s ease;
}
.theme-toggle::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at 30% 30%, rgba(34,211,238,.18), transparent 70%);
  opacity: 0; transition: opacity .3s ease;
}
.theme-toggle:hover { color: var(--text); border-color: #22d3ee; transform: translateY(-1px); }
.theme-toggle:hover::before { opacity: 1; }
.theme-toggle:active { transform: scale(.92); }

.theme-icon {
  position: absolute; width: 18px; height: 18px;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
}
.theme-sun { color: #f59e0b; }
.theme-moon { color: #a855f7; }

/* Dark (default): show moon */
.theme-moon { transform: rotate(0) scale(1); opacity: 1; }
.theme-sun { transform: rotate(-90deg) scale(.4); opacity: 0; }
.sun-rays { transform-origin: center; transition: transform .45s ease; }

/* Light: show sun */
html[data-theme="light"] .theme-moon { transform: rotate(90deg) scale(.4); opacity: 0; }
html[data-theme="light"] .theme-sun { transform: rotate(0) scale(1); opacity: 1; }
html[data-theme="light"] .theme-toggle:hover .theme-sun { color: #f59e0b; }

/* Hamburger toggle */
.nav-toggle {
  display: inline-grid; width: 40px; height: 36px; border-radius: 10px; background: var(--card);
  border: 1px solid var(--line); cursor: pointer; flex: none; padding: 0;
  place-items: center; position: relative;
}
.nav-burger, .nav-burger::before, .nav-burger::after {
  content: ""; display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform .25s ease, opacity .2s ease;
}
.nav-burger { position: relative; }
.nav-burger::before { position: absolute; top: -6px; left: 0; }
.nav-burger::after { position: absolute; top: 6px; left: 0; }
.nav-toggle[aria-expanded="true"] .nav-burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-burger::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-burger::after { transform: translateY(-6px) rotate(-45deg); }

.top-nav { display: none; flex: 1 1 auto; justify-content: center; align-items: center; gap: 2px; }
.top-nav-link { display: block; padding: 7px 12px; border-radius: 8px; color: var(--muted2); font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; --g: #22d3ee; transition: color .16s ease, background .16s ease; }
.top-nav-link:hover, .top-nav-link:focus-visible { color: var(--text); background: var(--card2); text-decoration: none; outline: none; }
.top-nav-link.is-active { color: var(--g); background: var(--card2); }
.nav-toggle-desktop { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--muted2); font-size: 12px; font-weight: 600; cursor: pointer; transition: color .16s ease, background .16s ease, border-color .16s ease; }
.nav-toggle-desktop:hover, .nav-toggle-desktop:focus-visible { color: var(--text); background: var(--card2); border-color: #22d3ee; outline: none; }

@media (min-width: 1025px) {
  .top-nav { display: flex; }
}

.nav-overlay {
  position: fixed; inset: 0; z-index: 79;
  background: rgba(0,0,0,.5); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .25s ease;
}
.nav-overlay[hidden] { display: none; }

/* Drawer */
.nav-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(340px, 86vw);
  background: var(--card); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .3s ease;
  z-index: 80; padding: 14px 16px 28px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.nav-drawer[hidden] { display: none; }
.nav-drawer.open { transform: translateX(0); }
html[dir="rtl"] .nav-drawer { right: auto; left: 0; transform: translateX(-100%); border-left: none; border-right: 1px solid var(--line); }
html[dir="rtl"] .nav-drawer.open { transform: translateX(0); }

.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.nav-close {
  background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer;
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  transition: background .15s ease, color .15s ease;
}
.nav-close:hover { background: var(--card2); color: var(--text); }

.nav-drawer-body {
  display: flex; flex-direction: column; gap: 6px;
  overflow-y: auto;
  flex: 1;
}
.nav-drawer-body .nav-footer-links {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
}
.nav-drawer-body .nav-footer-links .nav-link-subtle {
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  border-radius: 4px;
}
.nav-drawer-body .nav-footer-links .nav-link-subtle:hover {
  color: var(--muted2);
}

/* Nav links */
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--muted2); font-size: 14px; font-weight: 600;
  text-decoration: none; transition: color .16s ease, background .16s ease;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--text); background: var(--card2); text-decoration: none; outline: none; }
.nav-link.is-active { color: var(--g); background: var(--card2); border-left: 3px solid var(--g); padding-left: 9px; }
html[dir="rtl"] .nav-link.is-active { border-left: none; border-right: 3px solid var(--g); padding-left: 12px; padding-right: 9px; }

.nav-link-home { font-weight: 700; }
.nav-count { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: var(--card2); color: var(--muted2); font-size: 11px; font-weight: 600; text-align: center; line-height: 1.6; }
.nav-link:hover .nav-count, .nav-link.is-active .nav-count { background: var(--bg); color: var(--text); }
html[dir="rtl"] .nav-count { margin-left: 0; margin-right: auto; }
.nav-link-subtle { font-size: 12px; color: var(--muted); font-weight: 500; padding: 6px 12px; }
.nav-link-subtle:hover { color: var(--muted2); }
.nav-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--g); flex: none; box-shadow: 0 0 8px var(--g); }
.nav-ar { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 11px; color: var(--muted); margin-left: auto; }

/* Group titles */
.nav-group-title {
  font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: .2em;
  background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 700; margin: 10px 4px 2px;
}
.nav-group + .nav-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nav-drawer, .nav-overlay { transition: none; }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .site-header { padding: 9px 14px; gap: 8px; }
}

/* ===== Section heads ===== */
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.kicker {
  font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: .2em;
  background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700;
}
.kicker-ar { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 11.5px; color: var(--muted); }
.rule { flex: 1; height: 1px; background: var(--line); }
.section-title { font-size: 25px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.section-sub { font-size: 11.5px; color: var(--muted); }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; }

/* ===== Trending ===== */
.trending-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; margin-bottom: 18px; }
.trending-card {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--card);
  border: 1px solid var(--line); border-radius: 11px; position: relative; overflow: hidden; color: var(--text);
}
.trending-card:hover { text-decoration: none; border-color: var(--g); transform: translateY(-2px); transition: .15s; }
.trending-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--g), transparent 55%); opacity: .08; pointer-events: none; }
.trending-rank { font-family: ui-monospace, Menlo, monospace; font-size: 16px; font-weight: 700; color: var(--g); width: 22px; flex: none; position: relative; }
.trending-img { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; position: relative; }
.trending-body { min-width: 0; position: relative; flex: 1; }
.trending-title { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trending-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.trending-play { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; background: var(--g); color: #0a0c12; display: grid; place-items: center; font-size: 9px; flex: none; position: relative; }

/* ===== Genre panels ===== */
.genre-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; content-visibility: auto; contain-intrinsic-size: 0 600px; }
.genre-panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.genre-panel-head { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--g), transparent 70%); }
.genre-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--g); box-shadow: 0 0 10px var(--g); }
.genre-name { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; }
.genre-ar { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 11.5px; color: var(--muted); }
.genre-more { margin-left: auto; font-family: ui-monospace, Menlo, monospace; font-size: 10px; color: var(--g); }
.genre-panel-list { display: flex; flex-direction: column; }
.genre-row { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.genre-row:last-child { border-bottom: none; }
.genre-row:hover { text-decoration: none; background: var(--card2); }
.genre-row-img { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; flex: none; }
.genre-row-body { min-width: 0; flex: 1; }
.genre-row-title { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.genre-row-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }
.genre-row-play { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--g); color: var(--g); display: grid; place-items: center; font-size: 8.5px; flex: none; }

/* ===== Album grid (search) ===== */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.album-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: var(--text); }
.album-card:hover { text-decoration: none; border-color: var(--g); }
.album-card-img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.album-card-body { padding: 8px 10px; }
.album-card-title { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-card-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ===== Genre / album table ===== */
.album-table { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.album-row { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--text); text-decoration: none; }
.album-row:last-child, .album-row:nth-last-child(-n+3):nth-child(3n+1) { border-bottom: none; }
.album-row:nth-child(3n) { border-right: none; }
.album-row:hover { background: var(--card2); text-decoration: none; }
.album-row-idx { font-family: ui-monospace, Menlo, monospace; font-size: 10.5px; color: var(--muted); width: 22px; flex: none; }
.album-row-img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.album-row-body { min-width: 0; flex: 1; }
.album-row-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-row-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.album-row-play { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--g); color: var(--g); display: grid; place-items: center; font-size: 9px; flex: none; }

/* ===== Genre header ===== */
.breadcrumb { font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: .16em; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--g, #22d3ee); text-decoration: none; }
.genre-header { display: flex; align-items: baseline; gap: 12px; margin: 10px 0 4px; flex-wrap: wrap; }
.genre-title { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -.01em; color: var(--g); }
.genre-title-ar { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 14px; }
.genre-count { font-size: 11.5px; color: var(--muted); }
.sort-chips { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.sort-chip { font-size: 11px; border-radius: 999px; padding: 5px 12px; border: 1px solid var(--line); color: var(--muted2); font-weight: 600; }
.sort-chip.active { background: var(--g); color: #0a0c12; border-color: var(--g); }

/* ===== Album hero ===== */
.album-hero { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; align-items: flex-start; }
.album-hero-art { position: relative; flex: none; }
.album-hero-img { width: 125px; height: 125px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); display: block; box-shadow: 0 16px 40px color-mix(in srgb, var(--g) 35%, transparent); }
.album-hero-body { flex: 1; min-width: 260px; }
.album-hero-kicker { font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: .2em; }
.album-hero-title { margin: 6px 0 2px; font-size: 27px; font-weight: 700; letter-spacing: -.015em; line-height: 1.05; }
.album-hero-sub { font-size: 12.5px; color: var(--muted2); }
.album-hero-actions { display: flex; gap: 8px; margin: 14px 0; flex-wrap: wrap; }
.btn-play {
  background: var(--g, #22d3ee); color: #0a0c12; font-weight: 700; font-size: 11.5px; border: none;
  border-radius: 8px; padding: 8px 15px; cursor: pointer; font-family: inherit;
}

/* ===== Tracklist ===== */
.tracklist { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; content-visibility: auto; contain-intrinsic-size: 0 500px; }
.track-row { display: flex; align-items: center; gap: 11px; padding: 7px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.track-row:last-child { border-bottom: none; }
.track-row.playing { background: var(--card2); }
.track-play { width: 22px; flex: none; background: none; border: none; color: var(--g, #22d3ee); cursor: pointer; font-size: 10.5px; padding: 0; }
.track-no { font-family: ui-monospace, Menlo, monospace; font-size: 10.5px; color: var(--muted); width: 20px; flex: none; }
.track-name { font-size: 12.5px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-dl { font-family: ui-monospace, Menlo, monospace; font-size: 9.5px; color: var(--g, #22d3ee); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; flex: none; }
.track-view { font-size: 13px; color: var(--muted); text-decoration: none; padding: 2px 4px; }
.track-view:hover { color: var(--g); }
.tracklist-note { font-size: 11px; color: var(--muted); padding: 10px 14px; }

.tracklist-single .track-row { padding: 18px 16px; gap: 14px; }
.tracklist-single .track-play { font-size: 15px; width: 28px; }
.tracklist-single .track-no { font-size: 14px; width: 26px; }
.tracklist-single .track-name { font-size: 17px; font-weight: 700; }
.tracklist-single .track-dl { font-size: 11px; padding: 4px 10px; border-radius: 8px; }
.tracklist-single .track-view { font-size: 16px; padding: 4px 6px; }

/* ===== Related ===== */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; content-visibility: auto; contain-intrinsic-size: 0 300px; }
.related-card { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 11px; color: var(--text); }
.related-card:hover { text-decoration: none; border-color: var(--g); }
.related-img { width: 38px; height: 38px; border-radius: 7px; object-fit: cover; flex: none; }
.related-body { min-width: 0; }
.related-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.related-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ===== Static pages ===== */
.static-page {
  max-width: 760px; line-height: 1.75;
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 32px 34px;
}
.static-page p { color: var(--muted2); margin: 0 0 14px; }
.static-page h2 {
  position: relative; margin: 32px 0 14px; padding-left: 16px;
  font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--text);
}
.static-page h2::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px;
  border-radius: 3px; background: var(--brand);
}
.lead { font-size: 17px; line-height: 1.6; color: var(--text); margin: 0 0 8px; font-weight: 500; }
.lead-ar { font-family: 'Noto Kufi Arabic', sans-serif; color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
.genre-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 0; }
.genre-list li { display: flex; align-items: center; gap: 8px; }

/* Contact email */
.contact-email {
  display: inline-flex; align-items: center; gap: 13px;
  margin-top: 8px; padding: 15px 20px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); font-size: 16px; font-weight: 600;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.contact-email:hover, .contact-email:focus-visible {
  text-decoration: none; border-color: #22d3ee; color: #22d3ee;
  transform: translateY(-1px); outline: none;
}
.contact-email-icon {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand); color: #0a0c12; font-size: 17px; flex: none;
}

/* ===== Footer ===== */
.site-footer {
  content-visibility: auto; contain-intrinsic-size: 0 80px;
  margin-top: 26px; padding: 14px 20px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted);
}
.footer-brand { font-weight: 700; letter-spacing: .1em; color: var(--text); }
.footer-ar { font-family: 'Noto Kufi Arabic', sans-serif; }
.footer-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.footer-links a {
  color: var(--muted); text-decoration: none; font: inherit; cursor: pointer;
  padding: 2px 0; text-align: left;
  font-size: 10.5px;
}
.footer-links a:hover { color: var(--muted2); text-decoration: none; }
@media (max-width: 600px) {
  .footer-links { width: 100%; margin-left: 0; }
}

/* ===== Player bar ===== */
.player-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; align-items: center; gap: 14px; padding: 9px 20px; padding-bottom: calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--headbg); backdrop-filter: blur(14px); }
.player-bar[hidden] { display: none; }
.player-progress { position: absolute; left: 0; top: 0; right: 0; height: 4px; background: color-mix(in srgb, var(--line) 70%, transparent); cursor: pointer; }
.player-progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22d3ee, #a855f7, #f59e0b); }
.player-progress:hover { height: 6px; }
.player-art { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; cursor: pointer; }
.player-meta { min-width: 0; width: 160px; flex: none; }
.player-track { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.player-album { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.player-controls { display: flex; align-items: center; gap: 11px; flex: none; }
.player-btn { background: none; border: none; color: var(--muted2); font-size: 13px; cursor: pointer; }
.player-play { width: 34px; height: 34px; border-radius: 50%; background: var(--g, #22d3ee); color: #0a0c12; display: grid; place-items: center; font-size: 11px; }
.player-shuffle { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.player-shuffle.is-active { color: #22d3ee; }
.player-repeat { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.player-repeat.is-active { color: #22d3ee; }
.player-repeat .repeat-one { display: none; position: absolute; top: -3px; right: -4px; font-size: 8px; font-weight: 700; line-height: 1; background: #22d3ee; color: #0a0c12; border-radius: 50%; width: 11px; height: 11px; align-items: center; justify-content: center; }
.player-repeat.is-one .repeat-one { display: inline-flex; }
.player-dl { font-family: ui-monospace, Menlo, monospace; font-size: 10px; color: var(--g, #22d3ee); border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; flex: none; }

/* ===== 404 ===== */
.not-found-inner { text-align: center; padding: 60px 20px; }
.not-found-h1 { font-size: 64px; margin: 0; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.not-found-h2 { font-size: 20px; margin: 0 0 8px; }
.not-found-p { color: var(--muted); }
.not-found-link { display: inline-block; margin-top: 12px; }

.fav-btn, .share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--card2); color: var(--muted); font-family: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; transition: color .16s ease, border-color .16s ease, background .16s ease; }
.fav-btn:hover, .share-btn:hover { color: var(--text); background: var(--card); border-color: var(--muted); }
.fav-btn.is-active { color: #ec4899; border-color: #ec4899; background: rgba(236,72,153,.08); }
.fav-icon, .share-icon { width: 15px; height: 15px; transition: fill .16s ease, stroke .16s ease; }
.fav-btn.is-active .fav-icon { fill: #ec4899; stroke: #ec4899; }

.fav-btn-sm { width: 28px; height: 28px; padding: 0; justify-content: center; border-radius: 6px; }
.fav-btn-sm .fav-icon { width: 13px; height: 13px; }

.btn-clear-history:hover { color: var(--text); border-color: #ec4899; }

/* ===== Maintenance ===== */
.maint-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 120px 32px;
  text-align: center;
}
.maint-line {
  height: 1px;
  background: var(--line);
  margin: 20px auto;
}
.maint-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  margin: 0;
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.maint-msg {
  font-size: 14px;
  color: var(--muted2);
  margin: 16px 0 8px;
  line-height: 1.6;
}
.maint-time {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 600px) {
  h1 { font-size: 20px !important; line-height: 1.15; }
  .album-hero-img { width: 125px; height: 125px; }
  .footer-links { width: 100%; margin-left: 0; }
  .player-meta { width: 110px; }
  .static-page { padding: 22px 16px 26px; }

  .site-header { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .site-footer { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .player-bar { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }

  .genre-panels { grid-template-columns: 1fr; }
  .album-hero { gap: 14px; }
  .album-hero-body { min-width: 0; }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  .trending-grid { grid-template-columns: 1fr; gap: 0; }
  .trending-card { padding: 6px 8px; gap: 8px; }
  .trending-img { width: 34px; height: 34px; border-radius: 7px; }
  .trending-rank { width: 16px; font-size: 13px; }
  .trending-title { font-size: 11.5px; }
  .trending-sub { font-size: 9px; }
  .trending-play { width: 24px; height: 24px; font-size: 8px; }

  .album-table { grid-template-columns: 1fr; }
  .album-row { border-right: none; }
  .album-row:nth-child(3n) { border-right: none; }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 1024px) {
  .album-table { grid-template-columns: repeat(2, 1fr); }
  .album-row { border-right: 1px solid var(--line); }
  .album-row:nth-child(3n) { border-right: 1px solid var(--line); }
  .album-row:nth-child(2n) { border-right: none; }
  .album-table > :nth-last-child(-n+2):nth-child(2n+1) { border-bottom: none; }
}

/* ===== Track page ===== */
.track-hero-body { margin-top: 14px; }
.track-hero-kicker { font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: .2em; }
.track-hero-title { margin: 6px 0 2px; font-size: 27px; font-weight: 700; letter-spacing: -.015em; line-height: 1.05; }
.track-hero-album { display: inline-block; margin-top: 4px; font-size: 12.5px; color: var(--muted2); }
.track-hero-album:hover { text-decoration: underline !important; color: var(--g); }
.track-hero-stats { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.track-hero-audio { margin-top: 14px; }
.track-hero-audio audio { width: 100%; max-width: 480px; height: 40px; border-radius: 10px; background: var(--card); }

/* ===== Track page album hero ===== */
.track-album-hero { display: flex; gap: 16px; margin-top: 10px; align-items: flex-start; }
.track-album-art { flex: none; position: relative; }
.track-album-img { width: 110px; height: 110px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); display: block; box-shadow: 0 16px 40px color-mix(in srgb, var(--g) 35%, transparent); }
.track-album-body { flex: 1; min-width: 220px; }
.track-album-kicker { font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: .2em; color: var(--g); }
.track-title { margin: 6px 0 2px; font-size: 24px; font-weight: 700; letter-spacing: -.015em; line-height: 1.1; color: var(--text); }
.track-album-title { display: inline-block; margin-top: 2px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; color: var(--muted); }
.track-album-title:hover { text-decoration: underline; color: var(--g); }
.track-album-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }
.track-hero-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ===== Homepage footer ===== */
.homepage-footer { text-align: center; margin-top: 18px; }
.section-title-gradient { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.homepage-tagline { font-size: 12px; color: var(--muted); margin: 8px auto 0; line-height: 1.5; }