/* VPN «Аттракцион» — витрина и монетка.
   Внешних зависимостей нет: ни шрифтов с CDN, ни библиотек. Сайт должен
   открываться там же, где работает вход в РФ, а туда чужие домены не тянем. */

:root {
  --ink: #0a0611;
  --ink-2: #140c22;
  --ink-3: #1c1130;
  --gold: #f7c948;
  --gold-soft: #ffe9a8;
  --magenta: #ff3d81;
  --violet: #7b5cff;
  --cyan: #35e0d0;
  --text: #f4eeff;
  --muted: #a08fc4;
  --line: rgba(255, 255, 255, 0.09);
  --card: rgba(255, 255, 255, 0.035);
  --radius: 20px;
  --font: "Inter", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Noto Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Купол шапито: полосатый свет сверху + два цветных пятна по краям.
   Слой абсолютный, а не fixed, и гасится верхним градиентом, а не mask:
   fixed + mask на всю ширину роняет композитор в Chromium — страница
   становится чёрной при первом же скролле. */
body { position: relative; }

body::before {
  content: "";
  position: absolute;
  top: -20vh;
  left: -10vw;
  right: -10vw;
  height: 92vh;
  background:
    linear-gradient(to bottom, rgba(10, 6, 17, 0) 46%, #0a0611 92%),
    radial-gradient(60% 60% at 20% 20%, rgba(123, 92, 255, 0.3), transparent 70%),
    radial-gradient(50% 50% at 85% 18%, rgba(255, 61, 129, 0.24), transparent 70%),
    repeating-conic-gradient(from 200deg at 50% -30%,
      rgba(255, 255, 255, 0.022) 0deg 6deg, transparent 6deg 12deg);
  pointer-events: none;
  z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

a { color: inherit; }

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.02em; margin: 0; }

p { line-height: 1.6; }

/* ---------------------------------------------------------------- шапка -- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(10, 6, 17, 0.72);
  border-bottom: 1px solid var(--line);
}

.nav-in {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; }
.logo em { font-style: normal; font-size: 22px; }
.logo span { background: linear-gradient(90deg, var(--gold-soft), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .18s; }
.nav-links a:hover { color: var(--text); }

/* ---------------------------------------------------------------- кнопки -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.btn-gold {
  color: #23180a;
  background: linear-gradient(160deg, var(--gold-soft), var(--gold) 55%, #dfa61f);
  box-shadow: 0 10px 30px rgba(247, 201, 72, 0.28);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(247, 201, 72, 0.36); }

.btn-ghost { color: var(--text); background: var(--card); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }

.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-sm { padding: 10px 16px; font-size: 14px; border-radius: 11px; }

/* ----------------------------------------------------------------- герой -- */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; padding: 72px 0 40px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(247, 201, 72, 0.3);
  background: rgba(247, 201, 72, 0.08);
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 600;
}

.hero h1 { font-size: clamp(38px, 5.6vw, 62px); font-weight: 850; margin: 20px 0 0; }
.hero h1 .accent { background: linear-gradient(100deg, var(--gold-soft), var(--magenta) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--muted); font-size: 19px; margin: 18px 0 30px; max-width: 30em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------- бегущая -- */
.marquee {
  margin: 26px 0 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  --speed: 34s;
}
.marquee-track { display: flex; width: max-content; animation: slide var(--speed) linear infinite; }
.marquee span { padding: 12px 26px; color: var(--muted); font-size: 14px; white-space: nowrap; letter-spacing: .04em; text-transform: uppercase; }
.marquee b { color: var(--gold); }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------------------------------------------------------------- секции -- */
section { padding: 64px 0; }
.section-head { max-width: 46em; margin-bottom: 34px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 17px; margin: 14px 0 0; }
.kicker { color: var(--magenta); font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }

/* ---------------------------------------------------------------- тарифы -- */
/* 132px — чтобы все семь тарифов вставали в один ряд на десктопе: восьмой
   столбец при ширине 1120 уже не помещается, а седьмой не переносится. */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 14px; }

.plan {
  position: relative;
  padding: 22px 18px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.plan:hover { transform: translateY(-4px); border-color: rgba(247, 201, 72, 0.45); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.plan[data-hot] { border-color: rgba(247, 201, 72, 0.5); background: linear-gradient(180deg, rgba(247, 201, 72, 0.12), rgba(255, 255, 255, 0.02)); }
.plan[data-hot]::after {
  content: "выгоднее всего";
  position: absolute;
  top: -10px; left: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: #23180a;
  background: linear-gradient(120deg, var(--gold-soft), var(--gold));
}
.plan-days { display: flex; align-items: baseline; gap: 7px; color: var(--muted); }
.plan-days b { font-size: 34px; font-weight: 850; color: var(--text); letter-spacing: -0.03em; }
.plan-price { margin-top: 10px; font-size: 22px; font-weight: 800; color: var(--gold); }
.plan-price span { font-size: 15px; font-weight: 700; }
.plan-per { color: var(--muted); font-size: 13px; margin-top: 2px; }
.plan-bonus { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--gold-soft); line-height: 1.4; }

.plans-note { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--muted); font-size: 14px; }

/* ----------------------------------------------------------------- шаги -- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 26px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid; place-items: center;
  width: 38px; height: 38px;
  margin-bottom: 16px;
  border-radius: 12px;
  font-weight: 800;
  color: #23180a;
  background: linear-gradient(140deg, var(--gold-soft), var(--gold));
}
.step h3 { font-size: 18px; font-weight: 750; }
.step p { color: var(--muted); font-size: 15px; margin: 9px 0 0; }

/* -------------------------------------------------------------- фичи -- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  padding: 26px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(123, 92, 255, 0.14), transparent 60%),
    var(--card);
}
.feature .ico { font-size: 26px; }
.feature h3 { font-size: 18px; font-weight: 750; margin: 14px 0 8px; }
.feature p { color: var(--muted); font-size: 15px; margin: 0; }

.feature.wide { grid-column: span 2; }

/* -------------------------------------------------------------- монетка -- */
.coin-section {
  border-radius: 28px;
  border: 1px solid rgba(247, 201, 72, 0.22);
  background:
    radial-gradient(90% 120% at 80% 10%, rgba(255, 61, 129, 0.16), transparent 60%),
    radial-gradient(70% 100% at 10% 90%, rgba(123, 92, 255, 0.18), transparent 60%),
    var(--ink-2);
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: center;
}
.coin-section h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; }
.coin-section p { color: var(--muted); font-size: 16.5px; }
.coin-rules { margin: 22px 0 26px; padding: 0; list-style: none; display: grid; gap: 12px; }
.coin-rules li { display: flex; gap: 11px; align-items: flex-start; font-size: 15.5px; }
.coin-rules li b { color: var(--gold-soft); font-weight: 700; }

