/* ═══════════════════════════════════════════════════════════════
   ЛОГОВО АМАЗОНКИ · дизайн-система
   Сигнатура: температура интерфейса меняется вместе с настроением.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Основа */
  --ink:     #150409;
  --wine:    #23091a;
  --wine-2:  #300b22;
  --wine-3:  #3d0f2b;
  --line:    rgba(231, 176, 75, 0.15);
  --line-hot: rgba(210, 31, 76, 0.28);

  /* Палитра */
  --gold:    #e3b04b;
  --crimson: #d21f4c;
  --plum:    #7a3b78;
  --blush:   #ecc7cd;
  --text:    #f4e9ec;
  --muted:   #b78a98;

  /* Акцент по настроению (перезаписывается data-mood) */
  --accent:   #e3b04b;
  --accent-2: #d21f4c;
  --glow:     rgba(227, 176, 75, 0.35);

  --radius:  20px;
  --radius-s: 13px;
  --shadow:  0 18px 50px -20px rgba(0, 0, 0, 0.85);

  --display: "Cormorant Garamond", "Georgia", serif;
  --body:    "Manrope", system-ui, -apple-system, sans-serif;
}

/* ─── Температура настроения ─────────────────────────────────── */
body[data-mood="tender"] {
  --accent:   #db8fae;
  --accent-2: #7a3b78;
  --glow:     rgba(219, 143, 174, 0.32);
}
body[data-mood="spicy"] {
  --accent:   #e11f4c;
  --accent-2: #ff5c7a;
  --glow:     rgba(225, 31, 76, 0.42);
}
body[data-mood="mixed"] {
  --accent:   #e3b04b;
  --accent-2: #d21f4c;
  --glow:     rgba(227, 176, 75, 0.36);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(120% 60% at 50% -8%, rgba(122, 59, 120, 0.28), transparent 60%),
    radial-gradient(90% 50% at 50% 115%, rgba(210, 31, 76, 0.16), transparent 55%),
    var(--ink);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: --glow 0.5s;
}

/* Мерцающая «дымка логова» */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: radial-gradient(1px 1px at 20% 30%, rgba(227,176,75,.25), transparent),
                    radial-gradient(1px 1px at 70% 60%, rgba(210,31,76,.18), transparent),
                    radial-gradient(1px 1px at 40% 80%, rgba(219,143,174,.15), transparent);
  background-size: 260px 260px, 340px 340px, 420px 420px;
  opacity: .5; pointer-events: none; z-index: 0;
  animation: drift 40s linear infinite;
}
@keyframes drift { to { background-position: 260px 0, -340px 340px, 210px -420px; } }

.shell {
  position: relative; z-index: 1;
  max-width: 680px; margin: 0 auto;
  padding: 0 18px calc(96px + env(safe-area-inset-bottom));
}

/* ─── Типографика ────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.05; }
.eyebrow {
  font-family: var(--body); font-size: 11px; font-weight: 700;
  letter-spacing: .28em; text-transform: uppercase; color: var(--accent);
  opacity: .85;
}
.whisper { font-family: var(--display); font-style: italic; color: var(--blush); }

a { color: var(--accent); text-decoration: none; }

/* ─── Шапка ──────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 18px 12px;
  max-width: 680px; margin: 0 auto;
  background: linear-gradient(var(--ink) 62%, transparent);
  backdrop-filter: blur(4px);
}
.topbar .brand { display: flex; flex-direction: column; }
.topbar .brand small {
  font-family: var(--body); font-size: 10px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--muted);
}
.topbar .brand strong { font-family: var(--display); font-size: 23px; font-weight: 600; }

.mood-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--text);
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

/* ─── Карточки ───────────────────────────────────────────────── */
.card {
  position: relative;
  background: linear-gradient(160deg, var(--wine-2), var(--wine));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.card.hot { border-color: var(--line-hot); }
.card .kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

/* ─── Кнопки ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 800; font-size: 15px;
  padding: 15px 22px; border-radius: 999px; border: 0; cursor: pointer;
  color: #1a0510; background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px -12px var(--glow), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .12s ease, filter .2s;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.06); }
.btn.ghost {
  color: var(--text); background: transparent;
  border: 1px solid var(--line); box-shadow: none;
}
.btn.slim { padding: 11px 16px; font-size: 13px; width: auto; }

/* ─── Прогресс-полоса ────────────────────────────────────────── */
.bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.bar > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--glow);
  transition: width .6s cubic-bezier(.2,.8,.2,1);
}
.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring {
  --p: 0;
  width: 84px; height: 84px; border-radius: 50%; flex: none;
  background:
    radial-gradient(closest-side, var(--wine) 70%, transparent 71%),
    conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255,255,255,.08) 0);
  display: grid; place-items: center;
  font-family: var(--display); font-size: 24px; font-weight: 700;
}

