/* ============================================================
   Neon Stack — shared site shell (header, footer, article,
   game cards). Each game page keeps its own game-specific CSS.
   ============================================================ */
:root {
  --bg0: #05060f;
  --bg1: #0a0e24;
  --neon-cyan: #19f6ff;
  --neon-mag: #ff2bd6;
  --text: #cfdcf0;
  --muted: #8aa0c4;
  --line: rgba(25, 246, 255, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  font-size: 15px;
  background:
    radial-gradient(1100px 620px at 10% -8%, rgba(25, 246, 255, 0.11), transparent 62%),
    radial-gradient(950px 620px at 96% 6%, rgba(255, 43, 214, 0.11), transparent 62%),
    radial-gradient(900px 700px at 50% 108%, rgba(138, 92, 255, 0.10), transparent 60%),
    var(--bg0);
  background-attachment: fixed;
}

/* Faint synthwave grid over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(0deg, rgba(74, 170, 255, 0.055) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(90deg, rgba(74, 170, 255, 0.055) 0 1px, transparent 1px 46px);
  mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 85%);
}

body>* {
  position: relative;
  z-index: 1;
}

/* ---- Header ---- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px 22px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: rgba(4, 6, 18, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(25, 246, 255, 0.08) inset;
}

.site-head nav a {
  position: relative;
  padding-bottom: 2px;
  transition: color 0.18s ease;
}

.site-head nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-mag));
  box-shadow: 0 0 10px rgba(25, 246, 255, 0.8);
  transition: right 0.22s ease;
}

.site-head nav a:hover::after,
.site-head nav a[aria-current="page"]::after {
  right: 0;
}

.site-head .brand {
  font-weight: 900;
  letter-spacing: 0.1em;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 14px rgba(25, 246, 255, 0.7);
}

.site-head .brand span {
  color: var(--neon-cyan);
}

.site-head nav {
  display: flex;
  gap: 6px 18px;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-head a {
  color: var(--muted);
  text-decoration: none;
}

.site-head nav a:hover,
.site-head a[aria-current="page"] {
  color: var(--neon-cyan);
}

/* On phones the nav scrolls sideways instead of wrapping onto a second
   line, which would eat into the game area. */
@media (max-width: 620px) {

  .site-head,
  .site-head nav {
    flex-wrap: nowrap;
  }

  .site-head {
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 10px 14px;
  }

  .site-head::-webkit-scrollbar {
    display: none;
  }

  .site-head nav {
    gap: 14px;
  }

  .site-head nav a {
    white-space: nowrap;
  }
}

/* ---- Article ---- */
.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 10px 20px 60px;
  color: #9db2d2;
}

.page a {
  color: var(--neon-cyan);
  text-decoration: none;
}

.page a:hover {
  text-decoration: underline;
}

.page h1 {
  margin: 26px 0 10px;
  font-size: clamp(26px, 6vw, 38px);
  line-height: 1.15;
  background: linear-gradient(180deg, #aef9ff, #19f6ff 45%, #ff2bd6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page h2 {
  position: relative;
  color: #eaf6ff;
  font-size: clamp(20px, 4.4vw, 26px);
  margin: 46px 0 12px;
  padding-top: 18px;
  line-height: 1.25;
  text-shadow: 0 0 26px rgba(25, 246, 255, 0.25);
}

/* short neon rule above every section heading */
.page h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-mag));
  box-shadow: 0 0 14px rgba(25, 246, 255, 0.7);
}

.page-nav a {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14, 20, 48, 0.6);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.page-nav a:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(25, 246, 255, 0.55);
  box-shadow: 0 0 18px rgba(25, 246, 255, 0.22);
}

.page h3 {
  color: #cfeaff;
  font-size: 17px;
  margin: 26px 0 6px;
}

.page p {
  margin: 0 0 14px;
}

.page strong {
  color: #cfeaff;
}

.page hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 52px 0 0;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 16px 0 26px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  font-size: 17px;
  color: #c3d5ee;
  border-left: 3px solid rgba(25, 246, 255, 0.5);
  padding: 2px 0 2px 16px;
  margin-bottom: 18px;
}

.site-foot {
  background: rgba(4, 6, 18, 0.5);
  border-radius: 16px 16px 0 0;
}

/* Controls table — rendered as a panel */
.ctrl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0 26px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(14, 20, 48, 0.72), rgba(6, 8, 22, 0.72));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.ctrl caption {
  text-align: left;
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: var(--neon-cyan);
  padding: 0 0 10px;
  text-transform: uppercase;
}

.ctrl th,
.ctrl td {
  border-bottom: 1px solid rgba(120, 160, 210, 0.13);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}

.ctrl tbody tr:last-child th,
.ctrl tbody tr:last-child td {
  border-bottom: 0;
}

.ctrl thead th {
  color: #cfeaff;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(25, 246, 255, 0.07);
  border-bottom-color: rgba(25, 246, 255, 0.25);
}

.ctrl tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.018);
}

