/* ===== Глобальные стили ===== */
:root {
  --red-accent: rgba(255, 255, 255, 0.9);
  --red-dark: rgba(153, 153, 153, 0.9);
  --bg-dark: #111;
  --bg-darker: #222;
  --text-light: rgba(255, 255, 255, 0.6);
  --transition-slow: 0.8s cubic-bezier(0.33, 1, 0.68, 1);
  --transition-fast: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-family: 'Arial', sans-serif;
  background-color: var(--bg-dark);
  transition: background-color var(--transition-slow);
  overflow-x: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ===== Фон и оверлеи ===== */
.background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: -1;
}

.background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center,
      rgba(27, 27, 27, 0.3) 0%,
      rgba(26, 26, 26, 0.7) 100%);
  z-index: -1;
}

.background-visible {
  opacity: 1;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 99;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.overlay.active {
  opacity: 1;
}

/* ===== Логотип и загрузка ===== */
.logo-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  z-index: 1000;
  transition: all 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.logo-container {
  max-width: 100%;
  height: auto;
  transition: all 0.3s ease;
}

.logo-container img {
  width: 100%;
  height: auto;
  max-width: 200px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

.loading-bar {
  width: 300px;
  height: 5px;
  background: rgba(40, 50, 40, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red-accent), var(--red-dark));
  box-shadow: 0 0 8px rgb(255, 255, 255), 0 0 15px rgba(255, 255, 255, 0.7);
  transition: width 2s linear;
  animation: neon-flicker 2.5s infinite;
}

/* ===== Галерея изображений ===== */
.gallery-container {
  width: 100%;
  max-width: 1200px;
  padding: 200px;
}

.png-row {
  display: flex;
  gap: 110px;
  padding: 10px;
  margin-top: -150px;
  flex-wrap: wrap;
  justify-content: center;
}

.png-item {
  width: calc(33.333% - 10px);
  max-width: 200%;
  height: 400px; /* Увеличена высота с 200% на фиксированное значение */
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-radius: 15px;
}

.png-item.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.png-item img {
  width: 100%; /* Изменено с max-width на width для заполнения контейнера */
  height: 100%; /* Добавлено для заполнения высоты */
  object-fit: cover;
  transition: all 0.5s ease;
  filter: grayscale(30%) brightness(0.9);
}

.png-item:hover {
  z-index: 10;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.png-item:hover img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.05);
}

.png-item img.zoomed {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 100;
  width: auto; /* Изменено для сохранения пропорций */
  max-width: 80%; /* Увеличено для большего размера */
  max-height: 80%; /* Увеличено для большего размера */
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


/* ===== Кнопки и элементы управления ===== */
:root {
  --gallery-width: 500%;
  --gallery-max-width: 3000px;
  --gallery-padding: 100px;
  --item-width: calc(33.333% - 10px);
  --item-max-width: 100%;
  --item-height: 300px;
  --item-gap: 10px;
  --item-padding: 70px;
  --item-border-radius: 17px;
}

.gallery-container {
  width: var(--gallery-width);
  max-width: var(--gallery-max-width);
  padding: var(--gallery-padding);
  margin: 0 auto;
}

.png-row {
  display: flex;
  gap: var(--item-gap);
  padding: var(--item-padding);
  flex-wrap: wrap;
  justify-content: center;
}

.png-item {
  width: var(--item-width);
  max-width: var(--item-max-width);
  height: var(--item-height);
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-radius: var(--item-border-radius);
}


.png-item.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.png-item img {
  width: 100%;
  height: 100%;
  object-fit: 10;
  transition: all 0.5s ease;
  filter: grayscale(30%) brightness(0.9);
}

.png-item:hover {
  z-index: 10;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.png-item:hover img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.05);
}

.png-item img.zoomed {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 100;
  width: 50%;
  height: auto;
  max-height: 80vh;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  object-fit: contain;
}

/* ===== Текстовые стили ===== */
.disclaimer {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--text-light);
  font-size: 12px;
  z-index: 1001;
  opacity: 0;
  transition: opacity 1s ease;
  padding: 0 20px;
}


.disclaimer-visible {
  opacity: 1;
}

h2 {
  color: #ffffff;
  text-align: center;
  margin-bottom: 25px;
  font-size: 28px;
  animation: textGlow 2s infinite alternate;
}

p {
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 15px;
  padding-left: 20px;
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s ease;
}

p:before {
  content: "•";
  color: #ffffff;
  position: absolute;
  left: 0;
  font-size: 20px;
}




