/* ============================================
   BASE.CSS — базовые стили, НЕ МЕНЯТЬ
   Все цвета берутся из theme.css через var()
   ============================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text-link); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

/* --- ТИПОГРАФИКА --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-primary);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 { font-size: clamp(28px, 5vw, 48px); }
h2 { font-size: clamp(22px, 4vw, 36px); margin-bottom: 16px; }
h3 { font-size: 18px; }

.accent { color: var(--accent-primary); }
.accent-2 { color: var(--accent-secondary); }

p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.85;
  margin-bottom: 16px;
}

strong { color: var(--text-primary); font-weight: 600; }

/* --- ФЛАГ-ПОЛОСКА --- */
.flag-stripe {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--flag-stripe);
  z-index: 1030;
}

/* --- НАВИГАЦИЯ --- */
.site-nav {
  background: var(--bg-nav);
  position: sticky;
  top: 4px;
  z-index: 1020;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 18px;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo img { height: 40px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-nav);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 12px 8px 8px;
  min-width: 180px;
  list-style: none;
  box-shadow: var(--shadow-card);
  z-index: 100;
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.nav-cta {
  background: var(--accent-gradient);
  color: var(--bg-primary) !important;
  padding: 10px 22px !important;
  border-radius: var(--radius-pill) !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  margin-left: 8px;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--accent-gradient) !important; }

/* Гамбургер */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

/* Кнопка закрытия мобильного меню — скрыта на десктопе */
.nav-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* --- КОНТЕЙНЕР --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- СЕКЦИИ --- */
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.section-lg { padding: 80px 0; }

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 10px;
  display: block;
}

/* --- СЕТКА --- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- КАРТОЧКИ --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.card-num {
  font-family: var(--font-primary);
  font-size: 42px;
  font-weight: 900;
  color: var(--accent-primary);
  opacity: 0.20;
  line-height: 1;
  margin-bottom: 10px;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-secondary);
  margin-bottom: 8px;
}

.card-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
}

/* --- КНОПКИ --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--bg-primary);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-card);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.20);
  background: var(--bg-card);
}

.btn-lg { padding: 16px 40px; font-size: 16px; }
.btn-sm { padding: 8px 18px; font-size: 12px; }

/* --- СТАТ-БАР (цифры) --- */
.stats-bar {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 24px 0;
}

.stat-item { text-align: center; }

.stat-value {
  font-family: var(--font-primary);
  font-size: 28px;
  font-weight: 900;
  color: var(--accent-primary);
  line-height: 1;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 5px;
}

/* --- БЕЙДЖИ --- */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: rgba(244,180,26,0.10);
  color: var(--accent-primary);
  border: 1px solid rgba(244,180,26,0.20);
}

/* --- РЕКОМЕНДОВАННЫЙ КАЗИНО-БЛОК --- */
.casino-featured {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.casino-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
}

.casino-featured-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.casino-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

/* --- FAQ АККОРДЕОН --- */
.faq-list { display: flex; flex-direction: column; gap: 8px; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
  transition: background var(--transition);
}

.faq-question:hover { background: var(--bg-card-hover); }

.faq-icon {
  color: var(--accent-primary);
  font-size: 20px;
  font-weight: 700;
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 16px;
  line-height: 1;
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease, opacity 0.28s ease;
  opacity: 0;
}

.faq-answer-inner {
  overflow: hidden;
  padding: 0 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  transition: padding-bottom 0.32s ease;
  padding-bottom: 0;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
  opacity: 1;
}

.faq-item.open .faq-answer-inner {
  padding-bottom: 18px;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

/* --- HERO СЕКЦИЯ --- */
.hero {
  padding: 72px 0 48px;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(244,180,26,0.10);
  border: 1px solid rgba(244,180,26,0.25);
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 80px;
}

.hero-title { margin-bottom: 18px; }

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 560px;
}

.hero-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}

.hero-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  line-height: 0;
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

/* --- STICKY MOBILE CTA --- */
.sticky-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10,22,40,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  padding: 12px 16px;
  z-index: 1040;
}

