:root {
  --primary: #2478dc;
  --secondary: #0c1a1f;
  --accent: #22d3ee;
  --bg: #08090c;
  --surface: #111318;
  --surface-2: #181b22;
  --text: #f3f4f6;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.09);
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--secondary) 18%, var(--bg)) 0%, var(--bg) 240px),
    var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.wrap { width: min(1140px, calc(100% - 2rem)); margin-inline: auto; }

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 68px;
}
.brand-logo { max-height: 38px; width: auto; }
.header-nav {
  display: flex;
  gap: 0.35rem;
  margin-left: auto;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  overflow-x: auto;
  max-width: min(52vw, 560px);
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }
.header-nav a {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.header-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.header-cta { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 8px;
  padding: 0.62rem 1.1rem;
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 38%, transparent);
}
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-outline {
  background: transparent;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--text);
}
.btn-lg { padding: 0.85rem 1.35rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* —— Hero (full-bleed banner) —— */
.hero {
  position: relative;
  margin-bottom: 0.5rem;
}
.hero-backdrop {
  position: relative;
  min-height: clamp(380px, 52vh, 580px);
  overflow: hidden;
}
.hero-banner-link { display: block; height: 100%; }
.hero-backdrop .banner {
  width: 100%;
  height: clamp(380px, 52vh, 580px);
  object-fit: cover;
  object-position: center 30%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 9, 12, 0.92) 0%, rgba(8, 9, 12, 0.55) 52%, rgba(8, 9, 12, 0.25) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 38%);
  pointer-events: none;
}
.hero-panel {
  /* Не заезжаем под sticky-хедер: панель между низом хедера и низом баннера */
  position: absolute;
  left: 0;
  right: 0;
  top: 4.75rem;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 clamp(1.5rem, 4vw, 2.5rem);
  box-sizing: border-box;
  pointer-events: none;
}
.hero-panel .wrap {
  pointer-events: auto;
}
.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 0 0 0.85rem;
  max-width: 18ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 4.2vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.lead {
  margin: 0;
  max-width: 42rem;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  font-size: 1.05rem;
}
.games-extra {
  margin-top: 1.5rem;
  max-width: 52rem;
}
.games-extra h2 {
  margin: 1.5rem 0 0.65rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
}

/* Баннер с уже нарисованным текстом: скрываем HTML-оверлей */
.hero[data-cms-hero-captions="0"] .hero-panel,
.hero.is-hero-captions-off .hero-panel {
  display: none;
}
.hero[data-cms-hero-captions="0"] .hero-overlay,
.hero.is-hero-captions-off .hero-overlay {
  display: none;
}

/* —— Section chrome —— */
.ledger-section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}
.section-head-inline { margin-bottom: 0.85rem; }
.section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
}
.section-index {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--primary);
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.section-lead {
  margin: -0.35rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 52rem;
}

.intro { padding: 1.25rem 0 0.5rem; }
.intro-copy {
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--surface) 90%, var(--secondary));
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.content-card,
.split-card,
.verdict-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.15rem, 3vw, 1.85rem);
  box-shadow: var(--shadow);
}

/* —— Facts highlights + table —— */
.facts-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}
.facts-chip {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.facts-chip-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.facts-chip-value {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
}

.facts-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.facts-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.92rem;
}
.facts-table th,
.facts-table td {
  padding: 0.78rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.facts-table tr:last-child th,
.facts-table tr:last-child td { border-bottom: 0; }
.facts-table th {
  width: 32%;
  color: var(--text);
  font-weight: 650;
  background: rgba(255, 255, 255, 0.02);
}
.facts-table td { color: var(--muted); }

/* —— Split sections: картинка обтекается текстом (float) —— */
.split-card {
  display: flow-root;
  box-shadow: var(--shadow);
}
.split-card-reverse { /* media float right */ }
.split-card .media-go {
  float: left;
  width: min(44%, 340px);
  max-width: 100%;
  margin: 0.15rem 1.35rem 1rem 0;
  display: block;
  overflow: visible;
  height: auto;
}
.split-card-reverse .media-go {
  float: right;
  margin: 0.15rem 0 1rem 1.35rem;
}
.split-card .prose {
  display: block;
  min-width: 0;
}
.split-card .prose > .btn,
.split-card .prose > a.btn {
  display: inline-block;
  margin-top: 0.75rem;
}
.section-media {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  object-fit: contain;
  object-position: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.media-go:hover .banner,
.media-go:hover .section-media {
  filter: brightness(1.04);
}

.prose h2, .prose h3 { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.2rem; margin: 0.5rem 0 1rem; }
.prose li + li { margin-top: 0.35rem; }
.prose h3 {
  margin: 1.15rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}
.prose .facts-table-wrap { margin: 0.75rem 0 1rem; }

/* Оффер не дублируем отдельной строкой под H2 — он в H1 и в таблице */
.bonus-line {
  display: none !important;
}
.structured-copy {
  color: var(--muted);
  white-space: pre-line;
  margin-bottom: 0.85rem;
}

/* —— Games grid —— */
.games-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  max-width: 100%;
}
.games-catalog-title { margin: 0; }
.games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
}
.games-grid:empty { display: none; }
.game-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  text-decoration: none;
  color: #fff;
  background: var(--surface-2);
  transition: transform 0.18s, border-color 0.18s;
}
.game-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 50%, transparent);
}
.game-card-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--surface-2);
}
.game-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem 0.8rem;
  border-top: 2px solid var(--accent, var(--primary));
  background: color-mix(in srgb, var(--surface) 92%, #000);
}
.game-card-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
.game-card-provider {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

/* —— FAQ —— */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.faq-item {
  padding: 0.95rem 1.05rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
}
.faq-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.faq-item p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* —— Footer —— */
.site-footer {
  margin-top: 1rem;
  padding: 1.75rem 0 2.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-nav a:hover { color: var(--text); }

/* —— Bonus popup —— */
.bonus-popup[hidden] { display: none !important; }
.bonus-popup {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.bonus-popup-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(4, 6, 10, 0.78);
  backdrop-filter: blur(5px);
  cursor: pointer;
}
.bonus-popup-card {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
  pointer-events: auto;
}
.bonus-popup-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 10;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}
.bonus-popup-image {
  position: relative;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}
.bonus-popup-title {
  display: block;
  margin: 0 0 0.5rem;
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
}
.bonus-popup-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.95rem;
}
.bonus-popup-dismiss {
  margin-top: 0.55rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}
