/* ===== Токены ===== */
:root {
  /* Клубничная палитра по логотипу: тёмный бордо, красная ягода, зелёные листья, золотые семечки */
  --bg: #110205;
  --shell: #1a060a;
  --card: #230a10;
  --card-hi: #3a0f18;
  --border: #4a1820;
  --border-hi: #7a2530;
  --text: #fff1f1;
  --muted: #b58d92;
  --accent: #e3122f;
  --accent-2: #ff8088;
  --gold: #f2c95c;
  --green: #7ed63f;
  --red: #ff2d6f;
  --radius: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .5);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* Угол для бегущей рамки (анимируемая переменная) */
@property --ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: radial-gradient(1200px 700px at 50% -10%, #4a0810 0%, var(--bg) 62%) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", system-ui, sans-serif;
  min-height: 100vh;
  padding: 16px 16px 96px;
}

/* ===== Задний фон: два мягких пятна света и редкие точки ===== */
.bg-fx {
  position: fixed; inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.glow {
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 18, 47, .2), transparent 62%);
  animation: glow-drift 30s ease-in-out infinite alternate;
  will-change: transform;
}
.glow-a { left: -22vmax; top: -28vmax; }
.glow-b {
  right: -26vmax; bottom: -32vmax;
  background: radial-gradient(circle, rgba(255, 70, 110, .13), transparent 62%);
  animation-duration: 38s;
  animation-direction: alternate-reverse;
}
/* Точки: положение, размер и темп — случайные, из JS */
.dot {
  position: absolute; left: var(--x); bottom: -8px;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: #ffb3b8;
  opacity: 0;
  animation: dot-rise var(--t) linear var(--dl) infinite;
}

a { color: var(--accent-2); transition: color .2s; }
a:hover { color: #fff; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

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


/* ===== Каркас ===== */
.shell {
  max-width: 420px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(42, 9, 16, .86), rgba(26, 6, 10, .9));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px 18px 24px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
  animation: shell-in .7s var(--ease-out) backwards;
}

/* ===== Шапка ===== */
.hero { text-align: center; }
.brand { position: relative; display: inline-block; }
/* Листики над названием */
.crown {
  display: block;
  width: 48px; height: auto;
  margin: 0 auto -2px;
  transform-origin: 50% 100%;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .5));
  animation:
    pop .6s var(--ease-spring) .05s backwards,
    sway 4.5s ease-in-out 1s infinite alternate;
}
.age {
  position: absolute; right: -38px; top: 44px;
  font-size: 11px; font-weight: 700; line-height: 1;
  color: #fff;
  background: #14030a;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 4px 7px;
  box-shadow: 0 0 14px rgba(227, 18, 47, .55);
  animation: pop .5s var(--ease-spring) .95s backwards;
}
.age[hidden] { display: none; }
.logo {
  font: 400 58px/1 "Lilita One", "Inter", sans-serif;
  letter-spacing: 1px;
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 38%, #fff 50%, var(--accent-2) 62%, var(--accent) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(227, 18, 47, .45));
  animation:
    logo-in 1s var(--ease-out) .15s backwards,
    shimmer 5s ease-in-out 1.2s infinite alternate;
}
.tagline {
  color: var(--muted); margin: 10px 0 18px; letter-spacing: .5px;
  animation: rise .6s var(--ease-out) .45s backwards;
}

.badges {
  list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.badges li {
  font-size: 12px; font-weight: 500;
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: transform .25s var(--ease-spring), border-color .2s;
  animation: pop .5s var(--ease-spring) backwards;
}
.badges li:nth-child(1) { animation-delay: .6s; }
.badges li:nth-child(2) { animation-delay: .68s; }
.badges li:nth-child(3) { animation-delay: .76s; }

/* ===== Превью ===== */
.preview { margin-top: 22px; text-align: center; }
.preview-media {
  position: relative;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 7;
}
.preview-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 1.2s var(--ease-out);
}
/* Блик, пробегающий по превью */
.preview-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .1) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: sweep 6s var(--ease-out) 1.5s infinite;
  pointer-events: none;
}
.preview-note { color: var(--accent-2); font-weight: 600; font-size: 13px; margin-top: 10px; }