.ctrl td:first-child {
  color: #eaf6ff;
  font-weight: 600;
}

/* Numbered tips with neon badges */
.tips {
  counter-reset: tip;
  list-style: none;
  padding: 0;
  margin: 22px 0 26px;
}

.tips li {
  counter-increment: tip;
  position: relative;
  margin-bottom: 14px;
  padding: 12px 16px 12px 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 14, 36, 0.5);
}

.tips li::before {
  content: counter(tip);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  color: #061018;
  background: linear-gradient(180deg, #5dfcff, #19f6ff);
  box-shadow: 0 0 14px rgba(25, 246, 255, 0.55);
}

.tips li:nth-child(even)::before {
  background: linear-gradient(180deg, #ff7be8, #ff2bd6);
  box-shadow: 0 0 14px rgba(255, 43, 214, 0.55);
}

/* FAQ entries as cards with a neon stripe */
.faq {
  margin: 22px 0 26px;
}

.faq dt {
  color: #eaf6ff;
  font-weight: 700;
  margin-top: 14px;
  padding: 12px 16px 0 16px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: rgba(10, 14, 36, 0.5);
  border-left: 3px solid rgba(25, 246, 255, 0.55);
}

.faq dd {
  margin: 0;
  padding: 4px 16px 14px 16px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: rgba(10, 14, 36, 0.5);
  border-left: 3px solid rgba(255, 43, 214, 0.45);
}

.page ul {
  padding-left: 20px;
}

.page ul li {
  margin-bottom: 8px;
}

/* ---- Game cards (home + games hub) ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 22px 0 10px;
}

.game-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(16, 24, 56, 0.75), rgba(6, 8, 22, 0.75));
  text-decoration: none !important;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(25, 246, 255, 0.5);
  box-shadow: 0 0 26px rgba(25, 246, 255, 0.18);
}

/* CSS-drawn preview on each card — no image files to load */
.game-card .thumb {
  display: block;
  height: 104px;
  border-radius: 10px;
  margin-bottom: 12px;
  background-color: #070b1e;
  border: 1px solid rgba(25, 246, 255, 0.14);
  background-repeat: no-repeat;
  overflow: hidden;
}

.thumb-stack {
  background-image:
    radial-gradient(circle 9px at 24% 78%, #19f6ff 0 96%, transparent 100%),
    radial-gradient(circle 13px at 42% 74%, #8a5cff 0 96%, transparent 100%),
    radial-gradient(circle 18px at 64% 70%, #ff2bd6 0 96%, transparent 100%),
    radial-gradient(circle 11px at 83% 76%, #ff9a1f 0 96%, transparent 100%),
    linear-gradient(0deg, rgba(25, 246, 255, 0.12), transparent 60%);
}

.thumb-grid {
  background-image:
    linear-gradient(#19f6ff, #19f6ff),
    linear-gradient(#ff2bd6, #ff2bd6),
    linear-gradient(#b6ff3d, #b6ff3d),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 24px, transparent 24px 30px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 24px, transparent 24px 30px);
  background-size: 24px 24px, 24px 24px, 24px 24px, auto, auto;
  background-position: 18px 16px, 48px 46px, 78px 16px, 18px 16px, 18px 16px;
}

.thumb-breaker {
  background-image:
    radial-gradient(circle 5px at 70% 62%, #eaffff 0 92%, transparent 100%),
    linear-gradient(#ff2bd6, #ff2bd6),
    repeating-linear-gradient(90deg, #19f6ff 0 26px, transparent 26px 32px),
    repeating-linear-gradient(90deg, #ffe23d 0 26px, transparent 26px 32px);
  background-size: auto, 54px 8px, 100% 10px, 100% 10px;
  background-position: 0 0, 40% 84%, 10px 16px, 26px 32px;
}

.game-card h3 {
  margin: 10px 0 4px;
  color: #fff;
  font-size: 18px;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.game-card .chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #061018;
  background: linear-gradient(180deg, #5dfcff, #19f6ff);
  padding: 3px 10px;
  border-radius: 999px;
}

.game-card .chip.mag {
  background: linear-gradient(180deg, #ff7be8, #ff2bd6);
}

.game-card .chip.lime {
  background: linear-gradient(180deg, #d8ff7b, #b6ff3d);
}

/* ---- Ads ---- */
.ad-slot {
  width: 100%;
  max-width: 728px;
  margin: 36px auto;
  min-height: 0;
  overflow: hidden;
}

.ad-slot.ad-multiplex {
  max-width: 900px;
}

.ad-slot,
.ad-slot * {
  max-width: 100% !important;
}

/* ---- Footer ---- */
.site-foot {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px 50px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 13px;
  color: #6f84a8;
}

.site-foot a {
  color: var(--neon-cyan);
  text-decoration: none;
}

.site-foot a:hover {
  text-decoration: underline;
}

.site-foot p {
  flex-basis: 100%;
  margin: 6px 0 0;
}