/* ─── Дашборд-специфика ──────────────────────────────────────── */
.hero-day { display: flex; flex-direction: column; gap: 4px; }
.hero-day h2 { font-size: 30px; }
.hero-day .theme { font-size: 15px; color: var(--muted); }
.badge-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  border: 1px solid var(--line); font-size: 13px;
}

.weeklist { display: flex; flex-direction: column; gap: 12px; }
.weekrow { display: flex; align-items: center; gap: 12px; }
.weekrow .n {
  font-family: var(--display); font-size: 22px; width: 34px; color: var(--accent);
}
.weekrow .body { flex: 1; }
.weekrow .body .name { font-size: 14px; font-weight: 700; margin-bottom: 5px; }

/* ─── Упражнения / режим тренировки ─────────────────────────── */
.block-label {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 4px 10px; color: var(--muted);
}
.block-label .eyebrow { color: var(--muted); }
.block-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.ex {
  background: linear-gradient(160deg, var(--wine-2), var(--wine));
  border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 16px; margin-bottom: 12px; transition: border-color .3s, opacity .3s;
}
.ex.done { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.ex .head { display: flex; align-items: flex-start; gap: 12px; }
.ex .check {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  border: 2px solid var(--line); background: transparent; cursor: pointer;
  display: grid; place-items: center; font-size: 16px; color: transparent;
  transition: .2s; -webkit-tap-highlight-color: transparent;
}
.ex.done .check {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #1a0510;
}
.ex .name { font-weight: 800; font-size: 16px; line-height: 1.25; }
.ex .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ex .tag {
  font-size: 12px; font-weight: 700; color: var(--blush);
  padding: 5px 9px; border-radius: 8px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
}
.ex .motiv { font-family: var(--display); font-style: italic; color: var(--muted); margin-top: 10px; font-size: 15px; }
.ex .tech-toggle {
  margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--accent);
  background: none; border: 0; padding: 0; cursor: pointer;
}
.ex .tech { display: none; margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.ex .tech.open { display: block; }

.ex .inputs { display: none; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ex.done .inputs { display: flex; }
.field, .ex input.mini {
  background: rgba(0,0,0,.28); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-family: var(--body); font-size: 14px;
}
.ex input.mini { width: 92px; }
.field { width: 100%; }
.feelings { display: flex; gap: 6px; }
.feelings button {
  font-size: 20px; background: none; border: 1px solid transparent; cursor: pointer;
  border-radius: 9px; padding: 4px 6px; filter: grayscale(1) opacity(.5); transition: .15s;
}
.feelings button.on { filter: none; border-color: var(--line); background: rgba(255,255,255,.05); }

/* ─── Плеер ──────────────────────────────────────────────────── */
.player {
  position: fixed; left: 0; right: 0; bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 25; max-width: 680px; margin: 0 auto; padding: 0 12px;
}
.player .inner {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 20px; border: 1px solid transparent;
  background:
    linear-gradient(160deg, rgba(61,15,43,.92), rgba(35,9,26,.92)) padding-box,
    linear-gradient(135deg, var(--accent), var(--accent-2), var(--plum)) border-box;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow:
    0 22px 55px -22px #000,
    0 0 34px -12px var(--glow),
    inset 0 1px 0 rgba(255,255,255,.14),
    inset 0 -14px 30px -18px #000;
  overflow: hidden;
  animation: playerAura 3s ease-in-out infinite;
}
/* верхний блик стекла */
.player .inner::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,.10), transparent);
  pointer-events: none;
}
.player .now { flex: 1; min-width: 0; position: relative; z-index: 1; }
.player .now .t { font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .now .a { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player .ctl { display: flex; align-items: center; gap: 3px; position: relative; z-index: 1; }
.player .ctl button {
  position: relative; border: 1px solid rgba(255,255,255,.08); cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text);
  background:
    radial-gradient(120% 120% at 50% 20%, rgba(255,255,255,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.18));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 6px 14px -8px #000;
  transition: transform .14s ease, box-shadow .2s, color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.player .ctl button svg { width: 19px; height: 19px; display: block; }
.player .ctl button:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 10px 20px -10px var(--glow);
}
.player .ctl button:active { transform: scale(.92); }

/* активные тумблеры (шаффл/повтор) */
.player .ctl button.on {
  color: #1a0510;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 0 18px -4px var(--glow), inset 0 1px 0 rgba(255,255,255,.35);
}

/* главная кнопка play/pause */
.player .ctl button.main {
  width: 50px; height: 50px; color: #1a0510; border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow:
    0 0 26px -4px var(--glow),
    inset 0 2px 0 rgba(255,255,255,.4),
    inset 0 -6px 14px -6px rgba(0,0,0,.5);
  animation: mainGlow 2.6s ease-in-out infinite;
}
.player .ctl button.main svg { width: 24px; height: 24px; }
.player .ctl button.main:hover { transform: translateY(-1px) scale(1.04); }

/* переключение иконки play/pause по классу .playing */
.player .btn-play .ic-play  { display: block; }
.player .btn-play .ic-pause { display: none; }
.player.playing .btn-play .ic-play  { display: none; }
.player.playing .btn-play .ic-pause { display: block; }

/* дорожка перемотки со свечением и «бегунком» */
.player .seek {
  position: relative; z-index: 1; height: 6px; margin-top: 10px; cursor: pointer;
  background: rgba(255,255,255,.10); border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.5);
}
.player .seek > i {
  position: relative; display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--glow);
}
.player .seek > i::after {
  content: ""; position: absolute; right: -5px; top: 50%; width: 12px; height: 12px;
  transform: translateY(-50%); border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff, var(--accent) 60%);
  box-shadow: 0 0 12px var(--accent);
}

