/* ============================================================
   Наталья Петрова — страница «Музыка» (тёмная тема)
   ============================================================ */

:root {
  --bg:        #121016;
  --bg-2:      #17141c;
  --surface:   #1e1a25;
  --surface-2: #262030;
  --line:      #2d2736;

  --text:      #f4eff8;
  --muted:     #9a91a5;

  --accent:    #f5b72e;
  --accent-2:  #ff8a3d;
  --accent-grad: linear-gradient(135deg, #f7c948, #f08a24);
  --purple:    #8a3d7f;

  --radius: 16px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 116px; /* место под нижний плеер */
}

body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Доступность */
.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 3000;
  padding: 12px 20px;
  background: var(--accent);
  color: #3a2406;
  border-radius: 10px;
  font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

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

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

/* Верхняя панель */
.topbar {
  position: sticky;
  top: 0;
  z-index: 800;
  background: rgba(18, 16, 22, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}
.topbar__back svg { color: var(--accent); }
.topbar__home {
  margin-inline-start: auto;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  transition: color .2s var(--ease);
}
.topbar__home:hover { color: var(--accent); }

/* Шапка исполнителя */
.artist {
  padding: clamp(36px, 6vw, 64px) 0 28px;
  background:
    radial-gradient(60% 90% at 18% 0%, rgba(138, 61, 127, .38), transparent 60%),
    radial-gradient(50% 80% at 90% 8%, rgba(245, 183, 46, .14), transparent 55%),
    var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.artist__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  text-align: center;
}
.artist__avatar {
  width: clamp(150px, 30vw, 200px);
  height: clamp(150px, 30vw, 200px);
  border-radius: 50%;
  overflow: hidden;
  margin-inline: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5), 0 0 0 4px rgba(245, 183, 46, .28);
}
.artist__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
}

.artist__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}
.artist__eyebrow svg { color: var(--accent); }

.artist__name {
  margin-top: 10px;
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.artist__sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 1rem;
}

.artist__meta {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: .92rem;
}
.artist__meta strong { color: var(--text); font-weight: 700; }
.artist__meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }

.artist__actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.stream-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: .9rem;
  transition: transform .22s var(--ease), background .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.stream-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.stream-btn--primary {
  background: var(--accent-grad);
  color: #3a2406;
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(240, 138, 36, .3);
}
.stream-btn--primary:hover { box-shadow: 0 16px 34px rgba(240, 138, 36, .42); }
.stream-btn__logo {
  width: 30px; height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  background: #fff;
  display: grid; place-items: center;
}
.stream-btn__logo img { width: 100%; height: 100%; object-fit: cover; }

/* Список треков */
.tracks { padding: 32px 0 40px; }
.tracks__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.tracks__title { font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; }
.tracks__count { color: var(--muted); font-size: .9rem; }

.tracklist { list-style: none; padding: 0; margin: 0; }

.track {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: var(--radius);
  transition: background .2s var(--ease);
}
.track:hover { background: var(--surface); }

.track__index {
  width: 22px;
  flex: 0 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
}

.track__cover {
  width: 52px; height: 52px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(138, 61, 127, .5), rgba(245, 183, 46, .35));
  color: var(--text);
}

