:root {
  --bg: #0d0b14;
  --card: #16121f;
  --text: #e8e4f0;
  --muted: #9b93ad;
  --accent: #8b5cf6;
  --accent2: #6366f1;
  --border: #2a2438;
}

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

body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 900px; margin: 0 auto; padding: 24px 20px 64px; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav a { color: var(--muted); font-size: 0.95rem; }
nav a:hover { color: var(--text); }

.hero {
  text-align: center;
  padding: 48px 0;
}

.hero h1 { font-size: 2.2rem; margin-bottom: 12px; }
.hero p { color: var(--muted); max-width: 560px; margin: 0 auto 28px; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff !important;
  font-weight: 600;
  text-decoration: none !important;
}

.btn:hover { opacity: 0.92; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 { font-size: 1.15rem; margin-bottom: 12px; }
.card ul { margin-left: 20px; color: var(--muted); }
.card li { margin-bottom: 6px; }

.legal h1 { font-size: 1.75rem; margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
.legal h2 { font-size: 1.15rem; margin: 24px 0 10px; }
.legal p, .legal li { color: var(--muted); margin-bottom: 10px; }
.legal ul { margin-left: 20px; }

footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* =========================================================
   Live sections: news / updates / servers, stat chips, fx
   ========================================================= */

:root {
  --code-font: "JetBrains Mono", "Consolas", monospace;
  --ease: cubic-bezier(.22,1,.36,1);
  --glow: 0 0 24px rgba(139, 92, 246, .3);
}

body { position: relative; overflow-x: hidden; }

.bg-fx {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(139,92,246,.22), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(99,102,241,.18), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(236,72,153,.14), transparent 45%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 100% 42px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 42px 100%;
  animation: fxDrift 24s ease-in-out infinite alternate;
}
@keyframes fxDrift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-2%,2%,0) scale(1.05); }
}

header { position: sticky; top: 0; z-index: 50; background: rgba(13,11,20,0); backdrop-filter: blur(0px);
  transition: background .3s var(--ease), backdrop-filter .3s var(--ease), border-color .3s ease; }
header.scrolled { background: rgba(13,11,20,.75); backdrop-filter: blur(14px); border-color: var(--border); }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
  background: var(--card); border: 1px solid var(--border);
  font-size: .8rem; color: var(--muted); font-family: var(--code-font);
}
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981;
  box-shadow: 0 0 8px #10b981; animation: pulseDot 2s infinite; }
@keyframes pulseDot { 0%,100%{opacity:1;} 50%{opacity:.4;} }

.btn-lg { padding: 14px 32px; font-size: 1.02rem; position: relative; overflow: hidden;
  box-shadow: 0 6px 26px rgba(139,92,246,.32); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.btn-lg:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(139,92,246,.45); }
.btn-lg small { display: block; font-weight: 400; opacity: .75; font-size: .72rem; margin-top: 2px; }

.stat-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.stat-chip { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 16px; font-size: .85rem; color: var(--muted); }
.stat-dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px #10b981; }
.stat-dot.offline { background: #6b6b7b; box-shadow: none; }
.stat-num { font-family: var(--code-font); font-weight: 600; color: var(--text); font-size: 1rem; }

.feature-grid { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 10px 20px; }
.feature-grid li { display: flex; align-items: center; gap: 10px; margin: 0; }
.f-ico { font-size: 1.1rem; }

.section-block { margin: 44px 0; opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.section-block.revealed, .card.revealed { opacity: 1; transform: translateY(0); }
.card { transition: opacity .5s var(--ease), transform .5s var(--ease); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.section-head h2 { font-size: 1.3rem; }
.section-hint { color: var(--muted); font-size: .82rem; }

/* ---------- Skeletons ---------- */
.skeleton-block { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.skeleton-block::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.card-skel { min-height: 120px; }
.skeleton-line { height: 14px; border-radius: 6px; background: rgba(255,255,255,.06); margin: 14px 20px; }
.skeleton-line.w60 { width: 60%; } .skeleton-line.w40 { width: 40%; } .skeleton-line.w80 { width: 80%; }

.empty-state { color: var(--muted); font-size: .9rem; padding: 20px; text-align: center;
  background: var(--card); border: 1px dashed var(--border); border-radius: 14px; grid-column: 1 / -1; }

/* ---------- Updates ---------- */
.update-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; }
.update-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.update-version { display: flex; align-items: center; gap: 10px; }
.v-num { font-family: var(--code-font); font-size: 1.3rem; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.badge { font-size: .72rem; padding: 3px 10px; border-radius: 999px; background: rgba(16,185,129,.15); color: #10b981; border: 1px solid rgba(16,185,129,.3); }
.badge-red { background: rgba(239,68,68,.15); color: #ef4444; border-color: rgba(239,68,68,.3); }
.update-date { color: var(--muted); font-size: .82rem; font-family: var(--code-font); }
.update-desc { color: var(--muted); margin-bottom: 14px; }
.changelog { list-style: none; margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.changelog li { position: relative; padding-left: 22px; color: var(--text); font-size: .92rem;
  opacity: 0; animation: fadeUp .4s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms); }
.changelog li::before { content: "✓"; position: absolute; left: 0; color: #10b981; font-weight: 700; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- News ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 14px; }
.news-card { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; color: var(--text); text-decoration: none !important;
  opacity: 0; transform: translateY(10px); animation: fadeUp .5s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms);
  transition: transform .25s var(--ease), border-color .25s ease, box-shadow .25s ease; }
.news-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--glow); }
.news-ico { font-size: 1.4rem; flex-shrink: 0; }
.news-body h3 { font-size: .98rem; margin-bottom: 4px; }
.news-body p { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.news-date { color: var(--muted); font-size: .75rem; font-family: var(--code-font); }

/* ---------- Servers ---------- */
.servers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 14px; }
.server-card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px;
  opacity: 0; transform: translateY(10px); animation: fadeUp .5s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms);
  transition: transform .25s var(--ease), border-color .25s ease, box-shadow .25s ease; }
.server-card:hover { transform: translateY(-3px); border-color: var(--type-color, var(--accent)); box-shadow: var(--glow); }
.fav-star { position: absolute; top: 14px; right: 14px; color: #f59e0b; }
.server-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.server-icon { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,.05); }
.server-top h3 { font-size: .98rem; }
.server-type { font-size: .78rem; }
.server-copy { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
  cursor: pointer; color: var(--text); font-family: var(--code-font); font-size: .85rem; transition: background .2s ease, border-color .2s ease; }
.server-copy:hover { background: rgba(139,92,246,.12); border-color: var(--accent); }
.copy-hint { color: var(--muted); font-size: .72rem; }

/* ---------- API table ---------- */
.api-table { display: flex; flex-direction: column; gap: 4px; }
.api-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--border); }
.api-row:last-child { border-bottom: none; }
.api-row code { font-family: var(--code-font); font-size: .82rem; color: var(--accent); }
.api-row span { color: var(--muted); font-size: .82rem; }

