:root {
  --bg: #0b0a24;
  --bg-2: #141238;
  --panel: rgba(30, 26, 82, 0.72);
  --line: rgba(140, 120, 255, 0.35);
  --text: #f4f2ff;
  --muted: #b9b4e6;
  --violet: #7b4dff;
  --pink: #ff3fa4;
  --yellow: #ffd43b;
  --sky: #34c6ff;
  --radius: 22px;
  --glow: 0 0 0 1px var(--line), 0 0 28px rgba(123, 77, 255, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 600 17px/1.5 "Nunito", system-ui, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Starry backdrop */
.sky {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(123, 77, 255, 0.35), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(255, 63, 164, 0.16), transparent 60%),
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 8%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 64% 22%, #ffe9a8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 86% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 22% 64%, #cfc6ff 50%, transparent 51%),
    radial-gradient(2px 2px at 92% 58%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 88%, #fff 50%, transparent 51%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

/* Header */
.top {
  max-width: 1440px; margin: 0 auto; padding: 14px 40px 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
}
.top__logo img { width: 200px; height: auto; filter: drop-shadow(0 6px 18px rgba(123, 77, 255, 0.5)); }
.top__nav {
  justify-self: center; display: flex; gap: 4px; padding: 5px;
  border-radius: 999px; background: var(--panel); box-shadow: var(--glow);
}
.top__nav a {
  padding: 9px 24px; border-radius: 999px; text-decoration: none; font-weight: 800;
  transition: background .2s;
}
.top__nav a:hover { background: rgba(123, 77, 255, 0.3); }
.top__nav a.is-active { background: linear-gradient(180deg, #8c62ff, #5b2fe0); }
.top__tag {
  font-weight: 900; font-size: 22px; color: var(--sky); transform: rotate(-8deg);
  text-shadow: 0 0 14px rgba(52, 198, 255, 0.6);
}
.top__tag span { color: var(--pink); }

/* Hero */
.hero {
  max-width: 1440px; margin: 0 auto; padding: 28px 40px 16px;
  display: grid; grid-template-columns: minmax(300px, 0.75fr) 1.6fr; gap: 36px; align-items: center;
}
.hero h1 { margin: 0 0 14px; font-size: clamp(32px, 3.4vw, 52px); line-height: 1.08; font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--yellow); text-shadow: 0 0 22px rgba(255, 212, 59, 0.45); }
.hero p { margin: 0 0 20px; color: var(--muted); font-size: 19px; }
.hero__perks, .about__perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.hero__perks li { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* Carousel */
.carousel {
  position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 2.25 / 1;
  box-shadow: 0 0 0 2px rgba(140, 120, 255, 0.55), 0 0 60px rgba(123, 77, 255, 0.45);
  background: #1b1650;
}
.carousel__track { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide__img { position: absolute; inset: 0; overflow: hidden; }
.slide__img img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.slide__img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 48%, rgba(11, 10, 36, 0.62) 64%, rgba(11, 10, 36, 0.78) 100%);
}
.slide__body {
  position: absolute; top: 0; right: 0; bottom: 0; width: 40%;
  padding: 30px 76px 46px 8px; display: flex; flex-direction: column; justify-content: center; gap: 12px;
}
.slide__title { margin: 0; font-size: clamp(26px, 2.8vw, 44px); line-height: 1.05; font-weight: 900; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }
.slide__desc { margin: 0; color: #ece8ff; font-size: 17px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.btn-play {
  align-self: flex-start; margin-top: 6px; display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 34px; border-radius: 999px; border: 0; cursor: pointer;
  background: linear-gradient(180deg, #ff5cb6, #e01784); color: #fff; text-decoration: none;
  font: 900 22px/1 "Nunito", sans-serif; box-shadow: 0 6px 0 #a10c5d, 0 0 24px rgba(255, 63, 164, 0.6);
  transition: transform .15s;
}
.btn-play:hover { transform: translateY(-2px); }
.btn-play.is-soon { background: rgba(255, 255, 255, 0.16); box-shadow: none; cursor: default; font-size: 18px; }
.carousel__arrow {
  position: absolute; top: 50%; translate: 0 -50%; width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6); background: rgba(11, 10, 36, 0.6); color: #fff;
  cursor: pointer; display: grid; place-items: center; padding: 0;
}
.carousel__arrow svg { width: 22px; height: 22px; }
.carousel__arrow--prev { left: 14px; }
.carousel__arrow--next { right: 14px; }
.carousel__dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.carousel__dots button {
  width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.4); transition: width .25s, background .25s;
}
.carousel__dots button[aria-selected="true"] { width: 26px; border-radius: 6px; background: var(--pink); }

/* Games grid */
.games, .about { max-width: 1440px; margin: 0 auto; padding: 30px 40px; }
h2 { margin: 0 0 20px; font-size: 32px; font-weight: 900; display: flex; align-items: center; gap: 12px; }
.h-ico { font-size: 30px; }
.games__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card {
  border-radius: var(--radius); background: var(--panel); box-shadow: var(--glow);
  padding: 12px; display: grid; grid-template-columns: 112px 1fr; grid-template-rows: auto 1fr auto;
  column-gap: 14px; row-gap: 6px; align-items: start;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(255, 63, 164, 0.6), 0 0 34px rgba(255, 63, 164, 0.35); }
.card__icon { grid-row: 1 / -1; border-radius: 16px; aspect-ratio: 1; object-fit: cover; width: 100%; height: auto; }
.card__title { margin: 0; font-size: 18px; font-weight: 900; line-height: 1.2; }
.card__desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; }
.stores { display: flex; flex-wrap: wrap; gap: 6px; }
.store {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 10px;
  font-size: 13px; font-weight: 800; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07); transition: background .2s;
}
.store:hover { background: rgba(255, 255, 255, 0.18); }
.store i { width: 16px; height: 16px; border-radius: 4px; display: inline-grid; place-items: center; font: 900 10px/1 sans-serif; color: #111; font-style: normal; }
.store--yandex i { background: var(--yellow); }
.store--rustore i { background: #0077ff; color: #fff; }
.store--vk i { background: #2787f5; color: #fff; }
.store--site { background: linear-gradient(180deg, #ff5cb6, #e01784); border-color: transparent; }
.store--site:hover { background: linear-gradient(180deg, #ff74c1, #f0288f); }
.store--site i { background: #fff; color: #e01784; font-size: 8px; }
.soon { font-size: 13px; color: var(--muted); padding: 6px 0; }

/* About */
.about { display: grid; grid-template-columns: 1fr; }
.about__pic, .about__text { background: var(--panel); box-shadow: var(--glow); }
.about__pic { border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 3 / 1; }
.about__pic img { width: 100%; height: 100%; object-fit: cover; }
.about__text {
  border-radius: 0 0 var(--radius) var(--radius); padding: 28px 36px;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 6px 40px; align-items: center;
}
.about__text h2 { grid-column: 1 / -1; margin-bottom: 4px; }
.about__text .about__perks { flex-direction: column; }
.about__text p { margin: 0 0 22px; color: #e3dfff; }
.about__perks li { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.about__perks .ico { font-size: 28px; }

/* Footer */
.foot {
  max-width: 1440px; margin: 0 auto; padding: 22px 40px 36px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.foot__logo { width: 120px; height: auto; }
.foot__copy { margin: 0; color: var(--muted); font-size: 14px; }
.foot__links { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.foot__mail { text-decoration: none; font-weight: 800; }
.foot__mail:hover { color: var(--pink); }
.foot__social {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: #2aa3e0; color: #fff; text-decoration: none; font-weight: 800;
  box-shadow: 0 0 18px rgba(42, 163, 224, 0.45); transition: transform .15s;
}
.foot__social:hover { transform: translateY(-2px); }
.foot__social svg { width: 18px; height: 18px; }
.foot__docs { flex-basis: 100%; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.foot__doc { color: var(--muted); text-decoration: none; font-weight: 700; }
.foot__doc:hover { color: var(--pink); }

/* Legal pages (terms.html, privacy.html) */
.top--doc { grid-template-columns: auto; }
.doc {
  max-width: 860px; margin: 18px auto 0; padding: 30px 40px; border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--glow); font-weight: 600; line-height: 1.6;
}
.doc h1 { margin: 0 0 6px; font-size: 32px; font-weight: 900; line-height: 1.2; }
.doc__sub { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.doc h2 { margin: 26px 0 8px; font-size: 21px; font-weight: 800; color: var(--yellow); }
.doc p, .doc li { color: var(--text); }
.doc p { margin: 0 0 10px; }
.doc ul { margin: 0 0 10px; padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--sky); }
.doc__req { margin-top: 22px !important; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted) !important; font-size: 15px; }

/* Tablet */
@media (max-width: 1000px) {
  .top { grid-template-columns: auto 1fr; padding: 12px 20px 0; }
  .top__tag { display: none; }
  .top__nav { justify-self: end; }
  .hero { grid-template-columns: 1fr; padding: 20px 20px 8px; gap: 22px; }
  .games, .about { padding: 24px 20px; }
  .about__text { grid-template-columns: 1fr; }
  .about__text .about__perks { flex-direction: row; }
  .foot { padding: 20px 20px 32px; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { grid-template-columns: 1fr; justify-items: center; gap: 10px; padding: 10px 16px 0; }
  .top__logo img { width: 160px; }
  .top__nav { justify-self: center; }
  .top__nav a { padding: 8px 14px; font-size: 15px; }
  .hero { padding: 14px 16px 4px; text-align: center; }
  .hero__perks { justify-content: center; }
  .carousel { aspect-ratio: auto; height: 500px; }
  .slide { display: grid; grid-template-rows: 220px 1fr; }
  .slide__img { position: relative; }
  .slide__img img { object-position: 22% center; }
  .slide__img::after { background: linear-gradient(180deg, transparent 65%, var(--slide-c, #4a2bc4) 100%); }
  .slide__body {
    position: static; width: auto; padding: 14px 20px 46px; gap: 8px; text-align: center; align-items: center;
    background: linear-gradient(180deg, var(--slide-c, #4a2bc4), #1d1660);
  }
  .about__pic { aspect-ratio: auto; height: 200px; }
  .btn-play { align-self: center; }
  .carousel__arrow { top: 110px; width: 38px; height: 38px; }
  .games, .about { padding: 20px 16px; }
  .games__grid { grid-template-columns: 1fr; gap: 12px; }
  .card { grid-template-columns: 92px 1fr; }
  .about__text { padding: 22px 20px; }
  .foot { justify-content: center; text-align: center; padding: 18px 16px 28px; }
  .foot__links { margin: 0; flex-wrap: wrap; justify-content: center; }
  .foot__docs { justify-content: center; }
  .doc { margin: 12px 16px 0; padding: 22px 18px; }
  .doc h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .card, .btn-play { transition: none; }
}
