body {
    margin: 0;
    font-family: Arial, sans-serif;
    padding: 0;
    background-image: url('src/SS_background.png'); /* Задаём фон */
    background-size: cover; /* Растянуть изображение на весь экран */
    background-position: center; /* Центрирование изображения */
    background-repeat: no-repeat; /* Отключаем повторение изображения */
    background-attachment: fixed; /* Фиксируем фон при прокрутке (опционально) */
}

.header {
    display: flex;
    justify-content: space-between; /* Логотип слева, кнопки справа */
    align-items: center;
    height: 125px;
    background-size: cover; /* Покрывает весь блок */
    /* background-position: center; /*Центрирует изображение */
    position: fixed; /* Закрепить панель вверху */
    background-color: #ffffff;
    background-image: var(--bg-image-panel);
    color: white;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 0 50px; /* Отступы слева и справа для всего header */
    transition: transform 0.4s ease;
}

/*.header.anim {
  transition: transform 0.4s ease;
}*/

.header.hidden {
  transform: translateY(-100%);
}

/* кнопка возврата меню */
.menu-toggle {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;

  padding: 14px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;

  color: white;
  background-color: #111;

  font-weight: bold;
  letter-spacing: 4px;
  text-transform: uppercase;

  font-family: Arial, sans-serif;
  font-size: 16px;

  overflow: hidden;
}

.menu-toggle::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;

  background: linear-gradient(45deg, #fca311, #ff2e63, #fca311);
  background-size: 400% 400%;
  border-radius: 999px;

  z-index: -1;
  filter: blur(4px);
  animation: gradient-glow 8s ease-in-out infinite;
}

.menu-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;

  background-color: #111;
  border-radius: 999px;

  z-index: -1;
}

.menu-toggle.hidden {
  display: none;
}

.block-text-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 15px;
  color: #ffffff;
  background-color: #472a0862; /* Цвет фона блока */
  
  /* Управление размером блока */
  width: 700px; /* Можно менять размер */
  height: 100px;
  border: 2px solid #0e012b36; /* Граница */
  border-radius: 10px; /* Скругление углов */
}

.footer {
  display: flex;
  justify-content: center; /* Элементы равномерно расположены */
  align-items: center;
  height: 125px;
  background-size: cover; /* Покрывает весь блок */
  background-color: #ffffff;
  background-image: var(--bg-image-panel);
  color: rgb(189, 189, 189);
  width: 100%;
  margin-top: auto; /* Автоматический отступ сверху, чтобы footer всегда оставался внизу */
}

.center-smth{
  display: flex;
  justify-content: center; /* Элементы равномерно расположены */
  align-items: center;
}

.center-all{
  display: flex;
  justify-content: center; /* Центр по горизонтали */
  align-items: center;     /* Центр по вертикали */
  height: 100vh;
}

.content {
    margin-top: calc( 125px ); /* 125px высота панели + 5px дополнительный отступ */
    padding: 20px; /* Дополнительный внутренний отступ, если нужно */
}

.logo {
    text-decoration: none;
    color: white;
    padding: 60px 225px; /* Отступы внутри кнопки */
    background-size: cover;
    background-position: center;
    background-image: var(--bg-image-logo);
}

.nav {
    display: flex;
    gap: 20px; /* Расстояние между кнопками */
    margin-right: 200px; /* Отступ справа для последней кнопки */
}

.glow-button {
  position: relative;
  display: inline-block;
  padding: 14px 30px;
  color: white;
  background-color: #111;
  border: none;
  border-radius: 999px;
  font-weight: bold;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-family: 'Arial', sans-serif;
  font-size: 16px;
  cursor: pointer;
  z-index: 1;
  overflow: hidden;
  text-decoration: none;
}

.glow-button::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #fca311, #ff2e63, #fca311);
  background-size: 400% 400%;
  border-radius: 999px;
  z-index: -1;
  filter: blur(4px);
  animation: gradient-glow 8s ease-in-out infinite;
}

.glow-button::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  background-color: #111;
  border-radius: 999px;
  z-index: -1;
}

@keyframes gradient-glow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


.centered {
    display: flex; /* Включаем Flexbox */
    justify-content: center; /* Горизонтальное выравнивание */
    flex-direction: column; /* Размещаем блоки в колонку */
    align-items: center; /* Вертикальное выравнивание */
    text-align: center; /* Центрируем текст внутри элементов */
    height: 100%; /* Задаём высоту контейнера (если нужно) */
}

