:root {
  --bg-deep: #0a0e1a;
  --bg-card: rgba(18, 24, 42, 0.85);
  --bg-card-border: rgba(120, 140, 220, 0.15);
  --text: #e8ecf8;
  --text-muted: #9aa8c8;
  --accent: #c9a227;
  --accent-glow: rgba(201, 162, 39, 0.35);
  --moon: #f4f0e6;
  --moon-shadow: #c8c0b0;
  --purple: #6b5ce7;
  --purple-soft: rgba(107, 92, 231, 0.25);
  --vpn: #38bdf8;
  --vpn-soft: rgba(56, 189, 248, 0.2);
  --vpn-glow: rgba(56, 189, 248, 0.35);
  --online: #4ade80;
  --offline: #f87171;
  --radius: 14px;
  --font: "Nunito", system-ui, sans-serif;
  --font-pixel: "Press Start 2P", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: linear-gradient(to bottom, rgba(10, 14, 26, 0.95), transparent);
  backdrop-filter: blur(8px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
}

.logo-moon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--moon), var(--moon-shadow));
  box-shadow: 0 0 20px var(--accent-glow), inset -4px -4px 8px rgba(0, 0, 0, 0.2);
}

.logo .accent {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.nav a.nav-active {
  color: var(--accent) !important;
}

.nav-vpn {
  color: var(--vpn) !important;
}

.nav-vpn:hover,
.nav-vpn:focus-visible {
  color: #7dd3fc !important;
}

.nav-cta {
  color: var(--accent) !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  padding: 7rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 10%;
  width: 60%;
  height: 50%;
  background: radial-gradient(ellipse, var(--purple-soft), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero-line {
  display: block;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.55em;
  margin-bottom: 0.25rem;
}

.hero-name {
  display: block;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #a8841a);
  color: #1a1408;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 32px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--bg-card-border);
}

.btn-secondary:hover {
  border-color: var(--purple);
  background: var(--purple-soft);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.stat dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.stat dd {
  font-size: 1.15rem;
  font-weight: 700;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.25rem;
  vertical-align: middle;
}

.status-dot.online {
  background: var(--online);
  box-shadow: 0 0 8px var(--online);
}

.status-dot.offline {
  background: var(--offline);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.hero-visual .moon-scene {
  flex-shrink: 0;
}

.floating-blocks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.block {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 4px;
  image-rendering: pixelated;
  animation: bob 4s ease-in-out infinite;
}

.block.b1 {
  top: 15%;
  right: 10%;
  background: linear-gradient(145deg, #5a4a8a, #3d3260);
  box-shadow: 4px 4px 0 #2a2248;
  animation-delay: 0s;
}

.block.b2 {
  bottom: 25%;
  left: 5%;
  width: 40px;
  height: 40px;
  background: linear-gradient(145deg, #4a7c59, #2d5a3d);
  box-shadow: 4px 4px 0 #1e3d2a;
  animation-delay: 1s;
}

.block.b3 {
  top: 45%;
  right: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(145deg, var(--accent), #8a7020);
  box-shadow: 4px 4px 0 #5a4818;
  animation-delay: 2s;
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(107, 92, 231, 0.06), transparent);
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
}

.section-lead {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(201, 162, 39, 0.35);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.features-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.features-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.features-list strong {
  color: var(--accent);
}

.features-list span {
  color: var(--text-muted);
}

.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 560px;
  margin: 0 auto;
}

.steps li {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
}

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  background: var(--purple-soft);
  color: var(--purple);
  border-radius: 10px;
}

.steps h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.steps p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.inline-ip {
  font-family: ui-monospace, monospace;
  color: var(--accent);
  background: rgba(201, 162, 39, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
}

.step-highlight {
  border-color: rgba(88, 101, 242, 0.45) !important;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.12), var(--bg-card)) !important;
}

.step-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.step-link:hover {
  color: var(--text);
}

.rules-list {
  list-style: none;
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

.rules-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.75rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--bg-card-border);
}

.rules-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.rules-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--bg-card-border);
  background: var(--bg-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.link-card:hover {
  transform: translateY(-3px);
}

.link-card.discord {
  border-color: rgba(88, 101, 242, 0.4);
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.15), var(--bg-card));
}

.link-card.telegram {
  border-color: rgba(42, 171, 238, 0.4);
  background: linear-gradient(135deg, rgba(42, 171, 238, 0.12), var(--bg-card));
}

.link-card.vk {
  border-color: rgba(0, 119, 255, 0.35);
  background: linear-gradient(135deg, rgba(0, 119, 255, 0.1), var(--bg-card));
}

.link-card.store {
  border-color: rgba(139, 63, 253, 0.4);
  background: linear-gradient(135deg, rgba(139, 63, 253, 0.12), var(--bg-card));
}

.link-label {
  font-weight: 800;
  font-size: 1.15rem;
}

.link-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.links-edit {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.links-edit code {
  font-size: 0.8rem;
  color: var(--accent);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--bg-card-border);
}

.footer-small {
  font-size: 0.75rem;
  margin-top: 0.35rem;
  opacity: 0.7;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.85rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* StarlitVPN promo (first visit) */
.vpn-promo {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  left: auto;
  z-index: 180;
  width: min(300px, calc(100vw - 2.5rem));
  pointer-events: none;
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
}

.vpn-promo.is-visible {
  pointer-events: auto;
  transform: translateX(0);
  opacity: 1;
}

.vpn-promo.is-hidden {
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
  pointer-events: none;
}

.vpn-promo-panel {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 2rem 0.9rem 0.85rem;
  background: linear-gradient(135deg, rgba(18, 24, 42, 0.97), rgba(30, 58, 90, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 13px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 24px var(--vpn-glow);
  backdrop-filter: blur(12px);
}

.vpn-promo-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.vpn-promo-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.vpn-promo-icon {
  flex-shrink: 0;
  color: var(--vpn);
  line-height: 0;
  margin-top: 0.1rem;
}

.vpn-promo-icon svg {
  width: 32px;
  height: 32px;
}

.vpn-promo-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--vpn);
  margin-bottom: 0.15rem;
}

.vpn-promo-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--text), var(--vpn));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.vpn-promo-text {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.vpn-promo-btn {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  color: #0a1628;
  background: linear-gradient(135deg, var(--vpn), #0ea5e9);
  border-radius: 9px;
  box-shadow: 0 3px 14px var(--vpn-glow);
  transition: transform 0.15s, box-shadow 0.2s;
}

.vpn-promo-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--vpn-glow);
}

/* Mobile */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 6rem;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
    min-height: 220px;
  }

  .hero-moon-scene {
    width: 280px;
    height: 280px;
  }

  .hero-moon-scene .moon-body {
    width: 180px;
    height: 180px;
  }

  .features-list li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(280px, 85vw);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    background: rgba(10, 14, 26, 0.98);
    border-left: 1px solid var(--bg-card-border);
    transform: translateX(100%);
    transition: transform 0.3s;
  }

  .nav.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: flex;
    z-index: 101;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .vpn-promo {
    right: 0.75rem;
    bottom: 0.75rem;
    width: min(280px, calc(100vw - 1.5rem));
  }
}
