/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
  /* Палитра "Изумруд и Золото" */
  --bg-color: #022c22; /* Очень глубокий темно-зеленый (почти черный) */
  --surface-color: #064e3b; /* Изумрудный цвет для карточек и шапки */
  --surface-border: #ca8a04; /* Золото/бронза для тонких линий */
  
  --primary-color: #eab308; /* Яркое золото для кнопок и ссылок */
  --primary-hover: #ca8a04;
  
  --accent-color: #fde047; /* Светлое, светящееся золото для заголовков */
  --accent-hover: #fef08a;
  
  --danger-color: #dc2626; /* Классический красный для кнопок Play for Money */
  --danger-hover: #b91c1c;
  
  --text-main: #f8fafc; /* Кристально белый для контраста */
  --text-muted: #a7f3d0; /* Мягкий мятный/светло-зеленый для второстепенного текста */
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

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: 2px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 15px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

.main-nav a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-nav a:hover, .main-nav a.active {
  color: var(--accent-color);
  text-shadow: 0 0 8px rgba(253, 224, 71, 0.4);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
}

.btn-play {
  background-color: var(--danger-color);
  color: #fff;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.btn-play:hover {
  background-color: var(--danger-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
}

.btn-demo {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-demo:hover {
  background-color: var(--primary-color);
  color: #000;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--accent-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: 2px 0 15px rgba(0,0,0,0.9);
  border-right: 2px 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: 1px solid rgba(202, 138, 4, 0.3);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.close-menu {
  background: none;
  border: none;
  color: var(--accent-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: 600;
  border-bottom: 1px solid rgba(202, 138, 4, 0.2);
  text-transform: uppercase;
}

.mobile-nav a.active {
  color: var(--accent-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(0,0,0,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: 50px;
  background: linear-gradient(135deg, var(--surface-color) 0%, #033527 100%);
  border-radius: var(--border-radius);
  padding: 40px 30px;
  border: 1px solid var(--surface-border);
  box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.hero-content h1 {
  font-size: 42px;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--accent-color);
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.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 30px rgba(234, 179, 8, 0.2);
  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: 1px solid var(--surface-border);
  margin-bottom: 50px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.demo-game-wrapper h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.iframe-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--surface-border);
  box-shadow: 0 0 25px rgba(202, 138, 4, 0.2);
}

.iframe-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111;
  z-index: 10;
  cursor: pointer;
}

.iframe-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  transition: var(--transition);
}

.iframe-overlay:hover .iframe-cover {
  opacity: 0.2;
}

.iframe-play-btn {
  position: relative;
  z-index: 11;
  font-size: 22px;
  padding: 18px 40px;
  text-transform: uppercase;
  pointer-events: none;
  background-color: var(--primary-color);
  color: #000;
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.5);
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   6. CONTENT TYPOGRAPHY (SEO Formatting)
   ========================================================================== */
.seo-article h2 {
  font-size: 28px;
  color: var(--accent-color);
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(202, 138, 4, 0.3);
}

.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;
}

.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: var(--bg-color);
  border: 1px solid rgba(202, 138, 4, 0.2);
  padding: 25px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.game-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5), 0 0 15px rgba(234, 179, 8, 0.1);
}

.content-promo-btn {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 40px auto;
  padding: 18px;
  background: var(--danger-color);
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  box-shadow: 0 5px 20px rgba(220, 38, 38, 0.4);
}

.content-promo-btn:hover {
  background: var(--danger-hover);
  color: #fff;
  transform: scale(1.02);
}

/* ==========================================================================
   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: 2px solid var(--surface-border);
  padding: 50px 0 20px;
  margin-top: 50px;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: var(--accent-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(--primary-color);
}

.footer-disclaimer {
  text-align: center;
  border-top: 1px solid rgba(202, 138, 4, 0.3);
  padding-top: 30px;
  color: #6ee7b7;
  opacity: 0.7;
  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 {
    aspect-ratio: 9 / 16;
    max-width: 400px;
  }
}

/* ==========================================================================
   9. BACK TO TOP BUTTON
   ========================================================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: #000;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5), 0 0 10px rgba(234, 179, 8, 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-color: var(--accent-hover);
  transform: translateY(-5px);
}

/* ==========================================================================
   10. 404 ERROR PAGE
   ========================================================================== */
.error-section {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--surface-color) 0%, #033527 100%);
  border-radius: var(--border-radius);
  border: 1px 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 15px rgba(234, 179, 8, 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;
}