.sticky-mobile-cta .btn { width: 100%; justify-content: center; }

/* --- COOKIE BANNER --- */


.cookie-banner {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 720px;
  background: #1A1A2E;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  z-index: 9999;
  display: none;
  box-shadow: var(--shadow-card);
}

.cookie-text {
  flex: 1;
  min-width: 200px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin: 0;
}

.cookie-text a {
  color: var(--accent-primary);
}

.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}



.cookie-actions { display: flex; gap: 8px; }

/* --- ФУТЕР --- */
.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.footer-inner a { color: var(--text-muted); }
.footer-inner a:hover { color: var(--text-secondary); }

/* --- ТАБЛИЦЫ --- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-card); }

/* --- BREADCRUMB --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-secondary); }
.breadcrumb-sep { opacity: 0.4; }
.breadcrumb-current { color: var(--text-secondary); }

/* --- УТИЛИТЫ --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.w-100 { width: 100%; }

/* ============================================
   HERO ЛЕЙАУТЫ — классы вместо инлайн grid
   ============================================ */

.hero-layout-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-layout-2col-reverse {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-layout-2col-reverse .hero-img-col { order: -1; }

.hero-layout-center {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.hero-layout-center .hero-subtitle { max-width: 100%; }
.hero-layout-center .hero-actions { justify-content: center; }

.hero-layout-fullwidth {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.hero-layout-fullwidth .hero-actions { justify-content: center; }

/* STATS GRID */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* КОНТЕНТ + САЙДБАР */
.layout-content-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* СПИСОК КАЗИНО */
.casino-list { display: flex; flex-direction: column; gap: 12px; }

.casino-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: all var(--transition);
}
.casino-item:hover { background: var(--bg-card-hover); }
.casino-item-name { font-weight: 700; font-size: 15px; color: var(--text-primary); margin-bottom: 4px; }
.casino-item-meta { font-size: 12px; color: var(--text-muted); }

/* STEP LIST */
.step-list { display: flex; flex-direction: column; gap: 20px; }

.step-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
}

.step-num {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: var(--bg-primary);
  font-family: var(--font-primary);
  font-weight: 900;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-content h3 { font-size: 16px; margin-bottom: 6px; }
.step-content p { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* INFO BOX */
.info-box {
  background: var(--bg-card);
  border-left: 3px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.info-box p { margin: 0; font-size: 14px; }

.warning-box {
  background: rgba(244,67,54,0.06);
  border-left: 3px solid #F44336;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 20px 0;
}
.warning-box p { margin: 0; font-size: 14px; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .nav-mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-nav);
    z-index: 9999;
    padding: 80px 24px 40px;
    gap: 4px;
    overflow-y: auto;
  }

  .nav-mobile-open .nav-links a {
    font-size: 18px;
    padding: 14px 16px;
    text-align: center;
  }

  .nav-mobile-open .nav-cta {
    font-size: 16px !important;
    padding: 14px 22px !important;
    text-align: center;
    margin: 12px 0 0;
  }

  .nav-mobile-open .nav-dropdown-menu {
    display: block;
    position: static;
    transform: none;
    box-shadow: none;
    background: transparent;
    border: none;
    padding: 4px 0 4px 16px; /* отступ слева, без смещения */
    margin-top: 4px;
  }

  /* Дропдаун в мобильном меню — закрыт по умолчанию */
  .nav-mobile-open .nav-dropdown .nav-dropdown-menu {
    display: none;
  }

  /* Открывается только при клике */
  .nav-mobile-open .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-close-btn {
    display: block;
    position: absolute;
    top: 20px; right: 20px;
    z-index: 10000;
  }

  .sticky-mobile-cta { display: block; }
}

@media (max-width: 768px) {
  .section { padding: 40px 0; }
  .section-lg { padding: 56px 0; }
  .hero { padding: 32px 0 24px; }
  .hero-eyebrow { margin-bottom: 12px; }
  .hero-title { margin-bottom: 12px; }
  .hero-subtitle { margin-bottom: 16px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 12px 20px; font-size: 15px; }

  /* Сетки → одна колонка */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2.grid-2-sm { grid-template-columns: repeat(2, 1fr); }

  /* Hero лейауты → одна колонка */
  .hero-layout-2col,
  .hero-layout-2col-reverse { grid-template-columns: 1fr; gap: 28px; }
  .hero-layout-2col-reverse .hero-img-col { order: 0; }
  /* Hero layout mobile: texto primeiro, img depois */
  .hero-layout-2col > div:last-child { order: 2; }
  .hero-layout-2col > div:first-child { order: 1; }

  /* Stats → 2x2 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Сайдбар → одна колонка */
  .layout-content-sidebar { grid-template-columns: 1fr; }

  /* Casino list → без логотипа */
  .casino-item { grid-template-columns: 1fr auto; }
  .casino-item-logo { display: none; }

  /* Типографика */
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }

  .casino-featured { padding: 20px; }

  /* CTA кнопки — стопятся */
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; justify-content: center; width: 100%; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .grid-2.grid-2-sm { grid-template-columns: 1fr; }
}

/* ============================================
   НОВЫЕ КОМПОНЕНТЫ v2.0
   ============================================ */

/* --- ПРОГРЕСС-БАР ЧТЕНИЯ --- */
#reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent-gradient);
  z-index: 9998;
  transition: width 0.1s linear;
}

