/* ==========================================================================
   1. VARIABLES & BASE RESET
   ========================================================================== */
:root {
  --primary-color: #6c0eb2; /* Puntit Purple */
  --primary-hover: #53088c;
  --secondary-color: #f4efff; 
  --brand-green: #00d26a; /* Puntit Green */
  --bg-color: #ffffff;
  --bg-alt: #f9f9f9;
  --text-dark: #1a1a1a;
  --text-muted: #666666;
  --border-color: #e5e7eb;
  --success-color: #0b823c;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-alt);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.header {
  background: #111111;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 35px;
}

.auth-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 25px; /* Более круглые кнопки как на скрине */
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

/* Кнопка логина в темном Хедере */
.header .btn-login {
  background: transparent;
  color: #ffffff;
  border: 1px solid #ffffff; /* Обводка для явного вида кнопки */
}

.header .btn-login:hover {
  color: var(--brand-green);
  border-color: var(--brand-green);
}

.btn-register {
  background: var(--brand-green);
  color: #111;
}

.btn-register:hover {
  background: #00eb76;
  transform: translateY(-1px);
}

.menu-toggle {
  background: transparent;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #ffffff;
}

/* ==========================================================================
   3. MOBILE SIDEBAR MENU (Темный дизайн под логотип)
   ========================================================================== */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  background: #111111; /* Темный контрастный фон */
  box-shadow: 2px 0 10px rgba(0,0,0,0.5);
  z-index: 1001;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
}

.mobile-sidebar.active {
  left: 0;
}

.mobile-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #333333; /* Темная линия под логотипом */
}

.close-menu {
  background: none;
  border: none;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  color: #ffffff; /* Белый крестик закрытия */
}

/* Кнопки в мобильном меню */
.mobile-auth {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}

.mobile-auth .btn {
  flex: 1;
  padding: 12px 0;
  font-size: 15px;
}

.mobile-auth .btn-login {
  background: transparent;
  color: #ffffff; /* Белый текст */
  border: 1px solid #ffffff; /* Белая обводка */
}

.mobile-auth .btn-login:hover {
  color: var(--brand-green);
  border-color: var(--brand-green);
}

/* Ссылки в мобильном меню */
.mobile-nav ul li a {
  display: block;
  padding: 16px 0;
  color: #e5e7eb; /* Светлый текст на темном фоне */
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid #333333; /* Темные разделители */
  transition: var(--transition);
}

.mobile-nav ul li:last-child a {
  border-bottom: none;
}

.mobile-nav ul li a.active,
.mobile-nav ul li a:hover {
  color: var(--brand-green); /* Зеленый акцент при наведении и активности */
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: none;
}

.mobile-overlay.active {
  display: block;
}

.desktop-only { display: none; }

/* ==========================================================================
   4. GLOBAL TEMPLATE BLOCKS
   ========================================================================== */
.page-wrapper {
  padding-top: 20px;
  padding-bottom: 40px;
}

.hero-banner { margin-bottom: 25px; }
.hero-banner img {
  border-radius: var(--radius-md);
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.popular-games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}

