:root {
  --neon: #00e5ff;
  --neon2: #bd5dff;
  --good: #00ff9d;
  --purple: #b517ff;
  --bg: #070a12;
  --txt: #eef4ff;
  --txt-dim: #93a5bd;
  --panel: rgba(18, 24, 40, 0.55);
  --panel-border: rgba(120, 180, 255, 0.16);
  --radius: 20px;
  --shadow: 0 12px 40px rgba(0, 229, 255, 0.10);
}

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

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--txt);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ==== анимированный фон-канвас ==== */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ==== HERO ==== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  position: relative;
}
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--txt-dim);
  margin-bottom: 18px;
  border: 1px solid rgba(120,180,255,.2);
  border-radius: 999px;
  padding: 5px 14px;
}
.hero-title {
  font-size: clamp(40px, 8vw, 88px);
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1.05;
  margin: 6px 0 20px;
}
.hero-title .grad {
  background: linear-gradient(90deg, #00e5ff, #579bff, #bd5dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 620px;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--txt-dim);
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 18px;
  font-size: 26px;
  color: var(--txt-dim);
  opacity: .7;
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* кнопки */
.btn-main, a.btn-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  background: linear-gradient(120deg, var(--neon), var(--neon2));
  color: #061016;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0,229,255,.35);
  transition: .15s;
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(189,93,255,.4); }

.btn-ghost, a.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  background: transparent;
  color: var(--txt);
  border: 1px solid rgba(147,165,189,.4);
  border-radius: 14px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: .15s;
}
.btn-ghost:hover { border-color: var(--neon); color: var(--neon); }

/* ==== СЕКЦИИ ==== */
.section {
  width: min(1180px, 92vw);
  margin: 70px auto 40px;
  position: relative;
  z-index: 1;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.section-emoji {
  font-size: 30px;
  width: 58px; height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.section-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 750;
  letter-spacing: .3px;
}
.section-desc { color: var(--txt-dim); font-size: 15px; margin-top: 4px; }

/* ==== сетка инфо ==== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.cell {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px 18px;
  backdrop-filter: blur(10px);
  transition: .15s;
}
.cell:hover { border-color: rgba(0,229,255,.4); box-shadow: var(--shadow); }
.cell .label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--txt-dim);
  margin-bottom: 8px;
}
.cell .value {
  font-size: 15.5px;
  font-weight: 650;
  word-break: break-word;
}
.cell .value.mono { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 13.5px; }
.cell.accent { border-color: rgba(0,229,255,.45); }
.cell.load-hint { color: var(--txt-dim); font-style: italic; }

/* ==== карточки игр ==== */
.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.game-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--txt);
  font-family: inherit;
  backdrop-filter: blur(10px);
  transition: .15s;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--neon);
  box-shadow: var(--shadow);
}
.game-card .fix-emoji { font-size: 34px; }
.game-card .gc-name { font-size: 16px; font-weight: 700; }
.game-card .gc-sub { font-size: 12.5px; color: var(--txt-dim); }

/* ==== модалка игры ==== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4,7,14,.72);
  backdrop-filter: blur(10px);
}
.modal.hidden { display: none; }
.modal-box {
  width: min(680px, 94vw);
  max-height: 88vh;
  background: rgba(10,14,26,.94);
  border: 1px solid rgba(0,229,255,.4);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255,255,255,.05);
}
#game-title { font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.icon-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.22);
  color: var(--txt);
  border-radius: 8px;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 16px;
}
#game-stage { padding: 18px; }
#game-err:not(:empty) { color: var(--txt-dim); font-size: 15px; margin: 10px; }

/* элементы игр */
.arena { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.badge {
  display: inline-block;
  background: rgba(0,229,255,.1);
  border: 1px solid rgba(0,229,255,.45);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13.5px;
  color: var(--neon);
  font-weight: 650;
}

.foot {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--txt-dim);
  font-size: 12.5px;
  padding: 22px;
  margin-top: 30px;
  border-top: 1px solid rgba(120,180,255,.1);
}

@media (max-width: 640px) {
  .hero-title { font-size: 40px; }
  .game-cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .info-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}