/* --- КНОПКА "ВЕРНУТЬСЯ НАВЕРХ" --- */
#back-to-top {
  position: fixed;
  bottom: 80px; right: 20px;
  width: 44px; height: 44px;
  background: var(--accent-gradient);
  color: var(--bg-primary);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 1030;
  box-shadow: var(--shadow-card);
}

#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- FADE-IN АНИМАЦИЯ --- */
.fade-in-ready {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- ОГЛАВЛЕНИЕ (TOC) --- */
.toc-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 32px;
}

.toc-box h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-list li a {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  display: block;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: all var(--transition);
}

.toc-list li a:hover,
.toc-list li a.active {
  color: var(--accent-secondary);
  border-left-color: var(--accent-secondary);
}

.toc-list li.toc-sub a {
  padding-left: 22px;
  font-size: 12px;
}

/* --- DARK/LIGHT ПЕРЕКЛЮЧАТЕЛЬ --- */
#theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  line-height: 1;
}

#theme-toggle:hover { background: var(--bg-card-hover); }

/* Light theme override — агент заполняет переменные */
[data-theme="light"] {
  --bg-primary: var(--light-bg-primary, #F5F7FA);
  --bg-secondary: var(--light-bg-secondary, #FFFFFF);
  --bg-card: var(--light-bg-card, rgba(0,0,0,0.03));
  --bg-nav: var(--light-bg-nav, #FFFFFF);
  --text-primary: var(--light-text-primary, #111111);
  --text-secondary: var(--light-text-secondary, rgba(17,17,17,0.60));
  --text-muted: var(--light-text-muted, rgba(17,17,17,0.38));
  --border-subtle: var(--light-border-subtle, rgba(0,0,0,0.07));
  --border-card: var(--light-border-card, rgba(0,0,0,0.09));
}

/* --- ТАЙМЕР БОНУСА --- */
.bonus-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(244,67,54,0.08);
  border: 1px solid rgba(244,67,54,0.20);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #F44336;
}

.bonus-timer-label { opacity: 0.75; font-weight: 400; }

[data-countdown] {
  font-family: var(--font-primary);
  letter-spacing: 1px;
}

/* --- СОЦИАЛЬНОЕ ДОКАЗАТЕЛЬСТВО --- */
.social-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
}

.social-proof-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.social-proof-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  box-shadow: 0 0 6px rgba(76,175,80,0.6);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* --- EXIT-INTENT ПОПАП --- */
#exit-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.70);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

#exit-popup.visible {
  opacity: 1;
  pointer-events: all;
}

.exit-popup-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 440px;
  width: 100%;
  position: relative;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#exit-popup.visible .exit-popup-box { transform: scale(1); }

.exit-popup-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.exit-popup-close:hover { color: var(--text-primary); }

.exit-popup-emoji { font-size: 48px; margin-bottom: 12px; }

.exit-popup-title {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.exit-popup-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* --- КАЛЬКУЛЯТОР БАНКРОЛЛА --- */
.calc-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.calc-field {
  margin-bottom: 80px;
}

.calc-field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.calc-field label span {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-primary);
}

.calc-range {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border-card);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

.calc-range::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: none;
}