body.bonus-popup-open { overflow: hidden; }

/* —— Legal pages (generated) —— */
.legal-page { padding: 2rem 0 3rem; }
.breadcrumbs {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.breadcrumbs li + li::before { content: "/"; margin-right: 0.45rem; opacity: 0.5; }
.breadcrumbs a { color: var(--accent); }
.legal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 3vw, 2rem);
}
.legal-updated { color: var(--muted); font-size: 0.85rem; }
.legal-body h2 { margin: 1.3rem 0 0.5rem; font-size: 1.1rem; }
.legal-body p { color: var(--muted); }

@media (max-width: 960px) {
  .header-nav { display: none; }
  .facts-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-card .media-go,
  .split-card-reverse .media-go {
    float: none;
    width: 100%;
    margin: 0 0 1rem;
  }
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { max-width: none; }
  .hero-panel { top: 4.25rem; }
}

@media (max-width: 520px) {
  .facts-highlights { grid-template-columns: 1fr; }
  .header-cta .btn-ghost { display: none; }
}

/* TraffBoard: chrome popup+footer */
.bonus-popup[hidden] { display: none !important; }
.bonus-popup {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000 !important;
  display: grid !important;
  place-items: center !important;
  padding: 1rem !important;
}
.bonus-popup-backdrop {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  background: rgba(4, 6, 10, 0.78) !important;
  cursor: pointer !important;
}
.bonus-popup-card {
  position: relative !important;
  z-index: 1 !important;
  pointer-events: auto !important;
  width: min(400px, 100%) !important;
  padding: 1.2rem !important;
  text-align: center !important;
}
.bonus-popup-close {
  position: absolute !important;
  top: 0.45rem !important;
  right: 0.45rem !important;
  z-index: 10 !important;
  width: 2.25rem !important;
  height: 2.25rem !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  color: #fff !important;
  font-size: 1.35rem !important;
  line-height: 1 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}
.bonus-popup-image {
  position: relative !important;
  z-index: 0 !important;
  pointer-events: none !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 0.5rem !important;
  margin-bottom: 0.75rem !important;
}
.split-card .media-go {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}
.split-card .section-media,
#bonus .section-media,
#login .section-media {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
}
.bonus-popup-dismiss {
  margin-top: 0.55rem !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font: inherit !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  pointer-events: auto !important;
}
.site-footer {
  margin-top: 1rem !important;
  padding: 1.75rem 0 2.25rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 0.88rem !important;
}
.site-footer .footer-inner {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
}
.site-footer .footer-nav {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.5rem 1rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.site-footer .footer-nav a {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}
.site-footer img,
.site-footer ul,
.site-footer .footer-brand,
.site-footer .footer-payments,
.site-footer .payment-list {
  display: none !important;
}
body.bonus-popup-open { overflow: hidden !important; }

/* TraffBoard: сетка слотов (защита от поломки ИИ) */
#games {
  overflow-x: clip !important;
  max-width: 100% !important;
}
#games .wrap,
#games .games-section,
#games .content-card {
  box-sizing: border-box !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}
.games-section {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  width: 100% !important;
  min-width: 0 !important;
}
.games-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.85rem !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  position: static !important;
  left: auto !important;
  right: auto !important;
  inset: auto !important;
  transform: none !important;
}
.games-grid:empty { display: none !important; }
.game-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  float: none !important;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  text-decoration: none !important;
  color: #fff;
  background: #121a2b;
}
.game-card-thumb {
  position: static !important;
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #121a2b;
}
.game-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem 0.75rem 0.8rem;
  border-top: 2px solid var(--accent, #38bdf8);
  background: color-mix(in srgb, var(--surface, #1a2a44) 92%, #000);
}
.game-card-name {
  position: static !important;
  display: block;
  padding: 0 !important;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  background: none !important;
}
.game-card-provider {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
}
@media (max-width: 960px) {
  .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
  .games-grid { grid-template-columns: 1fr !important; }
}