.centered-text-block {
    display: flex; /* Включаем Flexbox */
    justify-content: center; /* Горизонтальное выравнивание */
    align-items: center; /* Вертикальное выравнивание */
    text-align: center; /* Центрируем текст внутри элементов */
    height: 100%; /* Задаём высоту контейнера (если нужно) */
    background-color: #cccccc00; /* Цвет фона блока */
    color: #2b2b2b01;
    width: 700px;
    border: 5px solid #99999900; /* Граница */
    border-radius: 10px; /* Скругление углов */
    margin-bottom: 20px; /* Отступ между заголовком и текстом */
}

.small-text {
    text-align: center; /* Центрируем текст внутри блока */
    margin: 0 auto 20px; /* Горизонтальное центрирование и отступ снизу */
    font-size: 30px; /* Размер шрифта */
    line-height: 1.2; /* Межстрочное расстояние */
    max-width: 800px; /* Ограничение ширины для читаемости */
    color: white;
}

.button-group {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  justify-content: center;
  align-items: center;
}

.game-panel {
  position: relative;
  width: 100%;
  height: 455px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  border-radius: 25px;
  border: 3px solid #cf721a;
  z-index: 1;
}

.video-panel {
  position: relative;
  width: 100%;
  height: 455px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(270deg, #4b2e00, #5a1123, #301e02); /* Плавный фиолетово-тёмный градиент */
  background-size: 600% 600%;
  animation: animatedGradient 10s ease-in-out infinite;
  overflow: hidden;
  z-index: 1;
}


/* Видео на заднем плане */
.video-bg {
  border-radius: 25px; /* Скругляем углы видео */
  border: 3px solid #cf721a;
  position: absolute;
  top: 50%; /* Сдвигаем видео на 50% по высоте */
  left: 50%; /* Сдвигаем видео на 50% по ширине */
  transform: translate(-50%, -50%); /* Центрируем видео */
  width: auto; /* Видео подстраивается по высоте/ширине */
  height: 100%; /* Занимает всю высоту панели */
  object-fit: cover; /* Обеспечивает заполнение панели, сохраняя пропорции */
  z-index: 1; /* Задний слой */
  opacity: 0.9;
}

.video-bg-not-supported {
  border-radius: 25px; /* Скругляем углы видео */
  border: 3px solid #5c0000;
  position: absolute;
  top: 50%; /* Сдвигаем видео на 50% по высоте */
  left: 50%; /* Сдвигаем видео на 50% по ширине */
  transform: translate(-50%, -50%); /* Центрируем видео */
  width: auto; /* Видео подстраивается по высоте/ширине */
  height: 100%; /* Занимает всю высоту панели */
  object-fit: cover; /* Обеспечивает заполнение панели, сохраняя пропорции */
  z-index: 1; /* Задний слой */
}
  
  /* Контейнер для текста и иконки */
  .overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 2; /* Располагает поверх видео */
    color: white; /* Цвет текста */
    background: rgba(0, 0, 0, 0.5); /* Полупрозрачный фон поверх видео (по желанию) */
  }
  
  /* Стиль для иконки игры */
  .game-icon {
    width: 100px; /* Задайте размер иконки */
    height: auto;
    margin-bottom: 10px; /* Отступ снизу */
    border-radius: 10px;
  }
  
  /* Стиль для названия игры */
  .game-title {
    font-size: 24px; /* Размер шрифта */
    margin: 5px 0; /* Отступы сверху и снизу */
  }
  
  /* Стиль для описания */
  .game-description {
    font-size: 16px;
    max-width: 80%; /* Ограничение ширины текста */
    line-height: 1.5; /* Междустрочный интервал */
  }

  .styled-line {
    border: 0; /* Убираем стандартную рамку */
    height: 5px; /* Толщина линии */
    width: 80%; /* Ширина линии */
    margin: 20px auto; /* Центрирование по горизонтали */
    border-radius: 5px; /* Скругление краёв */
  
    background: linear-gradient(45deg, #fca311, #ff2e63, #fca311);
    background-size: 400% 400%;
    animation: gradient-glow 8s ease-in-out infinite;
  }

.text-header{
    font-size: 25px;
    font-style: oblique;
    color: #ffffff;
}

::selection {
  background-color: black; /* Цвет фона выделения */
  color: white; /* Цвет текста при выделении */
}

.contact-variant-1 {
  border: 5px solid #960000;
  position: absolute;
  top: 50%; /* Сдвигаем видео на 50% по высоте */
  left: 20%; /* Сдвигаем видео на 50% по ширине */
  transform: translate(-50%, -50%); /* Центрируем видео */
  width: 350px; /* Видео подстраивается по высоте/ширине */
  height: 350px; /* Занимает всю высоту панели */
  object-fit: cover; /* Обеспечивает заполнение панели, сохраняя пропорции */
  z-index: 1; /* Задний слой */
}

.contact-variant-2 {
  border: 5px solid #ff0000;
  position: absolute;
  top: 50%; /* Сдвигаем видео на 50% по высоте */
  left: 50%; /* Сдвигаем видео на 50% по ширине */
  transform: translate(-50%, -50%); /* Центрируем видео */
  width: 350px; /* Видео подстраивается по высоте/ширине */
  height: 350px; /* Занимает всю высоту панели */
  object-fit: cover; /* Обеспечивает заполнение панели, сохраняя пропорции */
  z-index: 1; /* Задний слой */
}

.contact-variant-3 {
  border: 5px solid #00b7ff;
  position: absolute;
  top: 50%; /* Сдвигаем видео на 50% по высоте */
  left: 80%; /* Сдвигаем видео на 50% по ширине */
  transform: translate(-50%, -50%); /* Центрируем видео */
  width: 350px; /* Видео подстраивается по высоте/ширине */
  height: 350px; /* Занимает всю высоту панели */
  object-fit: cover; /* Обеспечивает заполнение панели, сохраняя пропорции */
  z-index: 1; /* Задний слой */
}

.contact-variant-4 {
  border: 5px solid #dd1717;
  position: absolute;
  top: 50%; /* Сдвигаем видео на 50% по высоте */
  left: 33%; /* Сдвигаем видео на 50% по ширине */
  transform: translate(-50%, -50%); /* Центрируем видео */
  width: 350px; /* Видео подстраивается по высоте/ширине */
  height: 350px; /* Занимает всю высоту панели */
  object-fit: cover; /* Обеспечивает заполнение панели, сохраняя пропорции */
  z-index: 1; /* Задний слой */
}

.contact-variant-5 {
  border: 5px solid #00b7ff;
  position: absolute;
  top: 50%; /* Сдвигаем видео на 50% по высоте */
  left: 66%;
  transform: translate(-50%, -50%); /* Центрируем видео */
  width: 350px; /* Видео подстраивается по высоте/ширине */
  height: 350px; /* Занимает всю высоту панели */
  object-fit: cover; /* Обеспечивает заполнение панели, сохраняя пропорции */
  z-index: 1; /* Задний слой */
}

/* Прелоадер */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('src/background.png') no-repeat center center / cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1; /* Изначально полностью видно */
  transition: opacity 1s ease; /* Плавное исчезновение */
}