/* --------------------------------------------------------- сама монета -- */
.coin-stage { display: grid; place-items: center; gap: 22px; }
.coin-stage .game-hint { text-align: center; max-width: 34em; }

.coin-scene {
  width: 220px;
  margin: 0 auto;
  height: 220px;
  display: grid;
  place-items: center;
  perspective: 1100px;
  perspective-origin: 50% 45%;
}

.coin-toss { transform-style: preserve-3d; will-change: transform; }

.coin {
  --r: 100px;
  --thick: 16px;
  position: relative;
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  transform-style: preserve-3d;
  will-change: transform;
}

.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 5px rgba(255, 240, 190, 0.45),
    inset 0 0 0 11px rgba(0, 0, 0, 0.14),
    inset 0 10px 26px rgba(255, 255, 255, 0.3),
    inset 0 -14px 26px rgba(0, 0, 0, 0.28),
    0 12px 30px rgba(0, 0, 0, 0.5);
}

.coin-face .glyph {
  font-size: 92px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.22), 0 -1px 0 rgba(255, 255, 255, 0.5);
}
.coin-face .caption {
  position: absolute;
  bottom: 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .22em;
  opacity: .55;
}

/* насечки по ободу + блик, который «едет» при вращении */
.coin-face::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg,
    rgba(0, 0, 0, 0.11) 0deg 1.6deg, rgba(255, 255, 255, 0.13) 1.6deg 3.2deg);
  mask: radial-gradient(circle, transparent 84%, #000 85%);
  -webkit-mask: radial-gradient(circle, transparent 84%, #000 85%);
}

.face-usd {
  transform: translateZ(calc(var(--thick) / 2));
  color: #12452a;
  background:
    radial-gradient(70% 70% at 32% 26%, #f4fff4, transparent 60%),
    linear-gradient(150deg, #a9d9a2, #4f9c5c 45%, #2f7040 75%, #83c98c);
}
.face-btc {
  transform: rotateX(180deg) translateZ(calc(var(--thick) / 2));
  color: #6b3305;
  background:
    radial-gradient(70% 70% at 32% 26%, #fff6e4, transparent 60%),
    linear-gradient(150deg, #ffd79a, #f0932b 45%, #c96a10 75%, #ffcf87);
}

.coin-edge { position: absolute; inset: 0; transform-style: preserve-3d; }
.coin-edge i {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  background: linear-gradient(90deg, #6b5a2a, #d8b45c 30%, #fff0bb 50%, #d8b45c 70%, #6b5a2a);
}

.coin-shadow {
  width: 130px; height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.62), transparent);
  filter: blur(2px);
  transition: transform .1s linear, opacity .1s linear;
}

.coin-stage { width: 100%; }
.side-pick { display: flex; gap: 10px; width: 100%; max-width: 320px; margin: 0 auto; }
.side-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}
.side-btn:hover { transform: translateY(-2px); }
.side-btn[aria-pressed="true"] { border-color: var(--gold); background: rgba(247, 201, 72, 0.16); box-shadow: 0 0 0 3px rgba(247, 201, 72, 0.12); }
.side-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.sound-toggle {
  position: absolute;
  top: 16px; right: 16px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
}
.sound-toggle:hover { color: var(--text); }

/* Символ биткоина: буква B и две вертикальные штанги поверх неё */
.btc-sign { position: relative; display: inline-block; font-weight: 800; }
.btc-sign::before, .btc-sign::after {
  content: "";
  position: absolute;
  top: 0.02em;
  height: 0.95em;
  width: 0.08em;
  background: currentColor;
  border-radius: 1px;
}
.btc-sign::before { left: 0.22em; }
.btc-sign::after { left: 0.45em; }

/* ------------------------------------------------------------------ FAQ -- */
.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  padding: 4px 20px;
}
.faq summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 700;
  font-size: 16.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: 0 0 18px; font-size: 15.5px; }

/* -------------------------------------------------------------- финалка -- */
.cta-final {
  margin: 20px 0 70px;
  padding: 52px 40px;
  border-radius: 28px;
  text-align: center;
  border: 1px solid rgba(247, 201, 72, 0.24);
  background:
    radial-gradient(80% 140% at 50% 0%, rgba(247, 201, 72, 0.16), transparent 62%),
    var(--ink-2);
}
.cta-final h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 850; }
.cta-final p { color: var(--muted); margin: 14px auto 26px; max-width: 34em; font-size: 17px; }

