/* ==================================================================== */
/* Hay Music — full stylesheet                                          */
/* ==================================================================== */

:root {
  --bg: #faf8ff;
  --bg-alt: #f2edff;
  --surface: #ffffff;
  --surface-2: #fdfcff;
  --text: #171225;
  --muted: #6b6780;
  --muted-2: #9691a8;
  --primary: #7c3aed;
  --primary-2: #a855f7;
  --primary-dark: #5b21b6;
  --accent: #ec4899;
  --amber: #f59e0b;
  --danger: #dc2626;
  --success: #16a34a;
  --border: #ebe6f6;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(30, 20, 60, 0.05);
  --shadow: 0 12px 32px rgba(76, 29, 149, 0.10);
  --shadow-lg: 0 24px 48px rgba(76, 29, 149, 0.16);
  --gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 55%, #ec4899 100%);
  --font: "Vazirmatn", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html { direction: rtl; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }

.container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

/* -------------------------------------------------------------------- */
/* Header                                                               */
/* -------------------------------------------------------------------- */
.site-header {
  background: rgba(250, 248, 255, 0.98);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-block;
  filter: drop-shadow(0 6px 18px rgba(124, 58, 237, 0.35));
  transition: transform 0.3s ease;
}

.logo:hover .logo-icon { transform: rotate(-6deg) scale(1.05); }

.logo-text { font-family: var(--font); }

.main-nav {
  display: flex;
  gap: 6px;
  margin-inline-start: 12px;
}

.main-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
  color: var(--primary);
  background: var(--bg-alt);
}

.header-search {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  min-width: 280px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.header-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--muted-2);
  flex-shrink: 0;
}

.header-search input {
  border: 0;
  background: transparent;
  padding: 6px 0;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  width: 100%;
  color: var(--text);
}

/* -------------------------------------------------------------------- */
/* Category chip bar                                                    */
/* -------------------------------------------------------------------- */
.cat-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 72px;
  z-index: 40;
  overflow: hidden;
}

.cat-bar-inner {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cat-bar-inner::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: 0.18s ease;
  flex-shrink: 0;
}

.cat-pill:hover {
  background: var(--pill-color, var(--primary));
  color: #fff;
  border-color: var(--pill-color, var(--primary));
  transform: translateY(-1px);
}

.cat-pill-all {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
}

.cat-pill-all:hover {
  filter: brightness(1.1);
  color: #fff;
}

/* -------------------------------------------------------------------- */
/* Buttons                                                              */
/* -------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.25);
}

.btn:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.32);
}

.btn:active { transform: translateY(0); }

.btn-outline {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text);
  box-shadow: none;
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.12);
}

.btn-play {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  box-shadow: 0 6px 18px rgba(236, 72, 153, 0.28);
}

.btn-play:hover {
  box-shadow: 0 10px 24px rgba(236, 72, 153, 0.36);
}

.btn-download {
  background: var(--text);
  color: #fff;
  box-shadow: 0 6px 18px rgba(23, 18, 37, 0.25);
}

.btn-download:hover {
  background: #2a2340;
  color: #fff;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
  border-radius: 10px;
  box-shadow: none;
}

.btn-sm:hover { box-shadow: 0 4px 14px rgba(124, 58, 237, 0.18); }

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: none;
}

.btn-danger:hover { background: #b91c1c; }

/* -------------------------------------------------------------------- */
/* Hero                                                                 */
/* -------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 100px;
  background:
    radial-gradient(circle at 15% 25%, rgba(236, 72, 153, 0.42) 0%, transparent 55%),
    radial-gradient(circle at 85% 75%, rgba(245, 158, 11, 0.32) 0%, transparent 55%),
    linear-gradient(135deg, #1e1b4b 0%, #4c1d95 55%, #7c3aed 100%);
  color: #fff;
}

.hero::before,
.hero::after {
  display: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  line-height: 1.25;
  text-wrap: balance;
}

.hero p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 32px;
  font-size: 16px;
  text-wrap: pretty;
}

.hero-search {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.hero-search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  color: var(--text);
  border-radius: 12px;
}

.hero-search button {
  border: 0;
  background: var(--gradient);
  color: #fff;
  padding: 0 32px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.hero-search button:hover { transform: scale(1.02); }

/* -------------------------------------------------------------------- */
/* Sections                                                             */
/* -------------------------------------------------------------------- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.related-section { padding-top: 40px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.section-head a {
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--bg-alt);
}

.section-head a:hover { background: var(--primary); color: #fff; }

/* -------------------------------------------------------------------- */
/* Track cards                                                          */
/* -------------------------------------------------------------------- */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.track-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s cubic-bezier(.2,.8,.3,1), box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
}

