:root {
  --bg: #050506;
  --surface: #121214;
  --surface-2: #1a1a1d;
  --border: #2a2a2e;
  --text: #f4f4f5;
  --muted: #9b9ba3;
  --accent: #e50914;
  --accent-glow: rgba(229, 9, 20, 0.45);
  --cta: #ff3b30;
  --radius: 12px;
  --header-h: 64px;
  --redirect-bar-h: 48px;
  --sidebar-w: 56px;
  --header-stack-top: calc(var(--redirect-bar-h) + var(--header-h));
}

body.no-redirect-bar {
  --redirect-bar-h: 0px;
}

body.no-redirect-bar .redirect-bar {
  display: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ——— Плашка перехода (над шапкой) ——— */
.redirect-bar {
  position: sticky;
  top: 0;
  z-index: 120;
  min-height: var(--redirect-bar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: linear-gradient(180deg, #2a0a10 0%, #140508 100%);
  border-bottom: 1px solid rgba(229, 9, 20, 0.45);
  font-size: 0.8125rem;
  color: var(--text);
}

.redirect-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  max-width: 1200px;
  text-align: center;
}

.redirect-bar-text {
  color: var(--muted);
}

.redirect-bar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
}

.redirect-bar-now {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.redirect-bar-now:hover {
  color: #ff5a52;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: var(--redirect-bar-h);
  z-index: 110;
  height: var(--header-h);
  background: #000;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px 0 12px;
  gap: 12px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-m {
  width: 28px;
  height: 28px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-transform: lowercase;
}

.header-search {
  flex: 1;
  max-width: 420px;
  min-width: 120px;
}

.search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
}

.search-inner svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.search-inner input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  width: 100%;
}

.search-inner input::placeholder {
  color: var(--muted);
}

.btn-race {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #2a0a0c 0%, #1a0506 100%);
  border: 1px solid var(--accent);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 0 20px var(--accent-glow);
  white-space: nowrap;
}

.btn-race svg {
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.link-login {
  color: var(--text);
  font-size: 0.95rem;
  padding: 8px 10px;
}

.link-login:hover {
  color: var(--accent);
}

.btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}

.btn-register:hover {
  filter: brightness(1.08);
}

/* ——— Layout: main + левый сайдбар ——— */
.layout-wrap {
  display: flex;
  min-height: calc(100vh - var(--header-stack-top));
  padding-left: var(--sidebar-w);
  padding-right: 0;
}

.main-area {
  flex: 1;
  padding: 28px 28px 56px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ——— Левая икон-панель + выпадающее меню справа от неё ——— */
.side-rail {
  position: fixed;
  top: var(--header-stack-top);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 102;
  background: #0c0c0e;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
}

.rail-lang {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.rail-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.rail-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.rail-icons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  width: 100%;
}

.rail-icon-link {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid transparent;
  font-size: 1.15rem;
  transition: border-color 0.15s, background 0.15s;
}

.rail-icon-link:hover {
  border-color: var(--accent);
  background: #241316;
}

.rail-dropdown-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
}

.rail-dropdown-backdrop.is-open {
  display: block;
}

.rail-dropdown-panel {
  position: fixed;
  top: var(--header-stack-top);
  left: calc(var(--sidebar-w) + 10px);
  width: min(320px, calc(100vw - var(--sidebar-w) - 28px));
  max-height: calc(100vh - var(--header-stack-top) - 24px);
  margin: 12px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 12px 8px 40px rgba(0, 0, 0, 0.55);
  z-index: 101;
  padding: 16px;
  overflow-y: auto;
  transform: translateX(calc(-100% - 24px));
  transition: transform 0.22s ease;
  pointer-events: none;
}

.rail-dropdown-panel.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.rail-dropdown-panel h3 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.rail-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rail-menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

.rail-menu-item span.emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.rail-menu-item:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ——— Banners ——— */
/* ——— Заголовок страницы над баннерами ——— */
.page-hero {
  margin-bottom: 28px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  max-width: 920px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-hero .page-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 52rem;
}

.banners-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .banners-row {
    grid-template-columns: 1fr;
  }

  .header-search {
    display: none;
  }

  .btn-race span.label-full {
    display: none;
  }
}