footer { border-top: 1px solid var(--line); padding: 30px 0 46px; color: var(--muted); font-size: 14px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-in a { color: var(--muted); text-decoration: none; }
.footer-in a:hover { color: var(--text); }

/* ------------------------------------------------------- страница игры -- */
.game-page { min-height: 100vh; display: grid; place-items: center; padding: 30px 20px 60px; }
.game-card {
  position: relative;
  width: min(520px, 100%);
  padding: 38px 32px 32px;
  border-radius: 28px;
  border: 1px solid rgba(247, 201, 72, 0.22);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 61, 129, 0.14), transparent 62%),
    var(--ink-2);
  text-align: center;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}
.game-card h1 { font-size: 28px; font-weight: 850; margin-bottom: 10px; }
.game-card .stake { color: var(--muted); font-size: 16px; margin: 0 0 24px; }
.game-card .coin-scene { margin-top: 58px; }   /* запас, чтобы подброшенная монета не налезала на заголовок */
.game-card .stake b { color: var(--gold-soft); }
.game-actions { display: grid; gap: 12px; margin-top: 26px; }
.game-hint { color: var(--muted); font-size: 13.5px; margin: 16px 0 0; min-height: 1.4em; }

.result { margin-top: 24px; }
.result h2 { font-size: 26px; font-weight: 850; }
.result.win h2 { color: var(--gold); }
.result p { color: var(--muted); margin: 10px 0 0; font-size: 16px; }

#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

.state-msg { color: var(--muted); font-size: 16px; margin: 18px 0 26px; }

/* --------------------------------------------------------------- узкие -- */
@media (max-width: 900px) {
  /* Шапка: логотип и кнопка не должны ломаться на две строки */
  .nav-in { gap: 12px; }
  .logo { font-size: 16px; }
  .logo span, .btn-sm { white-space: nowrap; }
  .btn-sm { padding: 9px 13px; font-size: 13px; }

  .hero { grid-template-columns: 1fr; gap: 34px; padding-top: 46px; }
  .coin-section { grid-template-columns: 1fr; padding: 30px 22px; }
  .steps, .features { grid-template-columns: 1fr; }
  .feature.wide { grid-column: auto; }
  .nav-links { display: none; }
  section { padding: 46px 0; }
}
