/* ==========================================================================
   1. VARIABLES & RESET (Jackpot Joker - Casino Glamour Theme)
   ========================================================================== */
:root {
  /* Палитра "Casino Magenta & Gold" */
  --bg-color: #2a001a; /* Глубокий темно-пурпурный фон */
  --bg-gradient: linear-gradient(135deg, #4a0033 0%, #1a0011 100%);
  
  --surface-color: #5e0b3e; /* Насыщенный малиновый/пурпурный для карточек */
  --surface-border: #ffd700; /* Яркое классическое золото для рамок */
  
  --primary-color: #ffd700; /* Золото для главных кнопок (CTA) */
  --primary-hover: #e6b800; /* Более глубокое золото при наведении */
  
  --accent-color: #ff3399; /* Неоново-розовый для выделения деталей и ссылок */
  --accent-hover: #ff66b2;
  
  --danger-color: #ff0055; /* Яркий рубиновый/казино-красный */
  --danger-hover: #cc0044;
  
  --text-main: #ffffff; /* Белоснежный для максимального контраста */
  --text-muted: #fbcfe8; /* Мягкий розово-белый для второстепенного текста */
  --text-light: #ffffff;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --border-radius: 12px;
  --btn-radius: 8px; /* Слегка скругленные классические кнопки */
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.header {
  background-color: var(--surface-color);
  border-bottom: 3px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.3);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 45px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.main-nav a {
  color: var(--text-light);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-nav a:hover, .main-nav a.active {
  color: var(--primary-color);
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Стили кнопок */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--btn-radius);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
}

/* Главная кнопка (Золотая панель джекпота) */
.btn-play {
  background: linear-gradient(180deg, var(--primary-color) 0%, #cc9900 100%);
  color: #2a001a; /* Темный текст для контраста с золотом */
  box-shadow: 0 4px 0 #806000, 0 5px 15px rgba(255, 215, 0, 0.4);
  border: 1px solid #fff5cc;
}

.btn-play:hover {
  background: linear-gradient(180deg, var(--primary-hover) 0%, #b38600 100%);
  transform: translateY(2px);
  box-shadow: 0 2px 0 #664d00, 0 3px 6px rgba(255, 215, 0, 0.3);
}

/* Демо кнопка (Неоново-розовая) */
.btn-demo {
  background: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  box-shadow: 0 0 10px rgba(255, 51, 153, 0.2) inset;
}

.btn-demo:hover {
  background: var(--accent-color);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 51, 153, 0.5);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 28px;
  cursor: pointer;
}

/* ==========================================================================
   3. MOBILE SIDEBAR
   ========================================================================== */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 300px;
  height: 100%;
  background: var(--surface-color);
  box-shadow: 5px 0 20px rgba(0,0,0,0.8);
  border-right: 3px solid var(--surface-border);
  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;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.close-menu {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav ul {
  list-style: none;
}

.mobile-nav a {
  display: block;
  padding: 15px 0;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  text-transform: uppercase;
}

.mobile-nav a.active {
  color: var(--primary-color);
}

.mobile-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 0, 17, 0.85); /* Пурпурно-черная тень */
  z-index: 1000;
  display: none;
  backdrop-filter: blur(4px);
}

.mobile-overlay.active {
  display: block;
}

/* ==========================================================================
   4. MAIN CONTENT & HERO
   ========================================================================== */
.page-wrapper {
  padding: 40px 20px;
  min-height: 70vh;
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
  background: linear-gradient(135deg, var(--surface-color) 0%, #2a001a 100%);
  border-radius: var(--border-radius);
  padding: 40px 30px;
  border: 2px solid var(--surface-border);
  box-shadow: 0 15px 35px rgba(0,0,0,0.5), inset 0 0 30px rgba(255, 215, 0, 0.1);
}

.hero-content h1 {
  font-size: 42px;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--primary-color);
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6), 0 0 15px rgba(255, 215, 0, 0.3);
}

.hero-content p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 30px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 25px rgba(255, 51, 153, 0.3);
  border: 3px solid var(--surface-border);
}

/* ==========================================================================
   5. DEMO GAME WRAPPER & LAZY LOAD
   ========================================================================== */
.demo-game-wrapper {
  background: var(--surface-color);
  padding: 20px;
  border-radius: var(--border-radius);
  border: 2px solid var(--surface-border);
  margin-bottom: 60px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 20px rgba(255, 215, 0, 0.2);
}

.demo-game-wrapper h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.iframe-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  height: 650px; /* Фиксированная высота для корректного отображения панели игры */
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 4px solid var(--surface-border);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.3) inset;
}

.iframe-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(42, 0, 26, 0.8);
  z-index: 10;
  cursor: pointer;
}

.iframe-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: var(--transition);
}

.iframe-overlay:hover .iframe-cover {
  opacity: 0.3;
  transform: scale(1.03);
}

