/* ================== БАЗА ================== */

body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, sans-serif;
  background: #000;
  color: #f5f4f0;
  line-height: 1.6;
}

main {
  max-width: 720px;
  padding: 80px 24px;
  margin: 0 auto;
}

h1 {
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 24px;
}

p {
  margin-bottom: 24px;
}

ul, ol {
  padding-left: 20px;
}

li {
  margin-bottom: 12px;
}

article {
  white-space: pre-line;
}

a {
  color: #eaeaea;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

a:hover {
  border-bottom-color: #fff;
}


/* ================== НАВИГАЦИЯ ================== */

.context-nav {
  display: flex;
  gap: 24px;
  margin: 32px 0 16px;
  font-size: 0.95rem;
  opacity: 0.75;
}

.context-nav a {
  border-bottom: none;
}

.context-nav a:hover {
  border-bottom: 1px solid rgba(255,255,255,0.4);
}


/* ================== SUPPORT ================== */

.support-block {
  margin: 2rem 0;
  opacity: 0.85;
}

.support-block .note {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.support-block .support {
  font-style: italic;
}

.subtle-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.25);
  opacity: 0.8;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.subtle-link:hover {
  opacity: 1;
  border-bottom-color: rgba(255,255,255,0.45);
}


/* ================== ГЛАВНАЯ ================== */

.home-page a {
  color: rgba(255,255,255,0.45);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.home-page a:hover {
  color: rgba(255,255,255,0.9);
  border-bottom-color: rgba(255,255,255,0.5);
}


/* ================== ФИКС ССЫЛКИ ================== */

.enter-link,
.manifest-link,
.pleer-link {
  position: fixed;
  top: 40px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  border-bottom: 1px solid rgba(255,255,255,0.25);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.enter-link { right: 40px; }
.manifest-link { left: 40px; }
.pleer-link {
  left: 50%;
  transform: translateX(-50%);
}

.enter-link:hover,
.manifest-link:hover, 
.pleer-link:hover {
  color: rgba(255,255,255,0.9);
  border-bottom-color: rgba(255,255,255,0.5);
}


/* ================== LATEST ================== */

.latest-block {
  margin: 2rem 0;
  text-align: center;
  opacity: 0.85;
}

.latest-title {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: lowercase;
  margin-bottom: 0.75rem;
}

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

.latest-list li {
  margin: 0.25rem 0;
}

.latest-list a {
  color: inherit;
  opacity: 0.8;
}

.latest-list a:hover {
  opacity: 1;
}


/* ================== СТРАНИЦЫ С ФОНОМ ================== */

.song-page,
.home-page,
.routes-index,
.archive-page,
.player-page,
.about-page,
.manifest-page,
.route-page {
  position: relative;
  min-height: 100vh;
}

.song-page::before,
.home-page::before,
.routes-index::before,
.archive-page::before,
.player-page::before,
.about-page::before,
.manifest-page::before,
.route-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
  z-index: -1;
}


/* ================== ГЛУБИНА ================== */

.song-page::before {
  background-image:
    radial-gradient(ellipse at center, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0.85) 100%),
    var(--bg-image);
  opacity: 0.12;
  filter: grayscale(1) contrast(1.1);
}

.home-page::before {
  background-image:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 0%, rgba(0,0,0,0.45) 70%, rgba(0,0,0,0.85) 100%),
    var(--bg-image);
  transform: scaleX(1.4);
}

.routes-index::before   { transform: scaleX(1.2); }
.archive-page::before  { transform: scaleX(1.15); }
.player-page::before   { transform: scaleX(1.15); }
.about-page::before    { transform: scaleX(1.1); }
.manifest-page::before { transform: scaleX(1.05); }
.route-page::before    { transform: scaleX(1.25); }


/* ================== ПЛЕЕР ================== */

.player-ui {
  margin: 1.5rem 0 2rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.player-now {
  margin-bottom: 1rem;
  opacity: 0.8;
}

.player-now-title {
  font-size: 1.1rem;
}

.player-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.player-controls button {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: inherit;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}

.player-controls button:hover {
  opacity: 0.85;
}

.player-controls button.is-active {
  border-color: rgba(255,255,255,0.6);
  color: rgba(255,255,255,0.95);
}

.player-timeline {
  position: relative;
  height: 4px;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  overflow: hidden;
}

.player-timeline-bar {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.45);
  transform: scaleX(0);
  transform-origin: left center;
}

.player-list {
  list-style: decimal;
  padding-left: 1.2rem;
}

.player-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0.45rem 0;
  opacity: 0.75;
}

.player-item.is-active {
  opacity: 1;
}

.player-item-button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.player-item-style {
  opacity: 0.6;
}


/* ================== АУДИО КНОПКИ ================== */

/* БЕЗ КВАДРАТА */
.audio-button {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  cursor: pointer;
}

.audio-button:hover {
  opacity: 0.85;
}


/* ================== МОБИЛА ================== */

@media (max-width: 640px) {

  main {
    padding: 56px 16px;
  }

  h1 {
    font-size: 24px;
  }

  article {
    white-space: normal;
  }

  /* навигация */
  .context-nav {
    flex-wrap: wrap;
    gap: 12px 16px;
    font-size: 1.05rem;
  }

  .context-nav a {
    padding: 10px 12px;
    line-height: 1.4;
  }

  /* аудио — комфортное касание */
  .audio-button {
    font-size: 1rem;
    min-height: 44px;
    margin: 12px 0;
  }

  /* фиксированные ссылки */
  .enter-link,
  .manifest-link,
  .pleer-link {
    top: 20px;
    font-size: 0.95rem;
  }

  .enter-link { right: 16px; }
  .manifest-link { left: 16px; }
  .pleer-link { left: 50%; transform: translateX(-50%); }

  /* фон: ТОЛЬКО контентные страницы */
  .song-page::before,
  .home-page::before,
  .archive-page::before,
  .about-page::before,
  .manifest-page::before,
  .route-page::before {
    position: absolute;
    background-size: cover;
    transform: none;
  }

  /* routes-index ОСТАВЛЯЕМ fixed — иначе пропадают картинки маршрутов */
  .routes-index::before {
    position: fixed;
    background-size: contain;
    transform: scaleX(1.2);
  }
}


/* ================== ПЛАНШЕТ ================== */

@media (min-width: 641px) and (max-width: 1024px) {
  main {
    max-width: 760px;
    padding: 72px 28px;
  }

  h1 {
    font-size: 30px;
  }

  .context-nav {
    gap: 18px;
    font-size: 0.95rem;
  }

  .enter-link,
  .manifest-link,
  .pleer-link {
    top: 32px;
    font-size: 0.85rem;
  }

  .enter-link { right: 28px; }
  .manifest-link { left: 28px; }
}


/* ================== ДЕСКТОП ================== */

@media (min-width: 1025px) and (max-width: 1600px) {
  main {
    max-width: 820px;
    padding: 88px 32px;
  }

  h1 {
    font-size: 34px;
  }

  .player-controls button {
    padding: 0.4rem 1rem;
  }
}


/* ================== ТВ/БОЛЬШИЕ ЭКРАНЫ ================== */

@media (min-width: 1601px) {
  body {
    font-size: 1.15rem;
  }

  main {
    max-width: 980px;
    padding: 110px 48px;
  }

  h1 {
    font-size: 40px;
  }

  .context-nav {
    font-size: 1rem;
  }

  .enter-link,
  .manifest-link,
  .pleer-link {
    top: 48px;
    font-size: 1rem;
  }

  .enter-link { right: 48px; }
  .manifest-link { left: 48px; }
}