.calc-result {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 20px;
}

.calc-result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.calc-result-item { text-align: center; }

.calc-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.calc-val {
  display: block;
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 900;
  color: var(--text-primary);
}

.calc-val.positive { color: #4CAF50; }
.calc-val.negative { color: #F44336; }

/* --- ВРЕМЯ ЧТЕНИЯ --- */
.reading-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.reading-meta span { display: flex; align-items: center; gap: 5px; }

/* --- ПРОГРЕСС ДОВЕРИЯ --- */
.trust-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 20px 0;
}

.trust-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.trust-bar-track {
  height: 6px;
  background: var(--border-card);
  border-radius: 3px;
  overflow: hidden;
}

.trust-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 1.5s ease;
}

/* --- GLOSSARY --- */
.glossary-list { display: flex; flex-direction: column; gap: 0; }

.glossary-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.glossary-item:last-child { border-bottom: none; }

.glossary-term {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.glossary-term::before {
  content: '#';
  font-family: var(--font-primary);
  color: var(--accent-primary);
  font-size: 13px;
  opacity: 0.6;
}

.glossary-def {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* --- CHANGELOG / ПОСЛЕДНЕЕ ОБНОВЛЕНИЕ --- */
.page-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0;
}

/* --- INFO / WARNING BOXES --- */
.info-box {
  background: rgba(37,99,235,0.06);
  border-left: 3px solid var(--accent-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  margin: 20px 0;
}

.info-box p { margin: 0; font-size: 14px; color: var(--text-secondary); }

.warning-box {
  background: rgba(244,67,54,0.06);
  border-left: 3px solid #F44336;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  margin: 20px 0;
}

.warning-box p { margin: 0; font-size: 14px; color: var(--text-secondary); }

.success-box {
  background: rgba(76,175,80,0.06);
  border-left: 3px solid #4CAF50;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  margin: 20px 0;
}

.success-box p { margin: 0; font-size: 14px; color: var(--text-secondary); }

/* --- РЕЙТИНГ --- */
.rating-display {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars { color: var(--accent-primary); font-size: 14px; letter-spacing: 1px; }
.rating-num { font-family: var(--font-primary); font-weight: 800; font-size: 18px; color: var(--accent-primary); }
.rating-count { font-size: 12px; color: var(--text-muted); }

/* --- SVG ИНФОГРАФИКА --- */
.infographic-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 24px 0;
  overflow-x: auto;
}

.infographic-wrapper svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* RESPONSIVE для новых компонентов */
@media (max-width: 768px) {
  #back-to-top { bottom: 70px; right: 12px; width: 40px; height: 40px; font-size: 16px; }
  .exit-popup-box { padding: 28px 20px; }
  .calc-result-grid { grid-template-columns: 1fr 1fr; }
  .toc-box { display: none; } /* TOC скрываем на мобайле, якоря остаются */
  .social-proof { gap: 10px; }
}

@media (max-width: 480px) {
  .calc-result-grid { grid-template-columns: 1fr; }
  .bonus-timer { font-size: 12px; }
}

/* ============================================
   АНТИПАТТЕРНЫ — явно сбрасываем checkbox hack
   Если агент случайно добавил checkbox в HTML —
   он будет скрыт и не сломает верстку
   ============================================ */

/* Скрываем любой checkbox/radio рядом с nav — запрет checkbox hack */
.site-nav input[type="checkbox"],
.site-nav input[type="radio"],
nav input[type="checkbox"],
nav input[type="radio"],
header input[type="checkbox"],
header input[type="radio"],
label[for="menu-toggle"],
label[for="nav-toggle"],
#menu-toggle,
#nav-toggle {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  pointer-events: none !important;
}

/* Гарантируем правильное поведение nav на десктопе */
@media (min-width: 992px) {
 .cookie-banner { bottom: 24px; }

  .nav-toggle { display: none !important; }
  .nav-close-btn { display: none !important; }
  .nav-links { display: flex !important; }
  .nav-mobile-cta { display: none !important; }
  .sticky-mobile-cta { display: none !important; }
}

/* Гарантируем правильное поведение nav на мобайле */
@media (max-width: 991px) {
  .nav-cta { display: none !important; } /* десктопная CTA скрыта */
  .nav-links:not(.nav-mobile-open .nav-links) { display: none; }
}

/* body padding для sticky CTA на мобайле — футер не перекрывается */
@media (max-width: 991px) {
  body { padding-bottom: 68px; }
  .cookie-banner { bottom: 80px; }
}

/* ============================================
   КОНТЕНТНЫЕ БЛОКИ (текст + изображение)
   ============================================ */

.content-block-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

/* Квадратный плейсхолдер изображения */
.content-block-placeholder {
  aspect-ratio: 1 / 1;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-card);
  width: 100%;
}

