/* ==========================================================================
   1. VARIABLES & RESET (Gates of Olympus Super Scatter Theme)
   ========================================================================== */
:root {
  /* Палитра "Olympus Heavens" */
  --bg-color: #fde68a;
  /* Светло-золотистый базовый */
  --bg-gradient: linear-gradient(135deg, #fef3c7 0%, #bae6fd 50%, #e0e7ff 100%);
  /* Небесные облака с золотом */

  --surface-color: #ffffff;
  /* Белые карточки для чистоты и контраста */
  --surface-border: #fcd34d;
  /* Золотистая кайма для карточек */

  --header-bg: #4c0519;
  /* Глубокий бордовый (как фон барабанов) */

  --primary-color: #fbbf24;
  /* Античное золото для главных кнопок */
  --primary-hover: #f59e0b;
  /* Темное золото для ховера */

  --accent-color: #8b5cf6;
  /* Электрический фиолетовый (цвет молний) */
  --accent-hover: #7c3aed;

  --danger-color: #dc2626;
  /* Рубиново-красный */

  --text-main: #1e1b4b;
  /* Темный индиго для заголовков (солидно и читаемо) */
  --text-muted: #475569;
  /* Мягкий серый для текста */
  --text-light: #fdf8f6;
  /* Бело-кремовый для шапки и футера */

  --font-family: 'Inter', '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);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--accent-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(--header-bg);
  border-bottom: 3px solid var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(251, 191, 36, 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 5px rgba(251, 191, 36, 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);
}

/* Кнопка "Play" (Золотая) */
.btn-play {
  background: linear-gradient(180deg, var(--primary-color) 0%, #d97706 100%);
  color: #111;
  box-shadow: 0 4px 0 #92400e, 0 5px 15px rgba(251, 191, 36, 0.4);
  border: 1px solid #fef3c7;
}

.btn-play:hover {
  background: linear-gradient(180deg, var(--primary-hover) 0%, #b45309 100%);
  transform: translateY(2px);
  box-shadow: 0 2px 0 #78350f, 0 3px 6px rgba(251, 191, 36, 0.3);
}

/* Демо кнопка (Фиолетовая/Молния) */
.btn-demo {
  background: linear-gradient(180deg, var(--accent-color) 0%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 4px 0 #4c1d95, 0 5px 10px rgba(139, 92, 246, 0.3);
  border: 1px solid #ddd6fe;
}

.btn-demo:hover {
  background: linear-gradient(180deg, var(--accent-hover) 0%, #5b21b6 100%);
  color: #fff;
  transform: translateY(2px);
  box-shadow: 0 2px 0 #4c1d95;
}

.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.3);
  border-right: 3px solid var(--primary-color);
  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 var(--surface-border);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.close-menu {
  background: none;
  border: none;
  color: var(--header-bg);
  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 #e2e8f0;
  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(30, 27, 75, 0.8);
  /* Темно-синий/индиго оверлей */
  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: var(--surface-color);
  border-radius: var(--border-radius);
  padding: 40px 30px;
  border: 2px solid var(--surface-border);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), inset 0 0 40px rgba(251, 191, 36, 0.1);
}

.hero-content h1 {
  font-size: 42px;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--header-bg);
  font-weight: 900;
}

.hero-content h1 span {
  color: var(--primary-hover);
}

.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 30px rgba(76, 5, 25, 0.3), 0 0 20px rgba(251, 191, 36, 0.4);
  border: 3px solid var(--primary-color);
}

/* ==========================================================================
   5. DEMO GAME WRAPPER & LAZY LOAD
   ========================================================================== */
.demo-game-wrapper {
  background: linear-gradient(180deg, #4c0519 0%, #1e1b4b 100%);
  padding: 20px;
  border-radius: var(--border-radius);
  border: 2px solid var(--primary-color);
  margin-bottom: 60px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 0 30px rgba(251, 191, 36, 0.15);
}

.demo-game-wrapper h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px 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(--primary-color);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.5) inset;
}

.iframe-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(30, 27, 75, 0.7);
  z-index: 10;
  cursor: pointer;
}