.track__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.track__title {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track__artist { color: var(--muted); font-size: .85rem; }

.track__clip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: .85rem;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.track__clip:hover { background: var(--accent); color: #3a2406; border-color: var(--accent); }
.track__clip svg { width: 15px; height: 15px; }

.track__play {
  width: 42px; height: 42px;
  flex: 0 0 auto;
  border: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-grad);
  color: #3a2406;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.track__play:hover { transform: scale(1.06); box-shadow: 0 10px 24px rgba(240, 138, 36, .35); }

.track__duration {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}

/* Нижний плеер */
.player {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 900;
  background: rgba(24, 20, 29, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.player__bar {
  max-width: 1080px;
  margin-inline: auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.p-cover {
  width: 48px; height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  display: none;
}
.p-cover img { width: 100%; height: 100%; object-fit: cover; }

.p-btn {
  border: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-grad);
  color: #3a2406;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.p-btn:hover { transform: scale(1.06); }
.p-btn--play { width: 46px; height: 46px; flex: 0 0 auto; }
.p-btn--play svg { width: 20px; height: 20px; }
.p-btn__pause { display: none; }
.p-btn.is-playing .p-btn__pause { display: block; }
.p-btn.is-playing .p-btn__play { display: none; }

.p-meta {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.p-title { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-artist { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.p-progress {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
}
.p-progress__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--accent-grad);
  position: relative;
}
.p-progress__fill::after {
  content: "";
  position: absolute;
  right: -6px; top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
  opacity: 0;
  transition: opacity .2s var(--ease);
}
.p-progress:hover .p-progress__fill::after { opacity: 1; }

.p-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.p-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.p-mute {
  width: 34px; height: 34px;
  border: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: transparent;
  color: var(--muted);
  transition: color .2s var(--ease);
}
.p-mute:hover { color: var(--text); }
.p-mute svg { width: 20px; height: 20px; }
.p-mute__off { display: none; }
.p-mute.is-muted .p-mute__off { display: block; }
.p-mute.is-muted .p-mute__on { display: none; }

.p-volume__track {
  width: 80px;
  height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
}
.p-volume__fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: var(--muted);
}

/* Модальное окно клипа */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.modal__dialog {
  position: relative;
  width: min(920px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .6);
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal__title { font-size: 1.05rem; font-weight: 700; }
.modal__close {
  width: 38px; height: 38px;
  border: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.modal__close:hover { background: var(--accent); color: #3a2406; }

.modal__screen {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  background:
    radial-gradient(50% 70% at 50% 30%, rgba(138, 61, 127, .45), transparent 65%),
    radial-gradient(40% 60% at 70% 70%, rgba(245, 183, 46, .18), transparent 60%),
    #000;
}
.modal__bigplay {
  width: 92px; height: 92px;
  border: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-grad);
  color: #3a2406;
  box-shadow: 0 0 0 16px rgba(245, 183, 46, .16);
  animation: pulse 2.2s ease-in-out infinite;
}
.modal__bigplay svg { width: 34px; height: 34px; margin-left: 4px; }
.modal__soon { color: var(--muted); font-weight: 600; font-size: .95rem; }

.modal__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--muted);
}
.modal__bar-play {
  width: 34px; height: 34px;
  border: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--muted);
}
.modal__time { font-size: .78rem; font-variant-numeric: tabular-nums; }
.modal__progress {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
}
.modal__progress-fill { height: 100%; width: 0; border-radius: 999px; background: var(--accent-grad); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 12px rgba(245, 183, 46, .12); }
  50% { box-shadow: 0 0 0 24px rgba(245, 183, 46, .02); }
}

/* Уведомление */
.toast {
  position: fixed;
  left: 50%;
  bottom: 116px;
  transform: translate(-50%, 20px);
  padding: 12px 24px;
  background: #2b2433;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  z-index: 1400;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Адаптивность */
@media (min-width: 720px) {
  .artist__grid { grid-template-columns: auto 1fr; gap: 40px; text-align: left; }
  .artist__avatar { margin-inline: 0; }
  .artist__meta, .artist__actions { justify-content: flex-start; }
  .p-cover { display: block; }
  .p-meta { max-width: 220px; }
}

@media (max-width: 600px) {
  .p-volume { display: none; }
  .track__clip span { display: none; }
  .track__clip { padding: 9px 11px; }
  .track__duration { display: none; }
}


/* ============================================================
   Пустое состояние, активный трек, обложка в списке
   ============================================================ */
.tracks-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-height: 220px;
  padding: 30px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.tracks-empty svg { color: var(--accent); opacity: .8; }

.track.is-active { background: var(--surface); }
.track.is-active .track__title { color: var(--accent); }

.track__cover { overflow: hidden; }
.track__cover img { width: 100%; height: 100%; object-fit: cover; }