.buttons-container-2 {
  position: fixed;
  bottom: 76px;
  left: 0;
  width: 100%;
  text-align: center;
  color: var(--text-light);
  font-size: 17px;
  font-weight: bold;
  z-index: 1001;
  opacity: 0;
  padding: 0 16px;
  opacity: 100; /* Явно указываем видимость */
  transition: opacity 3s ease;
}


.disclaimer-visible-2 {
  opacity: 1;
}

h2 {
  color: #ffffff;
  text-align: center;
  margin-bottom: 25px;
  font-size: 28px;
  animation: textGlow 2s infinite alternate;
}

p {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 15px;
  padding-left: 20px;
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s ease;
}

p:before {
  content: "•";
  color: #ffffff;
  position: absolute;
  left: 0;
  font-size: 20px;
}


/* Стили для полноэкранного просмотра */
.fullscreen-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fullscreen-modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.fullscreen-img {
  max-width: 90%;
  max-height: 90%;
  border-end-end-radius: 17px;
  object-fit: contain;
  animation: zoomIn 0.3s ease;
}

.close-fullscreen {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.close-fullscreen:hover {
  color: #bbb;
  transform: scale(1.2);
}

/* кнопка */

        body {
            margin: 0;
            min-height: 100vh;
            position: relative;
        }

        .buttons-container {
            position: fixed;
            bottom: 50px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            grid-template-columns: repeat(2, auto);
            gap: 5px;
            padding: 10px;
            background: rgba(255,255,255,0.1);
            border-radius: 20px;
            backdrop-filter: blur(5px);
            width: min-content;
            box-sizing: border-box;
            opacity: 0; /* Начальная прозрачность */
            transition: opacity 0.5s ease-in-out; /* Плавное появление */
        }

        button {
            font-family: inherit;
            font-size: 20px;
            color: white;
            padding: 0.7em 1em;
            padding-left: 0.9em;
            display: flex;
            align-items: center;
            justify-content: center;
            border: none;
            border-radius: 16px;
            overflow: hidden;
            transition: all 0.2s;
            cursor: pointer;
            width: auto;
            min-width: 200px;
            position: relative;
            text-decoration: none;
        }

        /* Стили для разных кнопок */
        .button-1 { background: #1e90ff; }
        .button-12 { background: #ff4757; }
        .button-3 { background: #3a3a3a; }
        .button-4 { background: #2e63d5; }
        .button-5 { background: #a55eea; }

        button span {
            display: block;
            margin-left: 0.3em;
            transition: all 0.3s ease-in-out;
            position: relative;
            left: -5px
        }

        button svg {
            display: block;
            position: relative;
            transform-origin: center center;
            transition: transform 0.3s ease-in-out;
            width: 20px;
            height: 20px;
            fill: white;
        }

        button:hover .svg-wrapper {
            animation: fly-1 0.6s ease-in-out infinite alternate;
        }

        button:hover svg {
            transform: translateX(100%) rotate(0deg) scale(1.1);
            position: relative;
            left: 15px;

        }

        button:hover span {
            transform: translateX(50em);
            position: relative;
        }

        button:active {
            transform: scale(0.95);
        }

        @keyframes fly-1 {
            from { transform: translateY(0.1em); }
            to { transform: translateY(-0.1em); }
        }

        body.loaded .buttons-container {
    opacity: 1;
}

.button-link {
    /* ... другие стили ... */
    text-decoration: none; /* Это убирает подчеркивание */
    /* ... */
}

/* ===== Изображения в инструкции ===== */
.instruction-images {
  display: flex;
  justify-content: space-around;
  margin-top: 40px;
  gap: 20px;
  flex-wrap: wrap;
}

.instruction-images img {
  max-width: 30%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.5s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ===== Финальные состояния ===== */
.logo-corner {
  top: -60px;
  left: -100px;
  transform: translate(0, 0) scale(0.35);
  gap: 5px;
}

.logo-corner .loading-bar {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* ===== Анимации ===== */
@keyframes neon-flicker {

  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    box-shadow: 0 0 8px rgb(255, 255, 255), 0 0 15px rgba(255, 255, 255, 0.7);
  }

  20%,
  22%,
  24%,
  55% {
    box-shadow: 0 0 5px rgb(255, 255, 255), 0 0 10px rgba(255, 255, 255, 0.5);
  }
}

@keyframes textGlow {
  from {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  }

  to {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
  }
}

/* ===== Адаптивные стили ===== */
@media (max-width: 1200px) {

  .instruction-images img,
  .png-item {
    max-width: 45%;
  }
}

@media (max-width: 900px) {
  .instruction-images img {
    max-width: 100%;
    margin-bottom: 15px;
  }

  h2 {
    font-size: 24px;
  }

  p {
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .float-controls {
    flex-direction: column;
    right: 10px;
    top: 10px;
  }

  .logo-wrapper img {
    width: 156px;
  }

  .loading-bar {
    width: 200px;
  }

  .png-item {
    width: 100%;
    height: 300px;
  }
}





/* ===== Текст над кнопками ===== */
.buttons-text {
  position: fixed;
  bottom: 120px; /* Расстояние над кнопками */
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-light);
  text-align: center;
  font-size: 18px;
  max-width: 80%;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 100;
}

.buttons-text.visible {
  opacity: 1;
}

/* Для мобильных устройств */
@media (max-width: 600px) {
  .buttons-text {
    bottom: 100px;
    font-size: 14px;
    padding: 8px 15px;
    max-width: 90%;
  }
}

/* ===== Мобильная адаптация (до 600px) ===== */
@media (max-width: 600px) {
  :root {
    --gallery-padding: 10px;
    --item-width: calc(50% - 4px);
    --item-height: 180px;
    --item-gap: 8px;
  }

  /* Основные элементы */
  body {
    padding-top: 40px;
  }

  /* Логотип */
  .logo-corner {
    transform: scale(0.25);
    top: -59px;
    left: -73px;
  }

  /* Галерея */
  .gallery-container {
    padding: var(--gallery-padding);
    margin-top: -89px;
  }

  .png-row {
    padding: 5px;
    gap: var(--item-gap);
    margin-top: 0;
  }

  .png-item {
    width: var(--item-width);
    height: var(--item-height);
    margin-bottom: var(--item-gap);
    border-radius: 8px;
  }

  /* Кнопки */
  .buttons-container {
    bottom: 17px;
    padding: 4px;
    border-radius: 15px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 95%;
    max-width: 400px;
  }

  button {
    min-width: 120px;
    font-size: 14px;
    padding: 0.5em 0.7em;
    border-radius: 12px;
  }

  /* Текст над кнопками */
  .buttons-text {
    bottom: 100px;
    font-size: 14px;
    padding: 8px 15px;
    max-width: 90%;
  }

  .buttons-container-2 {
    bottom: 60px;
    font-size: 14px;
  }

  /* Полноэкранный просмотр */
  .fullscreen-img {
    max-width: 95%;
    max-height: 70%;
  }

  .close-fullscreen {
    top: 10px;
    right: 15px;
    font-size: 30px;
  }

  /* Disclaimer */
  .disclaimer {
    font-size: 10px;
    bottom: 5px;
    padding: 0 10px;
  }
}

/* ===== Очень маленькие экраны (до 400px) ===== */
@media (max-width: 400px) {
  :root {
    --item-width: 100%;
    --item-height: 160px;
  }

  .png-item {
    width: var(--item-width);
    height: var(--item-height);
  }

  button {
    min-width: 100px;
    font-size: 12px;
    padding: 0.4em 0.6em;
  }

  .buttons-text {
    font-size: 12px;
    bottom: 90px;
  }

  .buttons-container-2 {
    bottom: 50px;
    font-size: 12px;
  }
}


/* ===== Оптимизация текста для мобильных ===== */
@media (max-width: 600px) {
  /* Основные текстовые элементы */
  body {
    font-size: 14px;
    line-height: 1.4;
  }

  /* Заголовки */
  h2 {
    font-size: 13px;
    margin-bottom: 15px;
    animation: none; /* Убираем анимацию для производительности */
  }

  /* Основной текст */
  p {
    font-size: 12px;
    padding-left: 15px;
    margin-bottom: 10px;
    transform: none; /* Убираем трансформации для производительности */
  }

  p:before {
    font-size: 14px;
    top: 1px;
  }

  /* Текст над кнопками */
  .buttons-text {
    font-size: 12px;
    line-height: 1.3;
    bottom: 110px;
    padding: 6px 12px;
  }

  /* Disclaimer внизу экрана */
  .disclaimer {
    font-size: 9px;
    padding: 0 8px;
    line-height: 1.2;
  }

  /* Текст в контейнере кнопок */
  .buttons-container-2 {
    font-size: 11px;
    bottom: 70px;
    padding: 0 10px;
  }

  /* Кнопки */
  button {
    font-size: 12px;
  }

  button span {
    margin-left: 0.2em;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 400px) {
  body {
    font-size: 13px;
  }

  h2 {
    font-size: 16px;
  }

  p {
    font-size: 11px;
  }

  .buttons-text {
    font-size: 11px;
    bottom: 100px;
  }

  .disclaimer {
    font-size: 4px;
  }

  .buttons-container-2 {
    font-size: 10px;
  }
}