/* Hero плейсхолдер — тоже квадратный и больше */
.hero .content-block-placeholder,
.hero-placeholder {
  aspect-ratio: 1 / 1;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-card);
  width: 100%;
  min-height: 320px;
}

.content-block-text { display: flex; flex-direction: column; gap: 0; }
.content-block-text .btn { align-self: flex-start; margin-top: 8px; }

/* Список фич */
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }

.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.feature-item strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 14px;
  margin: 0;
}

/* Prose контент (длинные статьи) */
.content-prose h2 { margin-top: 32px; margin-bottom: 12px; }
.content-prose h2:first-child { margin-top: 0; }
.content-prose h3 { margin-top: 24px; margin-bottom: 8px; font-size: 17px; }
.content-prose ul, .content-prose ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.content-prose li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 6px;
}

/* Адаптив контентных блоков */
@media (max-width: 768px) {
  .content-block-2col { grid-template-columns: 1fr; gap: 28px; }
  .content-block-reversed .content-block-media { order: -1; }
  .hero-placeholder { min-height: 240px; }
}

.nav-logo-text {
  font-family: var(--font-primary);
  font-weight: 900;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-logo-accent {
  color: var(--accent-primary);
  margin-left: 3px;
}
/* --- ALERT BANNER (Pixbet / news) --- */
.alert-banner {
  background: linear-gradient(90deg, rgba(255, 51, 102, 0.18), rgba(0, 212, 255, 0.12));
  border-bottom: 1px solid rgba(255, 51, 102, 0.35);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  padding: 12px 20px;
}
.alert-banner strong { color: var(--accent-primary); }
.alert-banner a {
  color: var(--accent-primary);
  font-weight: 700;
  margin-left: 6px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .alert-banner { font-size: 13px; padding: 10px 14px; text-align: left; }
}

/* --- CUSTOM: F-custom (neon-cyber) overrides --- */
body { background: var(--bg-primary, #050510); color: var(--text-primary, #e8e8ff); }
.nav-links a:hover, .nav-links a.active { color: var(--accent-primary, #00D4FF); background: rgba(0, 212, 255, 0.08); }
.nav-cta { background: var(--accent-gradient, linear-gradient(135deg, #00D4FF, #7b2fff)) !important; }
.stat-value { color: var(--accent-primary, #00D4FF); text-shadow: 0 0 10px rgba(0, 212, 255, 0.3); }
.section-label { color: var(--accent-primary, #00D4FF); }
.btn-primary { background: var(--accent-gradient, linear-gradient(135deg, #00D4FF, #7b2fff)); }
.accent { color: var(--accent-primary, #00D4FF); }