.spinner {
  width: 100px;
  height: 100px;
  animation: spin 1s linear infinite;
}

/* Анимация вращения */
@keyframes spin {
  0% {
      transform: rotate(0deg);
  }
  100% {
      transform: rotate(360deg);
  }
}

@keyframes animatedGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.loading-text {
  position: absolute;
  bottom: 250px;
  text-align: center;
  font-size: 18px;
  color: #fff; /* Цвет текста для лучшей читаемости */
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.7); /* Лёгкая тень для контраста */
}

#preloader.hidden {
  opacity: 0; /* Полностью прозрачный */
  pointer-events: none; /* Блокируем взаимодействие */
}

#content {
  display: none;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
  max-width: 600px;
}

@media (max-width: 1024px) {

  .header {
    padding: 0 20px;
  }

  .nav {
    margin-right: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .logo {
    padding: 40px 120px;
  }

  .block-text-bottom {
    width: 90%;
    height: auto;
    padding: 10px;
  }

  .centered-text-block {
    width: 90%;
  }

  .game-panel {
    height: auto;
    min-height: 500px;
  }

  .button-grid {
    grid-template-columns: 1fr;
    max-width: 70%;
  }
}

@media (max-width: 768px) {

  /*body {
    background-attachment: scroll;
  }*/

  .header {
    flex-direction: column;
    height: auto;
    padding: 10px;
  }

  .logo {
    padding: 25px 80px;
  }

  .nav {
    flex-direction: column;
    gap: 8px;
    margin-right: 0;
  }

  .content {
    margin-top: 160px;
    padding: 10px;
  }

  .text-header {
    font-size: 18px;
  }

  .small-text {
    font-size: 18px;
  }

  .game-panel {
    height: auto;
    min-height: 500px;
  }

  .game-icon {
    width: 70px;
  }

  .game-title {
    font-size: 18px;
  }

  .game-description {
    font-size: 14px;
  }

  .styled-line {
    width: 95%;
  }

  /* убираем опасные absolute-блоки */
  .contact-variant-1,
  .contact-variant-2,
  .contact-variant-3,
  .contact-variant-4,
  .contact-variant-5 {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: auto;
    margin: 10px auto;
  }
}