.track-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(124, 58, 237, 0.25);
}

.track-cover {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-alt);
}

.track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(.2,.8,.3,1);
  animation: fadeInImg 0.4s ease;
}

.track-card:hover .track-cover img { transform: scale(1.05); }

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, transparent 40%, rgba(23, 18, 37, 0.75));
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.play-overlay svg {
  width: 56px;
  height: 56px;
  padding: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  transform: scale(0.85);
  transition: transform 0.25s cubic-bezier(.2,.8,.3,1);
}

.track-cover:hover .play-overlay { opacity: 1; }
.track-cover:hover .play-overlay svg { transform: scale(1); }

.track-card-body { padding: 16px; }

.track-card-body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-card-body h3 a { color: var(--text); }
.track-card-body h3 a:hover { color: var(--primary); }

.track-artist {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12.5px;
}

.track-artist a { color: var(--muted); font-weight: 500; }
.track-artist a:hover { color: var(--primary); }

.track-card-actions {
  display: flex;
  gap: 8px;
}

.track-card-actions .btn {
  flex: 1;
  padding: 9px 12px;
  font-size: 13px;
}

.card-audio {
  display: none;
  width: 100%;
  margin-top: 12px;
  height: 40px;
  border-radius: 10px;
}

.card-audio.is-active { display: block; }
audio.is-active { display: block !important; }

/* -------------------------------------------------------------------- */
/* Collection cards                                                     */
/* -------------------------------------------------------------------- */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}

.collection-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s cubic-bezier(.2,.8,.3,1), box-shadow 0.22s ease;
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.collection-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 12px;
  animation: fadeInImg 0.4s ease;
}

.collection-card h3 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  padding-inline: 4px;
}

.collection-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  padding-inline: 4px;
}

/* -------------------------------------------------------------------- */
/* Artist grid                                                          */
/* -------------------------------------------------------------------- */
.artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px;
}

.artist-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 14px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s cubic-bezier(.2,.8,.3,1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.artist-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(124, 58, 237, 0.25);
}

.artist-card h3 {
  margin: 12px 0 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}

.artist-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.artist-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--gradient);
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.28);
  flex-shrink: 0;
}

.artist-avatar img { width: 100%; height: 100%; object-fit: cover; }

.artist-initial { font-family: var(--font); }

.artist-avatar-lg { width: 140px; height: 140px; font-size: 52px; }

.artist-header {
  display: flex;
  gap: 28px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

.artist-info h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.artist-bio {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0 0 10px;
  line-height: 1.9;
  max-width: 620px;
}

.artist-meta {
  color: var(--muted-2);
  font-size: 13px;
  margin: 0;
}

/* -------------------------------------------------------------------- */
/* Category pages                                                       */
/* -------------------------------------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--cat-color);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.category-icon {
  font-size: 40px;
  line-height: 1;
}

.category-tile strong {
  font-size: 15px;
  color: var(--text);
}

.category-tile small {
  font-size: 12px;
  color: var(--muted);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px;
  background: linear-gradient(135deg, var(--cat-color), rgba(255,255,255,0.1));
  border-radius: var(--radius);
  color: #fff;
  margin-bottom: 30px;
}

.category-header-icon {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.category-header h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
}

.category-header p {
  margin: 0 0 6px;
  font-size: 14px;
  opacity: 0.9;
}

.category-header small {
  font-size: 12px;
  opacity: 0.8;
}

/* -------------------------------------------------------------------- */
/* Breadcrumb                                                           */
/* -------------------------------------------------------------------- */
.breadcrumb {
  font-size: 12.5px;
  color: var(--muted-2);
  margin-bottom: 26px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumb span:last-child { color: var(--text); font-weight: 600; }

/* -------------------------------------------------------------------- */
/* Track & collection detail                                            */
/* -------------------------------------------------------------------- */
.track-detail,
.collection-detail {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: start;
}

.track-detail-cover,
.collection-detail-cover {
  position: sticky;
  top: 100px;
}

.track-detail-cover img,
.collection-detail-cover img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.track-detail-info h1,
.collection-detail-info h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.artist {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 6px;
  font-weight: 500;
}

.artist a { font-weight: 600; color: var(--primary); }

.track-album-link {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.track-album-link a { font-weight: 600; }

.track-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0;
}

.track-audio {
  width: 100%;
  height: 56px;
  margin: 22px 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.12);
}

.track-detail-actions {
  display: flex;
  gap: 12px;
  margin: 22px 0 26px;
}

.track-description {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 18px;
}

.track-description p { margin: 0; }

.lyrics-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}