.iframe-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  opacity: 0.6;
}

.iframe-overlay:hover .iframe-cover {
  transform: scale(1.05);
  opacity: 0.4;
}

.iframe-play-btn {
  position: relative;
  z-index: 11;
  font-size: 24px;
  padding: 18px 50px;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.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.05);
  border: 1px solid var(--surface-border);
}

.seo-article h2 {
  font-size: 28px;
  color: var(--header-bg);
  margin: 40px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-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: #fafaf9;
  /* Теплый серый/жемчужный */
  border: 1px solid var(--surface-border);
  padding: 25px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border-top: 4px solid var(--accent-color);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 0 15px rgba(251, 191, 36, 0.2);
  border-top-color: var(--primary-color);
}

.content-promo-btn {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 50px auto;
  padding: 18px 20px;
  background: linear-gradient(180deg, var(--primary-color) 0%, #d97706 100%);
  color: #111;
  text-align: center;
  font-size: 20px;
  font-weight: 900;
  border-radius: var(--btn-radius);
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid #fef3c7;
  box-shadow: 0 6px 0 #92400e, 0 15px 25px rgba(251, 191, 36, 0.4);
  transition: var(--transition);
}

.content-promo-btn:hover {
  background: linear-gradient(180deg, var(--primary-hover) 0%, #b45309 100%);
  transform: translateY(4px);
  box-shadow: 0 2px 0 #78350f, 0 5px 10px rgba(251, 191, 36, 0.3);
}

/* ==========================================================================
   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(--accent-color);
}

.breadcrumbs span {
  color: var(--text-muted);
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer {
  background: var(--header-bg);
  border-top: 4px solid var(--primary-color);
  padding: 50px 0 20px;
  margin-top: 60px;
  color: var(--text-light);
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

.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: #cbd5e1;
  display: block;
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-disclaimer {
  text-align: center;
  border-top: 1px solid rgba(251, 191, 36, 0.2);
  padding-top: 30px;
  color: #94a3b8;
  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%, #d97706 100%);
  color: #111;
  border: 1px solid #fef3c7;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(251, 191, 36, 0.3);
  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%, #b45309 100%);
  transform: translateY(-5px);
}

/* ==========================================================================
   10. 404 ERROR PAGE
   ========================================================================== */
.error-section {
  text-align: center;
  padding: 80px 20px;
  background: var(--surface-color);
  border-radius: var(--border-radius);
  border: 2px solid var(--surface-border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  max-width: 800px;
  margin: 60px auto;
}

.error-section h1 {
  font-size: 120px;
  line-height: 1;
  color: var(--header-bg);
  margin-bottom: 20px;
  text-shadow: 4px 4px 0px rgba(251, 191, 36, 0.3);
}

.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;
}

.table {
  width: 100%;
  margin: 30px 0;
  border-radius: var(--border-radius, 12px);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #fca5a5;
}

.table table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  font-family: var(--font-family, sans-serif);
  text-align: left;
}

.table thead tr {
  background-color: #991b1b;
  color: #ffffff;
}

.table th {
  padding: 14px 20px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.table td {
  padding: 14px 20px;
  color: var(--text-main, #1e1b4b);
  font-size: 15px;
  border-bottom: 1px solid #fee2e2;
}

.table tbody tr:nth-of-type(even) {
  background-color: #fff5f5;
}

.table tbody tr td:first-child {
  font-weight: 600;
  color: #7f1d1d;
  width: 35%;
}

.table tbody tr:hover {
  background-color: #fecaca;
  transition: background-color 0.2s ease;
}

@media (max-width: 768px) {
  .table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
  }

  .table table {
    min-width: 500px;
  }

  .table::-webkit-scrollbar {
    height: 5px;
  }

  .table::-webkit-scrollbar-track {
    background: #f1f1f1;
  }

  .table::-webkit-scrollbar-thumb {
    background: #ef4444;
    border-radius: 10px;
  }

  .table::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
  }
}