/* мини-эквалайзер (пляшет только во время игры) */
.player .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-bottom: 3px; }
.player .eq i {
  width: 3px; height: 100%; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transform-origin: bottom; transform: scaleY(.35);
  animation: eqBar 1s ease-in-out infinite; animation-play-state: paused;
}
.player .eq i:nth-child(2) { animation-delay: .2s; }
.player .eq i:nth-child(3) { animation-delay: .4s; }
.player .eq i:nth-child(4) { animation-delay: .1s; }
.player.playing .eq i { animation-play-state: running; }

.player.hidden { display: none; }

.playlist {
  margin-top: 10px; max-height: 40vh; overflow: auto;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.3);
}
.playlist.hidden { display: none; }
.playlist .row {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer;
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.playlist .row:last-child { border-bottom: 0; }
.playlist .row:hover { background: rgba(255,255,255,.04); }
.playlist .row.playing { color: var(--accent); font-weight: 800; }
.playlist .row .a { color: var(--muted); font-size: 12px; }

/* ─── Нижняя навигация ───────────────────────────────────────── */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  max-width: 680px; margin: 0 auto;
  display: flex; justify-content: space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--ink) 42%);
  backdrop-filter: blur(10px);
}
.nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 6px 10px; border-radius: 12px; transition: color .2s;
}
.nav a .ic { font-size: 20px; filter: grayscale(1) opacity(.7); transition: .2s; }
.nav a.active { color: var(--accent); }
.nav a.active .ic { filter: none; transform: translateY(-1px); }