.lyrics-box summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
}

.lyrics-box pre {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.collection-desc {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 8px;
}

.collection-meta {
  color: var(--muted-2);
  font-size: 13px;
  margin: 0;
}

/* -------------------------------------------------------------------- */
/* Album track list                                                     */
/* -------------------------------------------------------------------- */
.track-list {
  margin-top: 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.track-list-item-wrap { border-bottom: 1px solid var(--border); }
.track-list-item-wrap:last-child { border-bottom: 0; }

.track-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  transition: background 0.15s ease;
}

.track-list-item:hover { background: var(--surface-2); }

.track-number {
  color: var(--muted-2);
  width: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.track-list-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.track-list-info a {
  color: var(--text);
  font-weight: 700;
  font-size: 14.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-list-info a:hover { color: var(--primary); }

.track-list-info span {
  color: var(--muted);
  font-size: 12px;
}

.track-list-info span a { color: var(--muted); font-weight: 500; }
.track-list-info span a:hover { color: var(--primary); }

.track-list-item-wrap .card-audio {
  margin: 0 20px 14px;
  width: calc(100% - 40px);
}

/* -------------------------------------------------------------------- */
/* Search                                                               */
/* -------------------------------------------------------------------- */
.search-page-form {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin-bottom: 24px;
}

.search-page-form input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 14px;
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-page-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.search-count {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 22px;
}

/* -------------------------------------------------------------------- */
/* Footer                                                               */
/* -------------------------------------------------------------------- */
.site-footer {
  background: #100b20;
  color: #b8b2cc;
  margin-top: 60px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding: 60px 0 40px;
}

.logo-dark { color: #fff; }
.logo-dark .logo-icon { box-shadow: none; }

.footer-tagline {
  margin: 18px 0 0;
  color: #8d87a3;
  font-size: 13.5px;
  line-height: 1.9;
  max-width: 320px;
}

.footer-col h4 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: #8d87a3;
  font-size: 13.5px;
  transition: color 0.15s ease;
}

.footer-col a:hover { color: #fff; }

.footer-col-wide p {
  color: #8d87a3;
  font-size: 13.5px;
  line-height: 1.9;
  margin: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 22px 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #6f6987;
  font-size: 12.5px;
}

.footer-bottom-inner p { margin: 0; }

/* -------------------------------------------------------------------- */
/* Flash                                                                */
/* -------------------------------------------------------------------- */
.flash-wrap { padding-top: 18px; }

.flash {
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 10px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
}

.flash-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.flash-danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.flash-warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

/* -------------------------------------------------------------------- */
/* Pagination / empty state                                             */
/* -------------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 40px;
  font-size: 13px;
  color: var(--muted);
}

.pagination a {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 600;
}

.pagination a:hover { border-color: var(--primary); color: var(--primary); }

.empty,
.empty-state {
  color: var(--muted);
  font-size: 14.5px;
}

.empty {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  width: 100%;
}

.empty-state {
  text-align: center;
  padding: 80px 0;
}

.empty-state h1 {
  font-size: 76px;
  margin: 0;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}

/* -------------------------------------------------------------------- */
/* Auth                                                                 */
/* -------------------------------------------------------------------- */
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-top: 0;
  font-size: 22px;
  font-weight: 800;
}

.auth-card label {
  display: block;
  margin-bottom: 16px;
  font-size: 13.5px;
  font-weight: 600;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

/* -------------------------------------------------------------------- */
/* Admin layout                                                         */
/* -------------------------------------------------------------------- */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
}

.admin-sidebar {
  background: #100b20;
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 94px;
}

.admin-sidebar h3 {
  margin: 0 0 14px;
  font-size: 13px;
  color: #a78bfa;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-sidebar a {
  display: block;
  color: #b8b2cc;
  padding: 9px 10px;
  font-size: 13.5px;
  border-radius: 10px;
  margin-bottom: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-sidebar a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.admin-sidebar hr {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 14px 0;
}

.admin-main { min-width: 0; }

.admin-main h1 {
  font-size: 24px;
  font-weight: 800;
  margin-top: 0;
}

.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.stat-card span {
  color: var(--muted);
  font-size: 12.5px;
}

.stat-card strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}

.card h2 {
  margin-top: 0;
  font-size: 17px;
  font-weight: 700;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.simple-list {
  margin: 0;
  padding-inline-start: 20px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 2;
}

.admin-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.admin-form label {
  display: block;
  margin-bottom: 18px;
  font-size: 13.5px;
  font-weight: 600;
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form select,
.admin-form textarea,
.admin-form input[type="file"],
.admin-form input[type="color"] {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  font-family: inherit;
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.admin-form textarea { resize: vertical; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.help-text {
  color: var(--muted);
  font-size: 13.5px;
}

.admin-search {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  max-width: 440px;
}

.admin-search input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  font-family: inherit;
  background: var(--surface);
  outline: none;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 700px;
}

.admin-table th,
.admin-table td {
  text-align: right;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg);
  font-weight: 700;
  color: var(--muted);
  font-size: 12.5px;
}

.admin-table tr:last-child td { border-bottom: 0; }

.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.table-actions form { display: inline; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-muted { background: #f1f0f7; color: #555; }

.badge-count {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-inline-start: 6px;
  vertical-align: middle;
}

/* -------------------------------------------------------------------- */
/* Pending review                                                       */
/* -------------------------------------------------------------------- */
.pending-bulk-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  position: sticky;
  top: 80px;
  z-index: 20;
  box-shadow: var(--shadow-sm);
}

.pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.pending-card {
  position: relative;
  display: flex;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pending-card:hover {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: var(--shadow);
}

.pending-check {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 2;
}

.pending-check input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

.pending-cover {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-alt);
}

.pending-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pending-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pending-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.pending-field input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  background: var(--surface);
  outline: none;
  font-weight: 500;
  color: var(--text);
}

.pending-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.pending-cats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pending-cats small {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cat-chip {
  position: relative;
  cursor: pointer;
}

.cat-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cat-chip span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-alt);
  color: var(--text);
  border: 1.5px solid transparent;
  transition: 0.15s ease;
}

.cat-chip input:checked + span {
  background: var(--c, var(--primary));
  color: #fff;
  border-color: var(--c, var(--primary));
}

.cat-chip:hover span { border-color: var(--c, var(--primary)); }

.pending-body audio {
  width: 100%;
  height: 34px;
  border-radius: 8px;
}

.pending-meta {
  color: var(--muted-2);
  font-size: 11.5px;
}

.pending-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

/* -------------------------------------------------------------------- */
/* Plyr overrides                                                       */
/* -------------------------------------------------------------------- */
.plyr--audio {
  --plyr-color-main: #7c3aed;
  --plyr-audio-control-color: #171225;
  --plyr-audio-control-color-hover: #fff;
  --plyr-audio-controls-background: transparent;
  --plyr-audio-control-background-hover: #7c3aed;
  --plyr-range-thumb-height: 14px;
  --plyr-range-track-height: 4px;
  --plyr-font-family: "Vazirmatn", Tahoma, sans-serif;
  border-radius: 12px;
  overflow: hidden;
}

.plyr--audio .plyr__controls {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 10px 14px;
  direction: ltr;
}

.plyr--audio .plyr__control--overlaid {
  background: var(--primary);
}

.plyr__time {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}

/* -------------------------------------------------------------------- */
/* Polish                                                               */
/* -------------------------------------------------------------------- */
::selection {
  background: rgba(124, 58, 237, 0.22);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

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

/* -------------------------------------------------------------------- */
/* Responsive                                                           */
/* -------------------------------------------------------------------- */
@media (max-width: 900px) {
  .cat-bar { top: 60px; }

  .header-inner {
    min-height: 60px;
    flex-wrap: wrap;
    padding: 10px 0;
    gap: 12px;
  }

  .logo-icon { width: 38px; height: 38px; }
  .logo-text { font-size: 17px; }

  .main-nav {
    order: 4;
    width: 100%;
    justify-content: center;
    padding-top: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline-start: 0;
    gap: 2px;
  }

  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { font-size: 13px; padding: 8px 12px; }

  .header-search {
    order: 3;
    width: 100%;
    min-width: 0;
    margin-inline-start: 0;
  }

  .hero { padding: 60px 0 70px; }
  .hero-search { flex-direction: column; gap: 8px; padding: 10px; }
  .hero-search button { padding: 14px; }

  .track-detail, .collection-detail {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .track-detail-cover, .collection-detail-cover {
    position: static;
    max-width: 340px;
    margin-inline: auto;
  }

  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 48px 0 32px;
  }

  .footer-brand { grid-column: 1 / -1; }

  .artist-header {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
  }

  .artist-bio { margin-inline: auto; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }

  .cat-bar-inner { padding: 8px 12px; gap: 6px; }
  .cat-pill { font-size: 12px; padding: 6px 12px; }

  .hero { padding: 48px 0 56px; }
  .hero p { font-size: 14.5px; }

  .section { padding: 40px 0; }
  .section-head h2 { font-size: 20px; }

  .track-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 14px;
  }

  .collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
  }

  .artist-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
  }

  .track-card-body { padding: 12px; }
  .track-card-actions .btn {
    padding: 8px 10px;
    font-size: 12px;
    min-height: 38px;
  }

  .track-list-item { padding: 12px 14px; gap: 10px; }
  .track-list-item-wrap .card-audio {
    margin: 0 14px 12px;
    width: calc(100% - 28px);
  }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
  }

  .artist-avatar { width: 72px; height: 72px; font-size: 28px; }
  .artist-avatar-lg { width: 110px; height: 110px; font-size: 42px; }

  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
  }

  .category-tile { padding: 18px 12px; }
  .category-icon { font-size: 32px; }

  .category-header {
    flex-direction: column;
    text-align: center;
    padding: 22px;
  }

  .category-header-icon { font-size: 44px; }

  .btn { min-height: 44px; padding: 12px 20px; }
  .btn-sm { min-height: 36px; padding: 8px 14px; }

  .plyr--audio { border-radius: 10px; }
  .plyr--audio .plyr__controls { padding: 8px 10px; }

  .pending-card { flex-direction: column; }
  .pending-cover { width: 100%; height: 180px; }
  .pending-bulk-bar { position: static; }
}