.preview-admin {
  max-width: 560px;
  margin: 20px auto;
  padding: clamp(16px, 4vw, 28px);
  display: grid;
  gap: 16px;
  background: var(--shell);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.preview-admin h1 { font-size: clamp(22px, 5vw, 28px); }
.preview-admin .preview-media::after { display: none; }
.preview-admin form { display: grid; gap: 10px; justify-items: start; }
.preview-admin input[type=file] { max-width: 100%; color: inherit; font: inherit; }
.preview-admin input::file-selector-button { margin-right: 10px; padding: 6px 10px; }
.preview-admin .btn { width: auto; }
.preview-admin [role=alert] { color: var(--accent-2); }

.divider {
  height: 1px; margin: 22px 0;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ===== Секции ===== */
.section-title {
  text-align: center;
  font-size: 11px; font-weight: 600;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.plans-list { display: grid; gap: 14px; }

/* ===== Появление при прокрутке (класс .reveal ставит JS) ===== */
.reveal { opacity: 0; }
.reveal.is-in {
  opacity: 1;
  animation: rise .7s var(--ease-out) var(--d, 0ms) backwards;
}
.divider.reveal.is-in { animation-name: draw; }
.reveal.is-in .features li {
  animation: slide-in .45s var(--ease-out) backwards;
  animation-delay: calc(var(--d, 0ms) + 180ms + var(--i, 0) * 55ms);
}
.reveal.is-in .price-off {
  animation: pop .5s var(--ease-spring) backwards;
  animation-delay: calc(var(--d, 0ms) + 1000ms);
}
.reveal.is-in .tag {
  animation: tag-in .5s var(--ease-spring) backwards;
  animation-delay: calc(var(--d, 0ms) + 250ms);
}

/* ===== Карточка тарифа ===== */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px 18px;
  transition: transform .35s var(--ease-out), border-color .25s, box-shadow .35s;
}
/* Подсветка, следующая за курсором (--mx/--my задаёт JS) */
.card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 128, 136, .1), transparent 65%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.card h3 { font-size: 19px; margin-bottom: 2px; }
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

.card.is-featured {
  background: linear-gradient(180deg, #1a2a1a00, var(--card-hi));
  border-color: rgba(245, 195, 91, .55);
  box-shadow: 0 0 0 1px rgba(245, 195, 91, .15), 0 10px 40px rgba(245, 195, 91, .08);
}
.card.is-featured::before {
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(245, 195, 91, .1), transparent 65%);
}
/* Бегущий огонёк по рамке лучшего тарифа */
.card.is-featured::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--ang), transparent 0 62%, var(--gold) 80%, #fff3c4 86%, var(--gold) 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin 5s linear infinite;
  pointer-events: none;
}
.card.is-exclusive {
  border-color: rgba(255, 45, 111, .5);
  box-shadow: 0 10px 40px rgba(255, 45, 111, .08);
}
.card.is-exclusive::before {
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 45, 111, .1), transparent 65%);
}