/* ─── Шёпот Скорпиона (toast) ────────────────────────────────── */
.scorpio-toast {
  position: fixed; left: 50%; bottom: 150px; transform: translate(-50%, 40px);
  z-index: 60; max-width: min(560px, 92vw); width: max-content;
  padding: 16px 20px; border-radius: 18px;
  background: linear-gradient(160deg, var(--wine-3), var(--wine));
  border: 1px solid var(--line-hot);
  box-shadow: 0 24px 60px -18px #000, 0 0 40px -10px var(--glow);
  opacity: 0; pointer-events: none;
  transition: opacity .5s, transform .5s cubic-bezier(.2,.9,.2,1);
}
.scorpio-toast.show { opacity: 1; transform: translate(-50%, 0); }
.scorpio-toast .sig { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.scorpio-toast .sig .eyebrow { color: var(--accent); }
.scorpio-toast .body { font-family: var(--display); font-style: italic; font-size: 19px; line-height: 1.3; color: var(--blush); }

/* Всплывающий бейдж */
.ach-pop {
  position: fixed; left: 50%; top: 22%; transform: translate(-50%, -12px) scale(.9);
  z-index: 70; text-align: center; padding: 24px 28px; border-radius: 22px;
  background: linear-gradient(160deg, var(--wine-3), var(--wine));
  border: 1px solid var(--line); box-shadow: 0 0 60px -14px var(--glow), var(--shadow);
  opacity: 0; pointer-events: none; transition: .45s cubic-bezier(.2,.9,.2,1);
}
.ach-pop.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.ach-pop .ic { font-size: 52px; }
.ach-pop .title { font-family: var(--display); font-size: 24px; font-weight: 700; margin-top: 6px; }
.ach-pop .desc { font-size: 13px; color: var(--muted); margin-top: 4px; max-width: 260px; }

/* ─── Профиль / зеркало ─────────────────────────────────────── */
.profile-hero { display: flex; align-items: center; gap: 16px; }
.avatar {
  width: 84px; height: 84px; border-radius: 24px; object-fit: cover; flex: none;
  border: 2px solid var(--accent); box-shadow: 0 0 30px -8px var(--glow);
  background: var(--wine-3);
}
.avatar.ph { display: grid; place-items: center; font-size: 34px; }

.mood-switch { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 6px; }
.mood-switch button {
  padding: 12px 6px; border-radius: 14px; cursor: pointer; font-weight: 800; font-size: 13px;
  border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted);
  transition: .2s; -webkit-tap-highlight-color: transparent;
}
.mood-switch button.on {
  color: #1a0510; background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent; box-shadow: 0 10px 24px -12px var(--glow);
}
.mood-caption { font-family: var(--display); font-style: italic; color: var(--muted); margin-top: 10px; text-align: center; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.shot { position: relative; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); }
.shot img { width: 100%; height: 190px; object-fit: cover; display: block; }
.shot .tagline { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 800;
  padding: 4px 8px; border-radius: 8px; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.shot .acts { display: flex; gap: 8px; padding: 10px; }
.shot .acts button { flex: 1; font-size: 12px; padding: 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); font-weight: 700; }
.shot .acts button.shared { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #1a0510; border-color: transparent; }
.share-link { font-size: 12px; color: var(--accent); word-break: break-all; padding: 0 10px 10px; }

/* ─── Витрина Скорпиона (публичная) ─────────────────────────── */
.showcase { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.showcase .frame {
  max-width: 480px; width: 100%; text-align: center;
  background: linear-gradient(160deg, var(--wine-2), var(--wine));
  border: 1px solid var(--line-hot); border-radius: 24px; padding: 22px;
  box-shadow: 0 0 80px -20px var(--glow), var(--shadow);
}
.showcase img { width: 100%; border-radius: 16px; display: block; }
.showcase .cap { font-family: var(--display); font-style: italic; font-size: 22px; color: var(--blush); margin-top: 18px; line-height: 1.3; }
.showcase .sign { margin-top: 14px; color: var(--accent); font-weight: 800; letter-spacing: .2em; font-size: 12px; }

/* ─── Летопись / графики ─────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px; }
.stat .v { font-family: var(--display); font-size: 34px; font-weight: 700; color: var(--accent); }
.stat .l { font-size: 12px; color: var(--muted); }
canvas.chart { width: 100%; height: 200px; display: block; }

/* ─── Трофеи ─────────────────────────────────────────────────── */
.trophy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.trophy { text-align: center; padding: 20px 14px; }
.trophy.locked { opacity: .42; filter: grayscale(.7); }
.trophy .ic { font-size: 42px; }
.trophy .t { font-family: var(--display); font-size: 18px; font-weight: 700; margin-top: 6px; }
.trophy .d { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.trophy .hint { font-size: 11px; color: var(--accent); margin-top: 8px; }

/* ─── Вход ───────────────────────────────────────────────────── */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.gate .frame { max-width: 380px; width: 100%; text-align: center; }
.gate h1 { font-size: 44px; margin-bottom: 6px; }
.gate .sub { font-family: var(--display); font-style: italic; color: var(--muted); margin-bottom: 26px; }
.gate form { display: flex; flex-direction: column; gap: 12px; }
.gate .err { color: var(--crimson); font-size: 13px; }

/* ─── Утилиты ────────────────────────────────────────────────── */
.muted { color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; font-family: var(--display); font-style: italic; font-size: 18px; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 4px 12px; }
.section-title h2 { font-size: 24px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
}

@media (min-width: 520px) {
  .hero-day h2 { font-size: 36px; }
  .gate h1 { font-size: 52px; }
}

/* ═══════════════════════════════════════════════════════════════
   Фоновые изображения экранов
   Файлы: static/img/bg-<экран>.webp · слой лежит под контентом,
   тёмная вуаль сверху держит текст читаемым. Мобильно: cover + center,
   слой position:fixed (без iOS-джиттера от background-attachment).
   ═══════════════════════════════════════════════════════════════ */
.bg-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center center; background-repeat: no-repeat;
  opacity: 0; transition: opacity .7s ease;
}
.bg-layer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg,
              rgba(21, 4, 9, 0.55) 0%,
              rgba(21, 4, 9, 0.74) 45%,
              rgba(21, 4, 9, 0.93) 100%);
}
body[data-page] .bg-layer { opacity: 1; }

