/* =========================================================================
   Spotiny · Artist detail view (v2 — dark premium redesign)
   --------------------------------------------------------------------------
   Artist hero (full-width image with gradient overlay, name + followers)
   Follow button + more-options row
   Top tracks list (uses .row-item)
   Albums horizontal rail (uses .h-scroll + .card)
   Related artists horizontal rail (uses .h-scroll + .artist-card)
   ========================================================================= */

.artist-hero {
  position: relative;
  padding: var(--sp-7) var(--sp-4) var(--sp-6);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--sp-6);
  min-height: var(--hero-h);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--surface);
}
/* If a future template renders a direct <img> inside .artist-hero, it fills
   the hero at the fixed --hero-h height. The legacy .artist-hero__backdrop
   (background-image with blur, used by current artist.js) is kept below. */
.artist-hero > img {
  width: 100%;
  height: var(--hero-h);
  object-fit: cover;
  object-position: top center;
  display: block;
}
.artist-hero__gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 55%);
  z-index: 1;
}
.artist-hero__info {
  position: absolute;
  bottom: var(--sp-4);
  left: var(--sp-4);
  right: var(--sp-4);
  z-index: 2;
}
.artist-hero__name--hero {
  font-size: var(--fs-32); font-weight: 900;
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.7);
  letter-spacing: -0.02em;
}
.artist-hero__followers {
  font-size: var(--fs-13);
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
}

/* Legacy backdrop-style hero (kept so existing artist.js renders still work
   when the JS populates .artist-hero with .artist-hero__backdrop + content) */
.artist-hero__backdrop {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: blur(30px) saturate(140%);
  opacity: 0.55;
  transform: scale(1.1);
  z-index: 0;
}
.artist-hero__backdrop::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(13,13,13,0.3) 0%,
    rgba(13,13,13,0.7) 60%,
    rgba(13,13,13,0.95) 100%);
}
.artist-hero__content {
  position: relative; z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  text-align: center;
  padding: var(--sp-7) var(--sp-4) var(--sp-6);
}
.artist-hero__verified {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-12); color: var(--info);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.artist-hero__verified svg { width: 14px; height: 14px; }
.artist-hero__stats {
  font-size: var(--fs-13); color: var(--text-2);
}
.artist-hero__actions {
  display: flex; gap: var(--sp-3);
  margin-top: var(--sp-3);
}
.artist-hero__play-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: grid; place-items: center;
  box-shadow: var(--shadow-accent);
  border: 0;
  cursor: pointer;
  transition: transform var(--dur-1), background var(--dur-1);
}
.artist-hero__play-btn:hover { background: var(--accent-strong); transform: scale(1.06); }
.artist-hero__play-btn:active { transform: scale(0.95); }
.artist-hero__play-btn svg { width: 26px; height: 26px; }

/* Artist actions row: Follow button + more-options */
.artist-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-4) var(--sp-4);
  gap: var(--sp-3);
}
.artist-follow-btn {
  padding: 8px 24px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--text);
  font-weight: 700;
  font-size: var(--fs-13);
  background: transparent;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: inherit;
  transition: border-color var(--dur-1), background var(--dur-1);
}
.artist-follow-btn:hover {
  border-color: var(--text);
  background: var(--surface-2);
}
.artist-follow-btn.is-following {
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.artist-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-7);
}

/* Section header row with optional play button on the right */
.artist-section__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
  gap: var(--sp-3);
}
.artist-section__title {
  font-size: var(--fs-18); font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}
.artist-section__title:not(:first-child) { margin-top: 0; }

/* Top tracks list — reuses .row-item */
.artist-tracks {
  display: flex; flex-direction: column;
  gap: var(--sp-1);
}

/* Albums rail — horizontal scroll with .h-scroll + fixed .card sizing */
.artist-albums {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.artist-albums::-webkit-scrollbar { display: none; }
.artist-albums > * { scroll-snap-align: start; flex-shrink: 0; }
@media (min-width: 768px) {
  .artist-albums {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    overflow: visible;
    gap: var(--sp-4);
  }
}

/* Related artists rail — horizontal scroll with circular .artist-card */
.artist-related {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.artist-related::-webkit-scrollbar { display: none; }
.artist-related > * { scroll-snap-align: start; flex-shrink: 0; }
@media (min-width: 768px) {
  .artist-related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    overflow: visible;
    gap: var(--sp-4);
  }
}

/* Circular artist card */
.artist-card {
  flex-shrink: 0;
  width: var(--artist-card-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
  text-align: center;
  transition: transform var(--dur-2) var(--ease-out);
}
.artist-card:hover { transform: translateY(-2px); }
.artist-card:active { transform: scale(0.98); }
.artist-card__img {
  width: var(--artist-card-w);
  height: var(--artist-card-h);
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  display: block;
  box-shadow: var(--shadow-card);
}
.artist-card__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  width: var(--artist-card-w);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artist-card__type {
  font-size: 11px;
  color: var(--muted);
  margin-top: -4px;
}

/* Artist-page extras (shuffle-all button + description) — kept for legacy */
.artist-hero__shuffle-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background var(--dur-1), transform var(--dur-1);
}
.artist-hero__shuffle-btn:hover {
  background: var(--surface-hover);
  transform: scale(1.06);
}
.artist-hero__shuffle-btn:active { transform: scale(0.95); }
.artist-hero__shuffle-btn svg { width: 22px; height: 22px; }

.artist-hero__desc {
  font-size: var(--fs-13);
  color: var(--muted);
  line-height: 1.5;
  margin-top: var(--sp-2);
  max-width: 60ch;
  text-align: center;
}
