:root {
  --ruby-0: #000000;
  --ruby-1: #1a0004;
  --ruby-2: #4d0009;
  --ruby-3: #0d0002;
  --ruby-4: #2b0006;
  --glow: #b3001b;
  --text: #f3e9e6;
  --text-muted: #b79b9f;
  --border-color: rgba(179, 0, 27, 0.55);
}

* { box-sizing: border-box; }

a {
  color: inherit;
  text-decoration: none;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden; /* без прокрутки, всё на одном экране */
  overscroll-behavior: none;
  background: #000; /* чтобы не было белой вспышки до применения градиента */
}

html {
  color-scheme: dark; /* браузер сразу знает, что тема тёмная (в т.ч. Safari) */
}

body {
  position: relative;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: linear-gradient(
    115deg,
    var(--ruby-0) 0%,
    var(--ruby-3) 18%,
    var(--ruby-4) 36%,
    var(--ruby-2) 52%,
    var(--ruby-1) 68%,
    var(--ruby-0) 84%,
    var(--ruby-2) 100%
  );
  background-size: 420% 420%;
  animation: driftGradient 16s ease-in-out infinite;
}

@keyframes driftGradient {
  0%   { background-position: 0% 30%; }
  25%  { background-position: 60% 70%; }
  50%  { background-position: 100% 40%; }
  75%  { background-position: 40% 90%; }
  100% { background-position: 0% 30%; }
}

/* дополнительный слой мягкого красного свечения, плывущий отдельно —
   вместе с базовым градиентом даёт более живое "переливание" */
body::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(179, 0, 27, 0.35), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(120, 0, 20, 0.3), transparent 50%);
  animation: pulseGlow 30s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes pulseGlow {
  0%   { transform: translate(-3%, -2%) scale(1); opacity: 0.7; }
  100% { transform: translate(3%, 2%) scale(1.15); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  #stars { display: none; }
}

/* звёзды на канвасе, на заднем плане */
#stars {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
}

/* аккуратная окантовка вокруг всей страницы */
.frame {
  position: fixed;
  inset: 8px;
  z-index: 3;
  border: 1.5px solid var(--border-color);
  border-radius: 15px;
  box-shadow: 0 0 24px rgba(143, 3, 3, 0.15);
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 32px;
}

.title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(36px, 6vw, 56px);
  margin: 0 0 20px;
  letter-spacing: 0.01em;
  text-shadow:
    0 0 18px rgba(179, 0, 27, 0.55),
    0 0 46px rgba(179, 0, 27, 0.35),
    0 0 90px rgba(120, 0, 20, 0.25);
}

.bio {
  max-width: 52ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.page-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 46px;
  z-index: 2;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.page-footer .dot {
  margin: 0 8px;
  color: var(--border-color);
}

#clock {
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* ============================================
   Боковые панели: жанры / исполнители / избранное / ссылки
   ============================================ */
:root {
  --edge: clamp(28px, 4vw, 58px);
}

.panel {
  position: fixed;
  z-index: 2;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(10, 0, 2, 0.32);
  backdrop-filter: blur(3px);
  padding: 14px 18px;
}

.panel__title {
  margin: 0 0 10px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
}

.panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--text);
}

.panel__list--cols {
  columns: 2;
  column-gap: 22px;
}

/* жанры — слева сверху */
.panel--genres {
  top: var(--edge);
  left: var(--edge);
}

/* исполнители — слева снизу */
.panel--artists {
  bottom: var(--edge);
  left: var(--edge);
  max-width: 200px;
}

/* избранный трек — сверху по центру, со свечением */
.panel--favorite {
  top: var(--edge);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  box-shadow:
    0 0 16px rgba(179, 0, 27, 0.35),
    0 0 40px rgba(179, 0, 27, 0.18);
}

.favorite__label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glow);
}

.favorite__track {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

/* ссылки — справа, по центру высоты страницы */
.panel--links {
  right: var(--edge);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.link-item:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.link-item__icon {
  width: 20px;
  height: 20px;
}

.link-item span {
  font-size: 11px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .panel--links {
    flex-direction: row;
    right: auto;
    left: 50%;
    top: auto;
    bottom: 90px;
    transform: translateX(-50%);
  }
  .panel--genres,
  .panel--artists {
    position: fixed;
    font-size: 11px;
    padding: 10px 12px;
  }
  .panel--artists { max-width: 42vw; }
  .panel__list--cols { columns: 1; }
}
