@font-face {
  font-family: 'Rubik';
  src: url('fonts/Rubik.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --bg: #12122a;
  --bg-alt: #17173a;
  --card: #1e1e46;
  --line: #2c2c5e;
  --text: #f2f1fa;
  --muted: #a9a8c9;
  --coral: #ff6b4a;
  --coral-dark: #e8553a;
  --purple: #9146ff;
  --purple-dark: #772ce8;
  --teal: #3ad6c4;
  --gold: #f5c45e;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    400 17px/1.6 'Rubik',
    'Segoe UI',
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
code {
  font:
    500 0.9em ui-monospace,
    Consolas,
    monospace;
  background: #2a2a5a;
  padding: 1px 6px;
  border-radius: 6px;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--coral);
  transition:
    background 0.15s,
    transform 0.15s;
}
.btn:hover {
  background: var(--coral-dark);
  transform: translateY(-1px);
}
.btn-twitch {
  background: var(--purple);
}
.btn-twitch:hover {
  background: var(--purple-dark);
}
.btn-ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn-ghost:hover {
  background: var(--card);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 15px;
  border-radius: 10px;
}
:where(a, summary):focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Шапка */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 18, 42, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
}
.top-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.top-nav a:hover {
  color: var(--text);
}

/* Первый экран */
.hero {
  padding: 80px 0 64px;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(145, 70, 255, 0.22), transparent 60%),
    radial-gradient(700px 400px at 10% 90%, rgba(255, 107, 74, 0.14), transparent 60%);
}
.hero-in {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  color: var(--coral);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
h1 {
  font-size: clamp(38px, 5.2vw, 60px);
  font-weight: 800;
}
h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--coral), #ff9b6a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  color: var(--muted);
  font-size: 19px;
  margin-top: 20px;
  max-width: 34em;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.cta-center {
  justify-content: center;
  margin-top: 48px;
}
.note {
  color: var(--muted);
  font-size: 14px;
  margin-top: 16px;
}

/* Макет кадра стрима */
.stage {
  position: relative;
}
.stage-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  background: #0c0c1e;
}
.stage-game {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 70%, rgba(58, 214, 196, 0.35), transparent 35%),
    radial-gradient(circle at 75% 30%, rgba(145, 70, 255, 0.45), transparent 40%),
    radial-gradient(circle at 60% 85%, rgba(255, 107, 74, 0.3), transparent 30%),
    linear-gradient(160deg, #1d2450, #0f1530);
}
.stage-game::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.stage-cam {
  position: absolute;
  right: 3%;
  bottom: 5%;
  width: 24%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: linear-gradient(180deg, #2b2b55, #1a1a3c);
  border: 2px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}
.stage-cam span {
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: 60%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #3a3a70;
  box-shadow: 0 -38px 0 -14px #4a4a85;
}
.stage-live {
  position: absolute;
  left: 3%;
  top: 5%;
  background: #eb0400;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.06em;
}

.alert {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: pop 4s ease-in-out infinite;
}
.alert-gif {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 6px 18px rgba(255, 107, 74, 0.6));
  animation: wobble 1s ease-in-out infinite;
}
.alert-card {
  background: rgba(18, 18, 42, 0.92);
  border: 1.5px solid var(--coral);
  border-radius: 14px;
  padding: 12px 22px;
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 107, 74, 0.35);
}
.alert-who {
  font-weight: 800;
  font-size: 20px;
  color: var(--coral);
}
.alert-what {
  font-size: 14px;
  color: var(--text);
}
.wave {
  display: flex;
  gap: 3px;
  justify-content: center;
  height: 18px;
  align-items: center;
  margin-top: 6px;
}
.wave i {
  width: 4px;
  border-radius: 2px;
  background: var(--coral);
  animation: bar 0.9s ease-in-out infinite;
}
.wave i:nth-child(odd) {
  animation-delay: -0.3s;
}
.wave i:nth-child(3n) {
  animation-delay: -0.6s;
}
.wave i:nth-child(4n) {
  animation-delay: -0.15s;
}

.chat {
  position: absolute;
  left: -28px;
  bottom: -32px;
  width: 260px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.chat-line + .chat-line {
  margin-top: 6px;
}
.chat-redeem {
  background: rgba(145, 70, 255, 0.2);
  border-radius: 6px;
  padding: 4px 6px;
}

@keyframes pop {
  0%,
  8% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.9);
  }
  16%,
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  92%,
  100% {
    opacity: 0;
    transform: translate(-50%, -55%) scale(0.96);
  }
}
@keyframes wobble {
  0%,
  100% {
    transform: rotate(-8deg);
  }
  50% {
    transform: rotate(8deg) scale(1.08);
  }
}
@keyframes bar {
  0%,
  100% {
    height: 4px;
  }
  50% {
    height: 18px;
  }
}

/* Три факта */
.facts {
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}
.facts-in {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-block: 28px;
}
.fact b {
  display: block;
  font-size: 18px;
}
.fact span {
  color: var(--muted);
  font-size: 15px;
}

/* Секции */
.section {
  padding: 96px 0;
}
.section-alt {
  background: var(--bg-alt);
}
h2 {
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 800;
  text-align: center;
}
.section-lead {
  color: var(--muted);
  text-align: center;
  max-width: 40em;
  margin: 16px auto 0;
  font-size: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.feature:hover {
  border-color: #45458a;
  transform: translateY(-2px);
}
.feature h3 {
  font-size: 19px;
  margin: 16px 0 8px;
}
.feature p {
  color: var(--muted);
  font-size: 15px;
}
.ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}
.ic svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic-coral {
  background: rgba(255, 107, 74, 0.15);
  color: var(--coral);
}
.ic-purple {
  background: rgba(145, 70, 255, 0.18);
  color: #b98bff;
}
.ic-teal {
  background: rgba(58, 214, 196, 0.14);
  color: var(--teal);
}
.ic-gold {
  background: rgba(245, 196, 94, 0.15);
  color: var(--gold);
}

