:root {
  --night: #15112a;
  --mist: #261f4a;
  --ink: #f4efe6;
  --dusk: #a79fd6;
  --lumen: #ffbf47;
  --ember: #ff8a3d;
  --font-head: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

/* Свет, который следует за курсором */
.spotlight {
  --x: 50%;
  --y: 30%;
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(
    circle 340px at var(--x) var(--y),
    rgba(255, 191, 71, 0.16),
    rgba(21, 17, 42, 0.35) 70%
  );
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--lumen); outline-offset: 3px; }

/* Шапка */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(20px, 5vw, 64px);
}
.logo {
  background: none;
  border: 0;
  color: var(--lumen);
  font: 800 1.4rem var(--font-head);
  cursor: pointer;
  padding: 4px 0;
}
.top nav { display: flex; gap: 24px; }
.top nav a { text-decoration: none; color: var(--dusk); }
.top nav a:hover { color: var(--ink); }

main { padding: 0 clamp(20px, 5vw, 64px); max-width: 1100px; margin: 0 auto; }

/* Главный экран */
.hero { padding: clamp(48px, 12vh, 120px) 0 clamp(56px, 10vh, 96px); }
h1 {
  font: 800 clamp(3.5rem, 15vw, 9rem) / 0.95 var(--font-head);
  letter-spacing: -0.03em;
  color: var(--lumen);
  text-shadow: 0 0 60px rgba(255, 138, 61, 0.45);
}
.tagline {
  max-width: 34ch;
  margin-top: 24px;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--ink);
}
.join { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; align-items: stretch; }

.ip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--mist);
  color: var(--ink);
  border: 2px solid var(--lumen);
  border-radius: 14px;
  padding: 12px 22px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.15s;
}
.ip:hover { background: #342b63; }
.ip:active { transform: scale(0.97); }
.ip-text { font: 800 1.4rem var(--font-head); }
.ip-hint { font-size: 0.8rem; color: var(--dusk); }
.ip.copied .ip-hint { color: var(--lumen); }

.btn {
  display: inline-flex;
  align-items: center;
  background: var(--lumen);
  color: #2a1a00;
  font: 800 1.05rem var(--font-head);
  text-decoration: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 26px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: #ffd070; }
.btn:active { transform: scale(0.97); }

/* О сервере */
h2 { font: 800 clamp(1.8rem, 4vw, 2.6rem) / 1.1 var(--font-head); margin-bottom: 28px; }
.about { padding-bottom: 80px; }
.points { list-style: none; padding: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.points li { border-left: 3px solid var(--ember); padding-left: 18px; }
.points h3 { font: 800 1.2rem var(--font-head); margin-bottom: 6px; }
.points p { color: var(--dusk); max-width: 36ch; }

/* Discord */
.discord {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  background: var(--mist);
  border-radius: 24px;
  padding: clamp(24px, 5vw, 56px);
  margin-bottom: 80px;
}
.discord-text p { color: var(--dusk); max-width: 42ch; margin-bottom: 24px; }
.widget { min-width: 0; max-width: 100%; overflow: hidden; border-radius: 12px; }
.widget iframe { max-width: 100%; display: block; border: 0; }

footer { text-align: center; color: var(--dusk); font-size: 0.85rem; padding: 0 20px 40px; }

/* Мини-игра */
.game {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(10, 8, 24, 0.92);
}
.game[hidden] { display: none; }
.game-box { position: relative; width: min(92vw, 480px); }
.game-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 8px 4px;
  color: var(--dusk);
  font-size: 0.95rem;
}
.game-bar b { color: var(--lumen); }
.game-bar button {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #0d0a1f;
  border: 2px solid var(--mist);
  border-radius: 16px;
  touch-action: none;
  cursor: none;
}
.game-msg {
  position: absolute;
  inset: 44px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
  background: rgba(13, 10, 31, 0.85);
  border-radius: 16px;
}
.game-msg[hidden] { display: none; }
.game-msg h3 { font: 800 2rem var(--font-head); color: var(--lumen); }
.game-msg p { color: var(--dusk); max-width: 30ch; }

@media (max-width: 760px) {
  .discord { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
