:root {
  --bg: #120c22;
  --text: #f1eefb;
  --muted: #a39cbf;
  --accent: #4b2fb0;
  --accent-hover: #5a3cc8;
  --accent-light: #9a86ff;
  --card: #1a1230;
  --border: #2c2148;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Фон: звёзды и плавающие пятна света ---------- */
#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* ---------- Шапка ---------- */
.nav,
.hero,
footer {
  position: relative;
  z-index: 1;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(16px, 5vw, 56px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
}
.logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
}
.pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Главный экран ---------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px 40px;
}

.emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin: 10px 0 26px;
}
.logo.big {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  font-size: 54px;
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob {
  50% {
    transform: translateY(-10px) rotate(-3deg);
  }
}
h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.gradient {
  color: var(--accent-light);
}

.sub {
  max-width: 560px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(15px, 2.2vw, 18px);
  line-height: 1.6;
}

/* ---------- Кнопка скачивания ---------- */
.cta {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.download {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 34px;
  border-radius: 16px;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
  background: var(--accent);
  transition: transform 0.25s var(--ease), background 0.25s;
  animation: pulse 2.8s ease-in-out infinite;
}
.download:hover {
  transform: translateY(-3px) scale(1.03);
  background: var(--accent-hover);
}
.download:active {
  transform: translateY(0) scale(0.98);
}
.download svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.download:hover svg {
  animation: drop 0.8s var(--ease) infinite;
}
@keyframes drop {
  50% {
    transform: translateY(3px);
  }
}
/* Кнопка «дышит»: сплошное кольцо расходится от неё и тает. */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(75, 47, 176, 0.7);
  }
  70%,
  100% {
    box-shadow: 0 0 0 16px rgba(75, 47, 176, 0);
  }
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* На телефоне в шапке только Discord — версия игры не помещается. */
@media (max-width: 480px) {
  .nav-right .pill:not(.discord-pill) {
    display: none;
  }
}
.discord-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.discord-pill:hover {
  border-color: #5865f2;
  background: #5865f2;
}
.discord-pill svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.discord {
  padding: 10px 22px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.discord:hover {
  transform: translateY(-2px);
  border-color: #5865f2;
  background: #5865f2;
}
.meta {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Карточки функций ---------- */
.features {
  list-style: none;
  padding: 0;
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  width: min(960px, 100%);
}
.features li {
  text-align: left;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.features li:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.features b {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}
.features span {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

footer {
  padding: 22px 16px 28px;
  text-align: center;
  color: #6b6b80;
  font-size: 12.5px;
}

/* ---------- Появление при загрузке ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.8s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}
.emblem.reveal {
  animation-name: reveal-pop;
}
@keyframes reveal-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