/* ---------- Toasts ---------- */
.toast-host { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.mini-toast { background: var(--card); border: 1px solid var(--accent); color: var(--text); font-size: .85rem;
  padding: 10px 18px; border-radius: 10px; box-shadow: 0 8px 26px rgba(0,0,0,.4); opacity: 0; transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease); }
.mini-toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Hero: split layout with launcher icon ---------- */
.hero { text-align: left; padding: 56px 0 40px; display: flex; align-items: center; gap: 48px; }
.hero-copy { flex: 1 1 420px; text-align: left; }
.hero-copy p { margin-left: 0; }
.hero-copy .stat-row { justify-content: flex-start; margin-left: 0; }
.hero-visual { flex: 0 0 220px; display: flex; justify-content: center; }
.hero-visual img {
  width: 220px; height: 220px; object-fit: contain;
  filter: drop-shadow(0 18px 50px rgba(139,92,246,.45));
  animation: heroFloat 5s ease-in-out infinite;
}
@keyframes heroFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(-2deg); } }

/* ---------- Feature cards (переработано из простого списка) ---------- */
.feature-cards { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 14px; }
.feature-cards li {
  background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 16px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .25s var(--ease), border-color .25s ease, box-shadow .25s ease;
}
.feature-cards li:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--glow); }
.feature-cards .f-ico { font-size: 1.5rem; }
.feature-cards .f-title { font-weight: 600; font-size: .95rem; }
.feature-cards .f-desc { color: var(--muted); font-size: .82rem; }

/* ---------- Mods section ---------- */
.mod-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 28px;
  opacity: 0; transform: translateY(14px); animation: fadeUp .5s var(--ease) forwards;
}
.mod-video-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--border); }
.mod-video-wrap video { width: 100%; display: block; max-height: 320px; background: #000; }
.mod-info { display: flex; flex-direction: column; gap: 12px; }
.mod-info-top { display: flex; align-items: center; gap: 12px; }
.mod-ico { font-size: 1.8rem; width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(99,102,241,.22)); border: 1px solid var(--border); flex-shrink: 0; }
.mod-info h3 { font-size: 1.2rem; }
.mod-info .mod-version { color: var(--muted); font-size: .8rem; font-family: var(--code-font); }
.mod-desc { color: var(--muted); font-size: .92rem; }
.mod-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.mod-badge { font-size: .74rem; padding: 4px 10px; border-radius: 999px; background: rgba(139,92,246,.14); color: #c4b5fd; border: 1px solid rgba(139,92,246,.3); font-family: var(--code-font); }
.mod-badge.soon { background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--border); }
.mod-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; flex-wrap: wrap; }
.mod-meta { color: var(--muted); font-size: .78rem; }
@media (max-width: 760px) {
  .mod-card { grid-template-columns: 1fr; }
}

/* ---------- Agreements section ---------- */
.agree-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 14px; }
.agree-card { background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.agree-card h3 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.agree-card p { color: var(--muted); font-size: .87rem; }
.agree-card a.btn-outline {
  align-self: flex-start; margin-top: auto; font-size: .82rem; padding: 8px 16px; border-radius: 8px;
  border: 1px solid var(--accent); color: var(--text) !important; text-decoration: none !important;
  transition: background .2s ease, border-color .2s ease;
}
.agree-card a.btn-outline:hover { background: rgba(139,92,246,.14); }
.agree-note { color: var(--muted); font-size: .8rem; margin-top: 14px; }
.agree-note a { color: var(--text); text-decoration: underline; }

@media (max-width: 620px) {
  .hero { flex-direction: column; text-align: center; padding-top: 32px; }
  .hero-copy { text-align: center; }
  .hero-copy .stat-row { justify-content: center; }
  .hero-visual { order: -1; flex: 0 0 auto; }
  .hero-visual img { width: 140px; height: 140px; }
  .hero h1 { font-size: 1.7rem; }
  .stat-row { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-fx, .hero-badge .dot, .hero-visual img { animation: none !important; }
  .section-block, .card, .news-card, .server-card, .changelog li, .mod-card { animation: none !important; opacity: 1 !important; transform: none !important; }
}