.tag {
  position: absolute; top: -10px; right: 16px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: #fff;
}
.tag-gold { background: var(--gold); color: #2a1500; }
.tag-red { background: var(--red); color: #fff; }
.tag-red::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  border: 1px solid var(--red);
  animation: ping 2.2s var(--ease-out) infinite;
  pointer-events: none;
}
.tag-promo { background: var(--green); color: #0c1f02; }

.features { list-style: none; display: grid; gap: 6px; margin-bottom: 16px; }
.features li { font-size: 14px; padding-left: 22px; position: relative; }
.features li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

.price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.price-now { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-old { color: var(--muted); text-decoration: line-through; }
.price-off {
  font-size: 12px; font-weight: 700;
  color: var(--green);
  background: rgba(126, 214, 63, .12);
  padding: 2px 8px; border-radius: 6px;
}

/* ===== Кнопки ===== */
.btn {
  position: relative; overflow: hidden;
  display: block; width: 100%;
  font: 600 15px "Inter", sans-serif;
  padding: 13px 16px;
  border-radius: 14px; border: 0;
  cursor: pointer;
  transition: filter .2s, transform .25s var(--ease-spring), box-shadow .25s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); transition-duration: .08s; }
.btn-primary {
  background: linear-gradient(180deg, #f0283a, #b80c1a);
  color: #fff;
  box-shadow: 0 6px 24px rgba(227, 18, 47, .3);
}
/* Блик на кнопке */
.btn-primary::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: translateX(-130%) skewX(-18deg);
  pointer-events: none;
}
.is-featured .btn-primary::after { animation: btn-shine 4.5s var(--ease-out) 2s infinite; }
.btn-ghost {
  margin: 18px 0 24px;
  background: var(--card); color: var(--text);
  border: 1px solid var(--border);
}

/* Волна от нажатия (элемент создаёт JS) */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple .6s var(--ease-out) forwards;
  pointer-events: none;
}
.btn-ghost .ripple, .fab .ripple { background: rgba(255, 128, 136, .22); }

.card-free { text-align: center; border-style: dashed; }
.card-free .price { justify-content: center; }
.card-free .price-now {
  color: var(--green);
  animation: glow 2.6s ease-in-out infinite alternate;
}

.footer { text-align: center; margin-top: 24px; display: grid; gap: 6px; font-size: 14px; }

/* ===== Плавающая кнопка ===== */
.fab {
  position: fixed; right: 20px; bottom: 20px;
  overflow: hidden;
  font: 600 14px "Inter", sans-serif;
  color: var(--gold);
  background: #17140c;
  border: 1px solid rgba(245, 195, 91, .5);
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  transition: transform .3s var(--ease-spring), box-shadow .3s, border-color .2s;
  animation: fab-in .7s var(--ease-spring) 1s backwards;
  -webkit-tap-highlight-color: transparent;
}
.fab:active { transform: scale(.95); transition-duration: .08s; }
.fab.is-bump { animation: bump .6s var(--ease-spring); }

/* ===== Наведение — только там, где есть курсор ===== */
@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hi);
    box-shadow: 0 18px 44px rgba(0, 0, 0, .4);
  }
  .card:hover::before { opacity: 1; }
  .card.is-featured:hover {
    border-color: rgba(245, 195, 91, .8);
    box-shadow: 0 0 0 1px rgba(245, 195, 91, .2), 0 18px 50px rgba(245, 195, 91, .14);
  }
  .card.is-exclusive:hover {
    border-color: rgba(255, 45, 111, .75);
    box-shadow: 0 18px 50px rgba(255, 45, 111, .14);
  }
  .badges li:hover { transform: translateY(-2px); border-color: var(--border-hi); }
  .preview-media:hover img { transform: scale(1.05); }
  .btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 32px rgba(227, 18, 47, .45);
  }
  .btn-primary:hover::after {
    transform: translateX(330%) skewX(-18deg);
    transition: transform .7s var(--ease-out);
    animation: none;
  }
  .btn-ghost:hover { border-color: var(--border-hi); transform: translateY(-1px); }
  .btn:hover:active { transform: scale(.97); }
  .fab:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 12px 36px rgba(245, 195, 91, .18);
  }
  .fab:hover:active { transform: scale(.95); }
  .modal-x:hover { color: var(--text); transform: rotate(90deg); }
}

/* ===== Модалка ===== */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 1, 3, .78); backdrop-filter: blur(4px);
  animation: fade .3s ease-out backwards;
}
.modal-box {
  position: relative; width: 100%; max-width: 400px;
  background: var(--shell); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 20px 20px;
  box-shadow: var(--shadow);
  max-height: 85vh; overflow-y: auto;
  animation: modal-in .45s var(--ease-out) backwards;
}
.modal.is-closing .modal-backdrop { animation: fade .2s ease-in reverse forwards; }
.modal.is-closing .modal-box { animation: modal-out .2s ease-in forwards; }
.modal-box h3 { margin-bottom: 14px; }
#modal-body > * { animation: rise .45s var(--ease-out) backwards; }
#modal-body > :nth-child(1) { animation-delay: .08s; }
#modal-body > :nth-child(2) { animation-delay: .13s; }
#modal-body > :nth-child(3) { animation-delay: .18s; }
#modal-body > :nth-child(4) { animation-delay: .23s; }
#modal-body > :nth-child(5) { animation-delay: .28s; }
#modal-body > :nth-child(n+6) { animation-delay: .33s; }
.modal.is-closing #modal-body > * { animation: none; }
.modal-x {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 0; color: var(--muted);
  font-size: 26px; cursor: pointer; line-height: 1;
  transition: color .2s, transform .3s var(--ease-out);
}
.modal-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.modal-row:last-of-type { border-bottom: 0; margin-bottom: 14px; }

