/* Страницы: исполнители, дискография, релиз, популярное, поиск. */

/* --- Сетка исполнителей (главная) --- */

.artists {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.artist-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 12px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: background-color .15s;
}
.artist-card:hover { background: var(--bg-hover); }
.artist-card:hover .avatar::after { opacity: 1; }

.avatar {
  position: relative;
  width: 100%;
  max-width: 156px;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-sunken);
  box-shadow: var(--shadow-sm);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px var(--accent);
  opacity: 0;
  transition: opacity .15s;
}
.avatar--empty { display: grid; place-items: center; color: var(--text-faint); }
.avatar--empty svg { width: 38%; height: 38%; }

.artist-card__name { font-weight: 600; font-size: 15px; }
.artist-card__meta { font-size: 13px; color: var(--text-faint); }

/* --- Шапка исполнителя --- */

.artist-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 36px;
}
.artist-hero .avatar { width: 188px; flex: none; max-width: none; box-shadow: var(--shadow-md); }
.artist-hero__info { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.artist-hero__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-dim); font-size: 14px; }
.artist-hero__meta b { font-weight: 600; color: var(--text); }
.artist-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
}
.chip svg { width: 15px; height: 15px; }
.chip:hover { border-color: var(--line-strong); color: var(--text); }

/* --- Панель управления списком --- */

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* --- Сетка релизов --- */

.releases {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(166px, 1fr));
  gap: 10px;
}

.release-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 11px;
  border-radius: var(--radius);
  transition: background-color .15s;
}
.release-card:hover { background: var(--bg-hover); }

.cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-sunken);
  box-shadow: var(--shadow-sm);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--empty { display: grid; place-items: center; color: var(--text-faint); }
.cover--empty svg { width: 34%; height: 34%; }

.cover__play {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s, filter .15s;
  box-shadow: var(--shadow-md);
}
.cover__play svg { width: 21px; height: 21px; margin-left: 2px; }
.release-card:hover .cover__play,
.cover__play:focus-visible { opacity: 1; transform: none; }
.cover__play:hover { filter: brightness(1.08); }
@media (hover: none) { .cover__play { opacity: 1; transform: none; } }

.release-card__title { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.release-card__meta { font-size: 13px; color: var(--text-faint); display: flex; gap: 6px; flex-wrap: wrap; }
.release-card__meta .dot::before { content: "·"; margin-right: 6px; }

/* --- Список треков --- */

.tracks { display: flex; flex-direction: column; }

/* Колонки: номер, обложка, название, значки, время, действия. */
.track {
  display: grid;
  grid-template-columns: var(--track-lead, 34px) 44px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: default;
  transition: background-color .12s;
}
.track:hover { background: var(--bg-hover); }
.track.is-current { background: var(--accent-soft); }
.track.is-current .track__title { color: var(--accent); }

.track--nocover { grid-template-columns: var(--track-lead, 34px) minmax(0, 1fr) auto auto auto; }

.track__lead {
  display: grid;
  place-items: center;
  width: 100%;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}
.track__lead button {
  display: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.track:hover .track__lead button { display: grid; }
.track:hover .track__num,
.track:hover .eq { display: none; }
/* В очереди номеров нет — кнопка «играть» видна сразу. */
.track--noindex .track__lead button { display: grid; }
.track--noindex.is-current .track__lead button { display: none; }
.track--noindex.is-current:hover .track__lead button { display: grid; }
.track__lead svg { width: 17px; height: 17px; }

/* Эквалайзер у играющего трека. */
.eq { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 2.5px; background: var(--accent); border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 60%; animation-delay: -.5s; }
.eq i:nth-child(2) { height: 100%; animation-delay: -.2s; }
.eq i:nth-child(3) { height: 40%; }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.track.is-paused .eq i { animation-play-state: paused; }

.track__cover { width: 44px; height: 44px; border-radius: 6px; overflow: hidden; background: var(--bg-sunken); flex: none; }
.track__cover img { width: 100%; height: 100%; object-fit: cover; }

.track__main { min-width: 0; }
.track__title { font-weight: 500; font-size: 14.5px; }
.track__sub { font-size: 13px; color: var(--text-faint); display: flex; gap: 6px; align-items: center; }
.track__sub a:hover { color: var(--text); text-decoration: underline; }
.track__sub .dot::before { content: "·"; margin-right: 6px; }

.track__badges { display: flex; gap: 6px; align-items: center; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge svg { width: 12px; height: 12px; }

.track__time { color: var(--text-faint); font-size: 13.5px; font-variant-numeric: tabular-nums; }

.track__actions { display: flex; gap: 2px; align-items: center; }
.track__actions .iconbtn { width: 34px; height: 34px; opacity: 0; }
.track:hover .track__actions .iconbtn,
.track__actions .iconbtn:focus-visible { opacity: 1; }
@media (hover: none) { .track__actions .iconbtn { opacity: 1; } }
.track__actions svg { width: 18px; height: 18px; }

.track__snippet {
  grid-column: 3 / -1;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
}

/* --- Шапка релиза --- */

.release-hero { display: flex; gap: 30px; margin-bottom: 34px; }
.release-hero .cover { width: 236px; flex: none; box-shadow: var(--shadow-md); }
.release-hero__info { display: flex; flex-direction: column; justify-content: flex-end; gap: 13px; min-width: 0; }
.release-hero__kind { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); }
.release-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--text-dim); font-size: 14px; }
.release-hero__meta .dot::before { content: "·"; }
.release-hero__meta a { font-weight: 600; color: var(--text); }
.release-hero__meta a:hover { text-decoration: underline; }
.release-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* --- Поиск --- */

.results { display: flex; flex-direction: column; gap: 40px; }
.search-artists { display: flex; flex-wrap: wrap; gap: 10px; }
.search-artist {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 8px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}
.search-artist:hover { border-color: var(--line-strong); background: var(--bg-hover); }
.search-artist .avatar { width: 46px; flex: none; }

/* --- Окно «Поделиться» --- */

.share__track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.share__cover { width: 48px; height: 48px; flex: none; border-radius: 6px; object-fit: cover; background: var(--bg-sunken); }
.share__meta { min-width: 0; }
.share__title { font-weight: 600; }
.share__sub { font-size: 13px; color: var(--text-faint); }

.share__options { display: flex; flex-wrap: wrap; gap: 8px; }
/* Версий может быть много — тогда переключатель листается вбок, а не ломает окно. */
.share__options .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.share__options .segmented button { display: inline-flex; align-items: center; gap: 7px; }

.share__link { display: flex; gap: 8px; }
.share__url {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--text-dim);
  font-size: 14px;
}
.share__url:focus, .share__at:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.share__time { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; }
.share__time label { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.share__time input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.share__at {
  width: 78px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.share__send { margin-left: auto; }

@media (max-width: 860px) {
  .artist-hero { gap: 20px; }
  .artist-hero .avatar { width: 124px; }
  .release-hero { gap: 20px; }
  .release-hero .cover { width: 168px; }
}

@media (max-width: 640px) {
  .artists { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 4px; }
  .releases { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px; }
  .artist-hero { flex-direction: column; align-items: flex-start; text-align: start; }
  .release-hero { flex-direction: column; }
  .release-hero .cover { width: min(64vw, 236px); }
  .track { grid-template-columns: var(--track-lead, 28px) 42px minmax(0, 1fr) auto; gap: 11px; padding: 7px 4px; }
  .track--nocover { grid-template-columns: var(--track-lead, 28px) minmax(0, 1fr) auto; }
  .track__time { display: none; }
  .track__badges { display: none; }
}
