/* ════════════════════════════════════════════
   ScriptHub.gg — стили
   Палитра: тёмный фон + неон (emerald/cyan) + Discord blurple
   ════════════════════════════════════════════ */

:root {
  --bg: #06080f;
  --bg-alt: #0a0e1a;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.05);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #475569;
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.1);
  --accent-border: rgba(52, 211, 153, 0.3);
  --cyan: #67e8f9;
  --blurple: #5865f2;
  --blurple-dark: #4752c4;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(52, 211, 153, 0.3); }

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 768px; }

.accent { color: var(--accent); }

.gradient-text {
  background: linear-gradient(90deg, #6ee7b7, #67e8f9, #6ee7b7);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 4s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

/* ── Кнопки ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn--sm { padding: 8px 16px; font-size: 14px; }
.btn--lg { padding: 14px 26px; font-size: 16px; }
.btn--xl { padding: 18px 34px; font-size: 18px; }

.btn--discord {
  background: var(--blurple);
  color: #fff;
  box-shadow: 0 0 30px rgba(88, 101, 242, 0.45);
}
.btn--discord:hover {
  background: var(--blurple-dark);
  box-shadow: 0 0 45px rgba(88, 101, 242, 0.65);
  transform: translateY(-2px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn--ghost:hover {
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.1);
}

.btn__arrow { transition: transform 0.25s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

.icon-discord { width: 20px; height: 20px; flex-shrink: 0; }
.btn--sm .icon-discord { width: 16px; height: 16px; }

.link-accent {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
  flex-shrink: 0;
}
.link-accent:hover { color: #6ee7b7; }

/* ── Навигация ─────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 8, 15, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav__logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #34d399, #06b6d4);
  color: var(--bg);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.4);
}
.nav__logo-icon--sm { width: 28px; height: 28px; font-size: 11px; }
.nav__logo-text {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__links a:not(.btn) {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav__links a:not(.btn):hover { color: #fff; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__burger span {
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ──────────────────────────────── */
.hero { position: relative; overflow: hidden; }

.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%);
}
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}
.hero__glow--green {
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: rgba(16, 185, 129, 0.15);
}
.hero__glow--blue {
  top: 160px;
  right: -100px;
  width: 400px;
  height: 300px;
  background: rgba(88, 101, 242, 0.15);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 96px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: #6ee7b7;
  font-size: 12px;
  font-weight: 600;
}
.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
}

.hero__title {
  margin-top: 24px;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
}
.hero__sub {
  margin-top: 22px;
  max-width: 520px;
  font-size: 18px;
  color: var(--text-muted);
}
.hero__cta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero__trust {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.hero__trust span::first-letter { color: var(--accent); }

/* ── Окно с кодом ──────────────────────── */
.code-window {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 80px rgba(52, 211, 153, 0.08);
  overflow: hidden;
}
.code-window__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.03);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--red { background: rgba(239, 68, 68, 0.8); }
.dot--yellow { background: rgba(234, 179, 8, 0.8); }
.dot--green { background: rgba(16, 185, 129, 0.8); }
.code-window__file {
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}
.code-window__body {
  padding: 20px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  min-height: 230px;
  white-space: pre;
}
.code-window__body .k { color: #c084fc; }
.code-window__body .v { color: #7dd3fc; }
.code-window__body .b { color: #34d399; }
.code-window__body .f { color: #fde047; }
.code-window__body .s { color: #fdba74; }
.code-window__body .c { color: #475569; }
.code-window__body .p { color: #94a3b8; }
.cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.code-window__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
  background: rgba(52, 211, 153, 0.05);
}
.status-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #6ee7b7;
}
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 1.6s ease infinite;
}
.code-window__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-dim);
}

/* ── Игры ──────────────────────────────── */
.games {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.02);
  padding: 36px 0;
}
.games__label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.games__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.chip {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
  cursor: default;
}
.chip:hover {
  border-color: var(--accent-border);
  color: #fff;
  transform: translateY(-2px);
}
.chip--accent {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: #6ee7b7;
  font-weight: 600;
}

/* ── Секции ────────────────────────────── */
.section { padding: 88px 0; }
.section--alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.section__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 44px;
}
.section__title--center { text-align: center; }
.section__sub {
  margin-top: 10px;
  color: var(--text-muted);
  max-width: 540px;
}
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.section__head .section__title { margin-bottom: 0; }

/* ── Карточки фич ──────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 26px;
  transition: all 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  background: var(--surface-hover);
}
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 22px;
  margin-bottom: 16px;
}
.card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.card p { font-size: 14px; color: var(--text-muted); }

/* ── Карточки скриптов ─────────────────── */
.script-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  overflow: hidden;
  transition: all 0.3s ease;
}
.script-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
}
.script-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.script-card__game {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.script-card__head h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}
.script-card__emoji { font-size: 20px; opacity: 0.6; }
.script-card__code {
  flex: 1;
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
  overflow-x: auto;
}
.script-card__footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
}
.tag {
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.copy-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.2s;
}
.copy-btn:hover { color: #6ee7b7; background: var(--accent-soft); }

/* ── Шаги ──────────────────────────────── */
.cards-grid--steps { grid-template-columns: repeat(3, 1fr); }
.step {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 30px;
}
.step__num {
  position: absolute;
  top: 14px;
  right: 20px;
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.05);
}
.step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(88, 101, 242, 0.15);
  font-size: 20px;
  margin-bottom: 16px;
}
.step h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.step p { font-size: 14px; color: var(--text-muted); }

/* ── FAQ ───────────────────────────────── */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq__item:hover { border-color: var(--accent-border); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  background: none;
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.faq__chevron {
  color: var(--accent);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq__item.open .faq__chevron { transform: rotate(180deg); }
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq__a p {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Финальный CTA ─────────────────────── */
.final-cta {
  position: relative;
  padding: 110px 0;
  overflow: hidden;
  text-align: center;
}
.final-cta__glow {
  position: absolute;
  bottom: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  border-radius: 50%;
  background: rgba(88, 101, 242, 0.2);
  filter: blur(120px);
  pointer-events: none;
}
.final-cta__inner { position: relative; }
.final-cta h2 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}
.final-cta p {
  margin: 22px auto 0;
  max-width: 520px;
  font-size: 18px;
  color: var(--text-muted);
}
.final-cta .btn { margin-top: 34px; }

/* ── Footer ────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer__disclaimer {
  max-width: 560px;
  font-size: 12px;
  color: var(--text-dim);
}
.footer__copy { font-size: 12px; color: #334155; }

/* ── Toast ─────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #0f172a;
  border: 1px solid var(--accent-border);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: all 0.35s ease;
  z-index: 200;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── Scroll reveal ─────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal--delay { transition-delay: 0.15s; }
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Адаптив ───────────────────────────── */
@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    padding-top: 56px;
    padding-bottom: 64px;
  }
  .cards-grid,
  .cards-grid--steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .nav__links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(6, 8, 15, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a:not(.btn) {
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--border-soft);
  }
  .nav__links .btn { margin-top: 16px; justify-content: center; }
  .nav__burger { display: flex; }

  .cards-grid,
  .cards-grid--steps { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
  .section { padding: 64px 0; }
}