.game-card-mini {
  background: var(--bg-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: center;
  display: block;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.game-card-mini img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.game-card-mini span {
  display: block;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
}

.game-card-mini:hover {
  border-color: var(--primary-color);
}

/* In-Play Betting Block */
.in-play-block {
  background: var(--secondary-color);
  border-radius: var(--radius-lg);
  padding: 15px;
  margin-bottom: 25px;
}

.in-play-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.in-play-header h2 {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-badge {
  background: var(--success-color);
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.in-play-list {
  background: var(--bg-color);
  border-radius: var(--radius-md);
  padding: 10px;
}

.match-row {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.match-row:last-child {
  border-bottom: none;
}

.match-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
}

.odds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.odd-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.odd-btn:hover {
  background: var(--secondary-color);
  border-color: var(--primary-color);
}

/* ==========================================================================
   5. ARTICLE & SEO CONTENT
   ========================================================================== */
.seo-article {
  background: var(--bg-color);
  padding: 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.breadcrumbs {
  margin-bottom: 15px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.breadcrumbs li::after {
  content: "›";
  margin-left: 5px;
}

.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--primary-color); }

.seo-article h1 {
  font-size: 24px;
  margin-bottom: 20px;
  line-height: 1.3;
  color: var(--primary-color);
}

.seo-article h2 {
  font-size: 20px;
  margin: 30px 0 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--secondary-color);
}

.seo-article h3 {
  font-size: 18px;
  margin: 20px 0 10px;
}

.seo-article p { margin-bottom: 15px; }
.seo-article ul:not(.toc-list), .seo-article ol {
  margin-bottom: 15px;
  padding-left: 20px;
}
.seo-article li { margin-bottom: 8px; }

/* CTAs */
.content-promo-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--brand-green);
  color: #111;
  padding: 15px 20px;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 700;
  margin: 25px 0;
  box-shadow: 0 4px 10px rgba(0, 210, 106, 0.2);
  text-transform: uppercase;
}

.content-promo-btn:hover {
  background: #00eb76;
  color: #111;
  transform: translateY(-2px);
}

/* TOC */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 25px 0;
}

.toc-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 15px;
}

.toc-list li { margin-bottom: 10px; }
.toc-list a {
  color: var(--text-dark);
  font-weight: 500;
}
.toc-list a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

/* Grids & Tables */
.games-grid-seo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  margin: 20px 0;
}

.games-grid-seo .game-card {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  padding: 15px;
  border-radius: var(--radius-md);
}

.games-grid-seo .game-card h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 16px;
}

.table-responsive {
  overflow-x: auto;
  margin: 20px 0;
}

.bonus-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.bonus-table th, .bonus-table td {
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.bonus-table th {
  background: var(--secondary-color);
  color: var(--primary-color);
  font-weight: 700;
}

/* FAQ */
.faq-item {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 15px 20px;
  margin-bottom: 15px;
}

.faq-item h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: var(--primary-color);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--brand-green);
  color: #111;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #00eb76;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.footer {
  background: #111111;
  color: #cccccc;
  padding: 40px 0 20px;
  margin-top: auto;
  border-top: 2px solid var(--primary-color);
}

.footer h4 {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 15px;
}

.footer-section { margin-bottom: 30px; }

.logo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.logo-grid img {
  height: 30px;
  background: #fff;
  padding: 5px;
  border-radius: 4px;
}

.footer-links ul li { margin-bottom: 8px; }
.footer-links a { color: #cccccc; }
.footer-links a:hover { color: var(--brand-green); }

.footer-disclaimer {
  border-top: 1px solid #333;
  padding-top: 20px;
  font-size: 12px;
  text-align: justify;
}

.resp-logos {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.resp-logos img { height: 35px; }

/* ==========================================================================
   7. DESKTOP MEDIA QUERIES (min-width: 768px)
   ========================================================================== */
@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .desktop-only { display: flex; }
  
  .main-nav ul {
    display: flex;
    gap: 25px;
  }
  
  .main-nav a {
    color: #e5e7eb;
    font-weight: 600;
    font-size: 15px;
    padding: 5px 0;
  }

  .main-nav a.active, .main-nav a:hover {
    color: var(--brand-green);
  }

  .page-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
  }

  .main-content-area { grid-column: 1 / 2; }
  .sidebar-area {
    grid-column: 2 / 3;
    position: sticky;
    top: 80px;
  }

  .popular-games-grid {
    grid-template-columns: 1fr;
    margin-bottom: 0;
  }

  .in-play-block { padding: 20px; }
  .match-row {
    flex-direction: row;
    align-items: center;
  }
  .match-info {
    width: 50%;
    margin-bottom: 0;
  }
  .odds-grid { width: 50%; }

  .seo-article { padding: 40px; }
  .seo-article h1 { font-size: 32px; }
  .seo-article h2 { font-size: 24px; }

  .games-grid-seo { grid-template-columns: repeat(2, 1fr); }
  .content-promo-btn {
    width: auto;
    padding: 15px 40px;
  }

  .footer-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
  }
  .footer-disclaimer { grid-column: 1 / -1; }
}