body[data-page="login"]     .bg-layer { background-image: url("../img/bg-login.webp"); }
body[data-page="dashboard"] .bg-layer { background-image: url("../img/bg-dashboard.webp"); }
body[data-page="campaign"]  .bg-layer { background-image: url("../img/bg-campaign.webp"); }
body[data-page="profile"]   .bg-layer { background-image: url("../img/bg-profile.webp"); }
body[data-page="progress"]  .bg-layer { background-image: url("../img/bg-progress.webp"); }
body[data-page="trophies"]  .bg-layer { background-image: url("../img/bg-trophies.webp"); }
body[data-page="workout"]   .bg-layer { background-image: url("../img/bg-workout.webp"); }

/* На широких экранах прижимаем «героику» кадра к верху */
@media (min-width: 600px) {
  .bg-layer { background-position: center top; }
}

/* ═══════════════════════════════════════════════════════════════
   Живая анимация — мягкие переливы и свечение (цикл ~3 сек).
   Всё уважает prefers-reduced-motion (глобальное правило выше).
   ═══════════════════════════════════════════════════════════════ */

/* Плеер — рамка переливается акцент → акцент-2 */
@keyframes playerAura {
  0%, 100% { box-shadow: 0 22px 55px -22px #000, 0 0 30px -14px var(--glow),
             inset 0 1px 0 rgba(255,255,255,.14), inset 0 -14px 30px -18px #000; }
  50%      { box-shadow: 0 22px 55px -22px #000, 0 0 40px -8px var(--accent-2),
             inset 0 1px 0 rgba(255,255,255,.18), inset 0 -14px 30px -18px #000; }
}
@keyframes mainGlow {
  0%, 100% { box-shadow: 0 0 22px -6px var(--glow), inset 0 2px 0 rgba(255,255,255,.4), inset 0 -6px 14px -6px rgba(0,0,0,.5); }
  50%      { box-shadow: 0 0 34px -2px var(--accent-2), inset 0 2px 0 rgba(255,255,255,.5), inset 0 -6px 14px -6px rgba(0,0,0,.5); }
}
@keyframes eqBar {
  0%, 100% { transform: scaleY(.3); }
  50%      { transform: scaleY(1); }
}

/* Универсальная «аура»: горячая карточка и плашка настроения —
   рамка и свечение переливаются между акцентами. Видно на КАЖДОМ экране
   (плашка настроения живёт в шапке всех страниц). */
@keyframes auraFrame {
  0%, 100% { border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
             box-shadow: var(--shadow), 0 0 22px -12px var(--glow); }
  50%      { border-color: color-mix(in srgb, var(--accent-2) 75%, transparent);
             box-shadow: var(--shadow), 0 0 30px -6px var(--accent-2); }
}
.card.hot { animation: auraFrame 3s ease-in-out infinite; }

.mood-pill {
  position: relative;
  animation: pillGlow 2.6s ease-in-out infinite;
}
@keyframes pillGlow {
  0%, 100% { border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
             box-shadow: 0 0 0 0 transparent; }
  50%      { border-color: color-mix(in srgb, var(--accent-2) 70%, transparent);
             box-shadow: 0 0 18px -4px var(--accent-2); }
}

/* Надписи-надзаголовки мягко дышат светом — есть почти на каждом экране */
.eyebrow { animation: ebBreathe 3s ease-in-out infinite; }
@keyframes ebBreathe {
  0%, 100% { text-shadow: 0 0 0 transparent; opacity: .85; }
  50%      { text-shadow: 0 0 14px var(--glow); opacity: 1; }
}

/* Активная иконка нижней навигации мягко пульсирует (каждая страница) */
.nav a.active .ic { animation: navPulse 2.4s ease-in-out infinite; }
@keyframes navPulse {
  0%, 100% { filter: none; text-shadow: 0 0 0 transparent; }
  50%      { filter: brightness(1.15); text-shadow: 0 0 12px var(--glow); }
}

/* Первичные кнопки: раз в цикл по ним пробегает световой блик */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.38) 50%, transparent 70%);
  transform: translateX(-130%);
  animation: btnSheen 4.5s ease-in-out infinite;
}
@keyframes btnSheen {
  0%   { transform: translateX(-130%); }
  22%  { transform: translateX(130%); }
  100% { transform: translateX(130%); }
}
.btn.ghost::after { display: none; }

/* Кольцо прогресса на дашборде — лёгкое живое свечение */
.ring { animation: ringGlow 3s ease-in-out infinite; }
@keyframes ringGlow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50%      { filter: drop-shadow(0 0 10px var(--glow)); }
}