/* Способы оплаты в окне заказа */
.pay-list { display: grid; gap: 10px; margin-top: 16px; }
.btn-stars {
  background: linear-gradient(180deg, #ffd978, #e9a92c);
  color: #2a1500;
  box-shadow: 0 6px 24px rgba(242, 201, 92, .28);
}
.btn-crypto {
  background: #14040a;
  color: var(--text);
  border: 1px solid var(--border-hi);
}
.btn-stars .ripple { background: rgba(255, 255, 255, .5); }
.btn-crypto .ripple { background: rgba(255, 128, 136, .22); }
@media (hover: hover) {
  .btn-stars:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 30px rgba(242, 201, 92, .4); }
  .btn-crypto:hover { border-color: var(--accent-2); transform: translateY(-1px); }
  .btn-stars:hover:active, .btn-crypto:hover:active { transform: scale(.97); }
}
.pay-note { min-height: 20px; margin-top: 10px; font-size: 13px; text-align: center; color: var(--muted); }
.pay-note:empty { display: none; }

.review { padding: 12px 0; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.review b { display: block; margin-bottom: 2px; }
.stars { color: var(--gold); font-size: 13px; }

.status { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.status-wait { color: var(--gold); background: rgba(245, 195, 91, .12); }
.status-paid { color: var(--green); background: rgba(126, 214, 63, .12); }

/* ===== Ключевые кадры ===== */
@keyframes glow-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(12vmax, 8vmax, 0) scale(1.15); }
}
@keyframes dot-rise {
  0%       { transform: translate3d(0, 0, 0); opacity: 0; }
  15%, 85% { opacity: var(--o); }
  100%     { transform: translate3d(var(--dx), -104vh, 0); opacity: 0; }
}
@keyframes sway {
  from { transform: rotate(-6deg); }
  to   { transform: rotate(6deg); }
}
@keyframes shell-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes logo-in {
  from { opacity: 0; letter-spacing: 10px; transform: scale(.94); }
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to   { background-position: 0% 0; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }
@keyframes tag-in { from { opacity: 0; transform: translateY(8px) scale(.6); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-10px); } }
@keyframes draw { from { opacity: 0; transform: scaleX(0); } }
@keyframes fade { from { opacity: 0; } }
@keyframes sweep {
  0% { transform: translateX(-100%); }
  35%, 100% { transform: translateX(100%); }
}
@keyframes btn-shine {
  0% { transform: translateX(-130%) skewX(-18deg); }
  30%, 100% { transform: translateX(330%) skewX(-18deg); }
}
@keyframes spin { to { --ang: 360deg; } }
@keyframes ping {
  from { transform: scale(1); opacity: .9; }
  70%, to { transform: scale(1.35, 1.9); opacity: 0; }
}
@keyframes glow {
  from { text-shadow: 0 0 0 rgba(126, 214, 63, 0); }
  to   { text-shadow: 0 0 22px rgba(126, 214, 63, .55); }
}
@keyframes ripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
@keyframes fab-in { from { opacity: 0; transform: translateY(40px) scale(.8); } }
@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.14) translateY(-4px); }
  100% { transform: scale(1); }
}
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes modal-out { to { opacity: 0; transform: translateY(12px) scale(.97); } }

/* ===== Уважение к настройке «меньше движения» ===== */
/* Движение не убираем совсем, а смягчаем: вместо полётов — плавные проявления,
   бесконечные циклы (фон, блики, бегущая рамка, пульс) отключены. */
@media (prefers-reduced-motion: reduce) {
  /* Задний фон (.bg-fx и сияние) намеренно анимирован всегда — так просил владелец сайта. */
  .preview-media::after,
  .tag-red::after,
  .card.is-featured::after,
  .is-featured .btn-primary::after,
  .card-free .price-now { animation: none; }
  .card.is-featured::after { display: none; }
  .crown { animation: pop .6s ease-out .05s backwards; }
  .logo { animation: logo-in .8s ease-out .1s backwards; }
  .preview-media img { transition: none; }

  @keyframes shell-in { from { opacity: 0; } }
  @keyframes logo-in { from { opacity: 0; } }
  @keyframes rise { from { opacity: 0; } }
  @keyframes pop { from { opacity: 0; } }
  @keyframes tag-in { from { opacity: 0; } }
  @keyframes slide-in { from { opacity: 0; } }
  @keyframes draw { from { opacity: 0; } }
  @keyframes fab-in { from { opacity: 0; } }
  @keyframes modal-in { from { opacity: 0; } }
  @keyframes modal-out { to { opacity: 0; } }
  @keyframes bump { 50% { border-color: var(--gold); } }
}