.iframe-play-btn {
  position: relative;
  z-index: 11;
  font-size: 24px;
  padding: 18px 50px;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   6. CONTENT TYPOGRAPHY (SEO Formatting)
   ========================================================================== */
.seo-article {
  background: var(--surface-color);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.seo-article h2 {
  font-size: 28px;
  color: var(--primary-color);
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

.seo-article h3 {
  font-size: 22px;
  color: var(--text-main);
  margin: 30px 0 15px;
}

.seo-article p {
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
}

.seo-article ul {
  margin-bottom: 20px;
  padding-left: 20px;
  color: var(--text-muted);
}

.seo-article li {
  margin-bottom: 10px;
}

/* Grid Cards for content */
.games-grid-seo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.game-card {
  background: rgba(42, 0, 26, 0.6); /* Полупрозрачный темный фон */
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 25px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  border-top: 3px solid var(--accent-color);
}

.game-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.6), 0 0 15px rgba(255, 51, 153, 0.2);
}

.content-promo-btn {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 50px auto;
  padding: 18px 20px;
  background: linear-gradient(180deg, var(--primary-color) 0%, #cc9900 100%);
  color: #2a001a;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  border-radius: var(--btn-radius);
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid #fff5cc; 
  box-shadow: 0 6px 0 #806000, 0 15px 25px rgba(0,0,0,0.5);
  transition: var(--transition);
}

.content-promo-btn:hover {
  background: linear-gradient(180deg, var(--primary-hover) 0%, #b38600 100%);
  transform: translateY(4px);
  box-shadow: 0 2px 0 #664d00, 0 5px 10px rgba(0,0,0,0.4);
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs {
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
}

.breadcrumbs ul {
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.breadcrumbs li:not(:last-child)::after {
  content: '›';
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--primary-color);
  text-transform: uppercase;
}

.breadcrumbs a:hover {
  color: var(--accent-hover);
}

.breadcrumbs span {
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer {
  background: var(--surface-color);
  border-top: 3px solid var(--surface-border);
  padding: 50px 0 20px;
  margin-top: 60px;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 18px;
  text-transform: uppercase;
}

.footer-links ul {
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  display: block;
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: var(--accent-hover);
}

.footer-disclaimer {
  text-align: center;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
  padding-top: 30px;
  color: var(--text-muted);
  opacity: 0.8;
  font-size: 13px;
}

/* ==========================================================================
   8. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .desktop-only {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .header-actions {
    display: none;
  }
  
  .iframe-container {
    height: 600px; /* Фиксированная высота для мобильных устройств */
    max-width: 100%;
  }
  .seo-article {
    padding: 25px 15px;
  }
}

/* ==========================================================================
   9. BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(180deg, var(--primary-color) 0%, #cc9900 100%);
  color: #2a001a;
  border: 1px solid #fff5cc;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5), 0 0 10px rgba(255, 215, 0, 0.4);
  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: linear-gradient(180deg, var(--primary-hover) 0%, #b38600 100%);
  transform: translateY(-5px);
}

/* ==========================================================================
   10. 404 ERROR PAGE
   ========================================================================== */
.error-section {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--surface-color) 0%, #2a001a 100%);
  border-radius: var(--border-radius);
  border: 2px solid var(--surface-border);
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
  max-width: 800px;
  margin: 60px auto;
}

.error-section h1 {
  font-size: 120px;
  line-height: 1;
  color: var(--primary-color);
  text-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
  margin-bottom: 20px;
}

.error-section h2 {
  font-size: 32px;
  color: var(--text-main);
  margin-bottom: 20px;
}

.error-section p {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* ==========================================================================
   TABLES — Casino Magenta & Gold Theme
   ========================================================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 30px 0;
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--border-radius);
  background: rgba(42, 0, 26, 0.4);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);

  /* Более приятный скролл на мобильных */
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) #2a001a;
}

/* WebKit scrollbar */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #2a001a;
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}


/* Таблица */
.seo-table {
  width: 100%;
  min-width: 700px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.5;
}


/* Заголовок */
.seo-table thead th {
  background: linear-gradient(
    135deg,
    #6f0c49 0%,
    #4a0033 100%
  );

  color: var(--primary-color);
  font-weight: 800;
  text-align: left;
  padding: 16px 18px;

  border-bottom: 2px solid var(--primary-color);
  border-right: 1px solid rgba(255, 215, 0, 0.2);

  white-space: nowrap;
}

.seo-table thead th:last-child {
  border-right: none;
}


/* Ячейки */
.seo-table tbody td {
  padding: 15px 18px;

  background: rgba(42, 0, 26, 0.75);
  color: var(--text-muted);

  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  border-right: 1px solid rgba(255, 215, 0, 0.1);

  vertical-align: middle;
}

.seo-table tbody td:last-child {
  border-right: none;
}


/* Чередование строк */
.seo-table tbody tr:nth-child(even) td {
  background: rgba(94, 11, 62, 0.55);
}


/* Hover строки */
.seo-table tbody tr:hover td {
  background: rgba(255, 51, 153, 0.08);
  color: var(--text-main);
}


/* Последняя строка без нижней границы */
.seo-table tbody tr:last-child td {
  border-bottom: none;
}


/* Ссылки внутри таблицы */
.seo-table a {
  color: var(--accent-color);
  font-weight: 700;
}

.seo-table a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}


/* Выделенный текст */
.seo-table strong {
  color: var(--text-main);
  font-weight: 700;
}


/* Первый столбец — немного более заметный */
.seo-table tbody td:first-child {
  color: var(--text-main);
  font-weight: 600;
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 768px) {

  .table-responsive {
    margin: 25px 0;
    border-radius: 10px;

    /* Чтобы таблица не вылезала за границы статьи */
    max-width: 100%;
  }

  .seo-table {
    min-width: 650px;
    font-size: 14px;
  }

  .seo-table thead th {
    padding: 13px 15px;
    font-size: 14px;
  }

  .seo-table tbody td {
    padding: 13px 15px;
  }
}


/* Маленькие смартфоны */
@media (max-width: 480px) {

  .table-responsive {
    margin-left: -2px;
    margin-right: -2px;
  }

  .seo-table {
    min-width: 620px;
    font-size: 13px;
  }

  .seo-table thead th {
    padding: 12px 14px;
  }

  .seo-table tbody td {
    padding: 12px 14px;
  }

  .table-responsive::-webkit-scrollbar {
    height: 6px;
  }
}