/* Интерактив */
.shows {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.show {
  margin: 0;
}
.show figcaption {
  color: var(--muted);
  font-size: 15px;
  margin-top: 16px;
}
.show figcaption b {
  display: block;
  color: var(--text);
  font-size: 19px;
  margin-bottom: 4px;
}
.show-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px;
}
.show-gold {
  background:
    radial-gradient(circle at 50% 25%, rgba(245, 196, 94, 0.25), transparent 55%),
    linear-gradient(170deg, #2a1e4a, #120e26);
}
.show-cosmos {
  background:
    radial-gradient(circle at 50% 28%, rgba(80, 160, 255, 0.3), transparent 50%),
    linear-gradient(170deg, #0f2348, #08101f);
}
.show-mystic {
  background:
    radial-gradient(circle at 50% 28%, rgba(185, 120, 255, 0.35), transparent 50%),
    linear-gradient(170deg, #2a1650, #120a24);
}

.dice {
  width: 60px;
  height: 60px;
  margin: 10px 0 auto;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff8e6, #f0d48f);
  box-shadow: 0 0 30px rgba(245, 196, 94, 0.6);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  place-items: center;
  transform: rotate(-12deg);
  animation: roll 3s ease-in-out infinite;
}
.dice span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a2a0a;
}
@keyframes roll {
  0%,
  70%,
  100% {
    transform: rotate(-12deg);
  }
  80% {
    transform: rotate(200deg) scale(0.9);
  }
  90% {
    transform: rotate(348deg);
  }
}

.crown {
  font-size: 52px;
  line-height: 1;
  margin: 10px 0 auto;
  filter: drop-shadow(0 0 22px rgba(110, 180, 255, 0.8));
}

.ball {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: auto;
  margin-top: 10px;
}
.ball {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: auto;
  margin-top: 10px;
}
.orb {
  background: radial-gradient(circle at 35% 30%, #fff, #8cc8ff 35%, #2a6bd8 75%);
  box-shadow: 0 0 40px rgba(110, 180, 255, 0.8);
}
.ball {
  background: radial-gradient(circle at 35% 30%, #f3e6ff, #b57bff 35%, #5b1fb8 80%);
  box-shadow: 0 0 40px rgba(180, 120, 255, 0.8);
  animation: glow 2.4s ease-in-out infinite;
}
@keyframes glow {
  50% {
    box-shadow: 0 0 60px rgba(180, 120, 255, 1);
    transform: scale(1.05);
  }
}

.ocard {
  width: 100%;
  text-align: center;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(12, 10, 30, 0.82);
}
.ocard small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}
.ocard b {
  display: block;
  font-size: 17px;
  font-weight: 800;
}
.ocard p {
  font-size: 12px;
  line-height: 1.4;
  margin-top: 2px;
}
.ocard-gold {
  border: 1px solid rgba(245, 196, 94, 0.7);
}
.ocard-gold small,
.ocard-gold b {
  color: var(--gold);
}
.ocard-blue {
  border: 1px solid rgba(110, 180, 255, 0.7);
}
.ocard-blue small,
.ocard-blue b {
  color: #7cc4ff;
}
.ocard-violet {
  border: 1px solid rgba(185, 120, 255, 0.7);
}
.ocard-violet small,
.ocard-violet b {
  color: #c9a0ff;
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 32px;
  max-width: 820px;
}
.ticks li {
  position: relative;
  padding-left: 30px;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(58, 214, 196, 0.18)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233ad6c4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* Шаги */
.steps {
  list-style: none;
  padding: 0;
  margin: 56px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: s;
}
.steps li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}
.steps h3 {
  font-size: 20px;
  margin: 18px 0 8px;
}
.steps p {
  color: var(--muted);
  font-size: 15px;
}

/* FAQ */
.faq {
  max-width: 780px;
}
.faq h2 {
  margin-bottom: 40px;
}
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 22px;
}
.faq details + details {
  margin-top: 12px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 18px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  color: var(--coral);
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  color: var(--muted);
  padding-bottom: 18px;
}

/* Подвал */
.foot {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--muted);
  font-size: 14px;
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
}
.foot .brand {
  font-size: 16px;
  color: var(--text);
}
.foot p:last-child {
  margin-left: auto;
}

/* Адаптив */
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .shows {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }
}
@media (max-width: 860px) {
  .top-nav {
    display: none;
  }
  .top-in {
    justify-content: space-between;
  }
  .hero {
    padding-top: 48px;
  }
  .hero-in {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .chat {
    left: 8px;
    bottom: -40px;
    width: 220px;
  }
  .facts-in,
  .steps {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 72px 0;
  }
  .ticks {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .lead {
    font-size: 17px;
  }
  .chat {
    display: none;
  }
  .alert-gif {
    font-size: 40px;
  }
  .alert-who {
    font-size: 16px;
  }
  .alert-card {
    padding: 8px 14px;
  }
  .foot p:last-child {
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .alert {
    opacity: 1;
  }
}

/* Уже вошёл в приложение (signed-in.js): прячем то, что нужно только новичку */
.signed-in .only-guest {
  display: none;
}