.banner-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.banner-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0.55;
}

.banner-content {
  position: relative;
  z-index: 1;
  padding: 24px;
  max-width: 58%;
}

.banner-content h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.banner-content p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.banner-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: -12px;
  margin-bottom: 28px;
}

.banner-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.banner-dots span.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ——— 4 promo chips ——— */
.promo-quad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

@media (max-width: 800px) {
  .promo-quad {
    grid-template-columns: repeat(2, 1fr);
  }
}

.promo-tile {
  border-radius: var(--radius);
  padding: 16px 18px;
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.promo-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
}

.promo-tile.purple::before {
  background: linear-gradient(135deg, #6b21a8, transparent);
}

.promo-tile.orange::before {
  background: linear-gradient(135deg, #ea580c, transparent);
}

.promo-tile.green::before {
  background: linear-gradient(135deg, #16a34a, transparent);
}

.promo-tile.gold::before {
  background: linear-gradient(135deg, #ca8a04, transparent);
}

.promo-tile .icon-bubble {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.promo-tile strong {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
}

/* ——— Category pills ——— */
.cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 26px;
  align-items: center;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.cat-pill:hover,
.cat-pill.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.cat-pill.is-active .dot {
  color: var(--accent);
}

/* ——— Game sections ——— */
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.badge-count {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}

.section-head .spacer {
  flex: 1;
}

.section-head .see-all {
  color: var(--accent);
  font-size: 0.9rem;
}

.arrows {
  display: flex;
  gap: 6px;
}

.arrow-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.arrow-btn:hover {
  border-color: var(--accent);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.game-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  position: relative;
}

.game-thumb {
  position: relative;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}

.game-card img.cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.game-card .badge-rtp {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  z-index: 2;
}

.game-card .badge-flame {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 0.9rem;
}

.game-card .hover-layer {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.18s;
  z-index: 3;
  padding: 12px;
}

.game-card:hover .hover-layer {
  opacity: 1;
}

.game-card .btn-play {
  width: 100%;
  max-width: 120px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  border: none;
  cursor: pointer;
}

.game-card .btn-demo {
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: underline;
}

.game-meta {
  padding: 8px 8px 10px;
  font-size: 0.78rem;
  background: var(--surface-2);
}

.game-meta .title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-meta .prov {
  color: var(--muted);
}

/* ——— Article + FAQ ——— */
.content-block {
  max-width: 820px;
  margin: 48px auto 0;
  padding: 0 8px;
}

.content-block h2 {
  font-size: 1.5rem;
  margin-top: 0;
}

.content-block h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.6rem 0 0.65rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.content-block p {
  color: #c4c4cc;
  margin: 0 0 1rem;
  text-align: justify;
  hyphens: auto;
}

.seo-toc {
  margin: 0 0 1.25rem;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.88rem;
}

.seo-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.seo-toc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.seo-toc a:hover {
  color: #ff5a52;
}

.faq-block {
  max-width: 820px;
  margin: 40px auto 0;
  padding: 0 8px 32px;
}

.faq-block h2 {
  font-size: 1.4rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--surface);
}

.faq-item summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-weight: 400;
  font-size: 1.25rem;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item .answer {
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ——— Footer ——— */
.site-footer {
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  padding: 40px 24px 32px;
  margin-left: var(--sidebar-w);
  margin-right: 0;
}

.footer-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
  margin-bottom: 28px;
  opacity: 0.55;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto 28px;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--text);
}

.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.badge-18 {
  border: 2px solid #ff5c33;
  color: #ff5c33;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
}

.footer-legal {
  font-size: 0.75rem;
  color: #6b6b73;
  max-width: 560px;
  line-height: 1.55;
}

.btn-affiliate {
  display: inline-block;
  padding: 10px 18px;
  background: #ff5c33;
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.btn-affiliate:hover {
  filter: brightness(1.06);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