/* iPhone notch safe area */
@supports (padding: max(0px)) {
  .site-footer {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}
/* ==================================================================== */
/* Modern Plyr player                                                   */
/* ==================================================================== */
.audio-wrap {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(236,72,153,0.08));
  padding: 4px;
}

.audio-wrap[hidden] { display: none; }

.audio-wrap-large {
  margin: 22px 0;
  padding: 8px;
  background: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(236,72,153,0.10));
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.12);
}

.plyr--audio {
  --plyr-color-main: #7c3aed;
  --plyr-audio-control-color: #4c1d95;
  --plyr-audio-control-color-hover: #ffffff;
  --plyr-audio-controls-background: transparent;
  --plyr-audio-control-background-hover: #7c3aed;
  --plyr-range-thumb-height: 14px;
  --plyr-range-track-height: 4px;
  --plyr-range-fill-background: #7c3aed;
  --plyr-font-family: "Vazirmatn", Tahoma, sans-serif;
  border-radius: 12px;
  overflow: hidden;
}

.plyr--audio .plyr__controls {
  background: #ffffff;
  border-radius: 10px;
  padding: 8px 12px;
  direction: ltr;
  border: 1px solid rgba(124, 58, 237, 0.12);
}

.plyr--audio .plyr__control {
  border-radius: 50%;
  color: #4c1d95;
}

.plyr--audio .plyr__control:hover {
  background: #7c3aed;
  color: #fff;
}

.plyr--audio .plyr__control[data-plyr="play"] svg,
.plyr--audio .plyr__control[data-plyr="pause"] svg {
  width: 16px;
  height: 16px;
}

.plyr--audio .plyr__control[data-plyr="play"] {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.plyr--audio .plyr__progress__container {
  margin: 0 10px;
}

.plyr__time {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: #6b6780;
}

.plyr--full-ui input[type="range"] {
  color: #7c3aed;
}

@media (max-width: 600px) {
  .plyr--audio .plyr__controls { padding: 6px 8px; }
  .plyr--audio .plyr__control { padding: 8px; }
  .plyr__time { font-size: 11px; }
}