/* Общие стили */

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #1a1a1a; /* Темный, но не черный фон */
  color: #ffffff;
}

a {
  color: #4CAF50;
  text-decoration: none;
}

/* Стили для всплывающей формы входа */
.modal {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #1a1a1a;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  border-radius: 5px;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.modal-content h2 {
  margin-bottom: 36px;
}

.modal.show .modal-content {
  transform: translate(-50%, -50%);
  animation: modalFadeIn 0.3s ease;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: white;
  text-decoration: none;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.btn {
  width: 100%;
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.btn:hover {
  background-color: #0056b3;
}

.auth-links {
  text-align: center;
  margin-top: 15px;
}

.auth-links a {
  color: #4CAF50;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: white;
  text-decoration: none;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.btn {
  width: 100%;
  padding: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.btn:hover {
  background-color: #0056b3;
}

.auth-links {
  text-align: center;
  margin-top: 15px;
}

.auth-links a {
  color: #4CAF50;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}


/* Шапка сайта */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  height: 100px;
}

.header-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-image img {
  height: 100px;
  width: auto;
  margin: 0 1rem 1rem 0;
  object-fit: cover;
  max-width: 100%;
}

.site-title {
  flex-grow: 1;
}

.main-menu ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu li {
  margin: 0 1rem;
}

.current_item {
  color: #4CAF50 !important;
  text-decoration: underline !important;
}

.main-menu a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.main-menu a:hover {
  color: #4CAF50;
}

/* Стили для меню под шапкой */
.main-menu {
  background-color: #333333;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-menu ul {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu li {
  margin: 0 1rem;
}

.main-menu a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.main-menu a:hover {
  color: #4CAF50;
  background-color: rgba(255,255,255,0.1);
}

/* Стили для кнопки гамбургера */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  position: relative;
  transition: background-color 0.3s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 3px;
  background-color: #ffffff;
  left: 0;
  transition: transform 0.3s;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

.menu-toggle.active .hamburger {
  background-color: transparent;
}

.menu-toggle.active .hamburger::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .hamburger::after {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Боковое меню для мобильных */
@media screen and (max-width: 768px) {
  .main-menu {
    position: relative;
    padding: 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .menu-toggle {
    display: block;
  }

  .menu-list {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: #333333;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 80px;
    transition: left 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    margin: 0;
    list-style: none;
    overflow-y: auto;
  }

  .menu-list.active {
    left: 0;
  }

  .main-menu ul.menu-list {
    display: flex;
  }

  .main-menu li {
    margin: 0;
    width: 100%;
    text-align: center;
  }

  .main-menu a {
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #444;
  }

  .main-menu a:hover {
    background-color: rgba(255,255,255,0.1);
  }

  /* Затемнение фона при открытом меню */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
  }

  .menu-overlay.active {
    display: block;
  }
  
  /* Стили для кнопки выхода на мобильных устройствах */
  #logoutBtn {
    font-size: 0.8rem;
    padding: 0.2rem 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    white-space: nowrap;
  }
  
  #logoutBtn::before {
    margin-right: 0.2rem;
    font-size: 0.7rem;
  }
}


.user-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}
  
  @media screen and (max-width: 480px) {
    .user-block {
      gap: 0.5rem;
    }
  }

.user-block button {
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 0.5rem 1rem;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
  margin: 0.2rem;
  cursor: pointer;
  border-radius: 4px;
}

.user-block button:hover {
  background-color: #45a049;
}

/* Основное содержимое */
.main-content {
  padding: 2rem;
  min-height: calc(100vh - 332px);
  max-width: 1200px;
  margin: 0 auto;
}

.download{
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; 
  margin: 10px; 
}

.download p {
  margin-bottom: 0;
  text-align: center;
}

.download a img {
  width: 200px;
  height: auto;
  margin-top: 20px;
}

.content-block {
  display: flex;
  width: 100%;
  height: auto;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 2rem 0;
}

/* Стили для всплывающей подсказки статистики посетителей */
.visitor-stats-tooltip {
  background-color: #333333;
  border: 1px solid #4CAF50;
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  max-width: 300px;
  font-size: 14px;
}

.visitor-stats-tooltip .tooltip-header {
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #4CAF50;
}

.tooltip-content table th {
  font-weight: 100;
  text-align: left;
}

.tooltip-content table strong {
  font-weight: 600;
}

.visitor-stats-tooltip .tooltip-content p {
  margin: 5px 0;
}

/* Стили для элемента с количеством посетителей */
#visitorCount {
  cursor: pointer;
  text-decoration: underline;
}


.image-block {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  width: 250px;
}

.image-block img {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.image-block img:hover {
  transform: scale(1.2);
}

.description-block {
  flex: 1;
  height: auto;
  padding: 2rem;
  box-sizing: border-box;
}

.content-block {
  display: flex;
  width: 100%;
  height: auto;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 2rem 0;
}

/* Подвал сайта */
.footer {
  background-color: #333333;
  color: #ffffff;
  text-align: center;
  padding: 0.5rem;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  min-height: 60px;
  align-items: center;
}

.btn:disabled {
  background-color: #888;
}

.footer-section {
  margin: 0.5rem;
}

.footer-section a {
  color: #4CAF50;
  text-decoration: none;
  white-space: nowrap;
}

.footer-section a:hover {
  text-decoration: underline;
}

/* Анимирование iput */
.group {
  position: relative;
  margin-bottom: 30px;
}

input[type="checkbox"] {
  width: auto;
  display: inline-block;
  margin-right: 10px;
  accent-color: #4CAF50;
}

/* input[type="checkbox"] */

.group label[for="privacy_policy"] {
  display: inline-block;
  width: calc(100% - 30px);
  vertical-align: top;
  margin-top: 0;
  font-size: 14px;
  line-height: 1.3;
}

input {
  font-size: 16px;
  padding: 10px;
  display: block;
  width: 100%;
  max-width: 380px;
  border: none;
  border-bottom: 1px solid #4CAF50;
}

input:focus {
  outline: none;
}

label {
  color: #999;
  font-size: 18px;
  position: absolute;
  pointer-events: none;
  left: 10px;
  top: 15px;
  transition: 0.2s ease all;
  -moz-transition: 0.2s ease all;
  -webkit-transition: 0.2s ease all;
}

input:focus ~ label,
input:valid ~ label {
  top: -20px;
  font-size: 14px;
  color:#4CAF50
}

.bar {
  position: relative;
  display: block;
  width: 100%;
  max-width: 320px;
}

.bar::before,
.bar::after {
  content: '';
  height: 2px;
  width: 0;
  bottom: 0;
  position: absolute;
  background: #4CAF50;
  transition: 0.2s ease all;
  -moz-transition: 0.2s ease all;
  -webkit-transition: 0.2s ease all;
}

.bar::before {
  left: 50%;
}

.bar::after {
  right: 50%;
}

input:focus ~ .bar::before,
input:focus ~ .bar::after {
  width: 50%;
}

/* Адаптивность */
@media screen and (max-width: 768px) {
  .header {
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
    text-align: center;
    justify-content: space-between;
  }
  
  
  .header-image {
    order: 2;
    display: none;
  }
  
  .site-title {
    order: 3;
    width: 100%;
  }
  
  .user-block {
    order: 4;
  }
  
  
  .user-block {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .footer {
    flex-direction: column;
    padding: 0.1rem;
    min-height: 30px;
  }
  
  .footer-section {
    margin: 0.1rem;
  }
  
  .footer-section a,
  .footer-section p {
    font-size: 0.8rem;
    padding: 0.1rem 0.2rem;
    margin: 0;
  }
  
  .content-block {
    flex-direction: column;
    height: auto;
    min-height: 400px;
  }
  
  .image-block {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 60px;
  }
  
  .description-block {
    width: 100%;
    height: auto;
    min-height: 300px;
  }
}

@media screen and (max-width: 920px) {
  .header {
    padding: 0.5rem;
  }
  
  
  .user-block button {
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
    margin: 0.1rem;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .slide {
    padding: 1rem;
  }

}

@media screen and (max-width: 480px) {
  .header {
    padding: 0.25rem;
  }
  
  
  .user-block button {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    margin: 0.05rem;
  }
  
  .main-content {
    padding: 0.5rem;
  }
  
  .slide {
    padding: 0.5rem;
  }
  
  .content-block {
    min-height: 300px;
  }
  
  .image-block {
    min-height: 50px;
  }
  
  .description-block {
    min-height: 250px;
  }
  
  input {
    font-size: 14px;
    padding: 8px;
  }
  
  label {
    font-size: 16px;
    top: 12px;
  }
  
  input:focus ~ label,
  input:valid ~ label {
    top: -16px;
    font-size: 12px;
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -30%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Стили для кнопок копирования контактов */
.copy-btn {
  background: none;
  border: 1px solid #4CAF50;
  color: #4CAF50;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-left: 10px;
  vertical-align: middle;
}

.copy-btn:hover {
  background-color: rgba(76, 175, 80, 0.1);
 
}

.copy-btn:focus {
  outline: none;
}

/* Выравнивание контактов по вертикали */
.description-block p {
  /* display: flex; */
  align-items: center;
  margin: 10px 0;
}

.description-block span {
  line-height: 1.5;
}

.wait_box {
  background-color: #1a1a1ab6;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.button_box {
  display: flex;
  flex-direction: row;
}

.button_box .btn {
  margin-left: 10px;
  margin-right: 10px;
}

/* #region INPUT FILE */

.groupfile {
  margin-bottom: 26px;
}

.caption_group {
  font-weight: 400;
  color: #4CAF50;
  margin-left: 10px;
  font-size: 14px;
}

input[type=file] {
  width: 100%;
  max-width: 380px;
  color: #727272;
  padding: 6px 10px;
  background: white;
  border-radius: 0px;
  border-bottom: 1px solid #4CAF50;
  font-weight: 100;
  font-size: 16px;
}

input[type=file]::file-selector-button {
  margin-right: 20px;
  border: none;
  background: #4CAF50;
  padding: 6px 10px;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
}

input[type=file]::file-selector-button:hover {
   background-color: #207923;
}

/* #endregion INPUT FILE */

/* #region login */

login {
  text-decoration: underline;
  cursor: pointer;
}

login:hover {
  color: #4CAF50;
}

/* #endregion login */

/* Стили для всплывающей подсказки пользователя */
.user-tooltip {
  background-color: #333333;
  border: 1px solid #4CAF50;
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  max-width: 300px;
  font-size: 14px;
}

.tooltip-header {
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #4CAF50;
}

.tooltip-content p {
  margin: 5px 0;
}
/* Стили для счетчика скачиваний */
.download-count {
    margin-top: 10px;
    font-weight: 100;
    color: #4CAF50;
    font-size: 16px;
}

/* Стили для элемента с количеством посетителей */
#visitorCount {
  cursor: pointer;
  text-decoration: underline;
}

#visitorCountSection {
  cursor: pointer;
  text-decoration: underline;
}

/* Стили для скриншотов с оторванными краями */
.screenshots {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  justify-content: center;
}

.screenshot {
  max-width: 350px;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.from-heigt{
  height: 350px;
  width: auto;
} 

.screenshot:hover {
  transform: scale(1.1);
}

.torn-edge {
  position: relative;
  box-shadow: 10px 10px 0 0 rgba(0, 0, 0, 0.2);
  border: none;
}

.torn-edge::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  background:
    linear-gradient(135deg, transparent 15px, rgba(0, 0, 0, 0.2) 15px),
    linear-gradient(-135deg, transparent 15px, rgba(0, 0, 0, 0.2) 15px);
  background-size: 20px 20px;
  background-repeat: repeat-x;
  background-position: bottom;
  z-index: -1;
}

/* Адаптивность для скриншотов */
@media screen and (max-width: 768px) {
  .screenshots {
    flex-direction: column;
    align-items: center;
  }
  
  .screenshot {
    max-width: 90%;
  }
}

/* Модальное окно для полноэкранного просмотра */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-content-fullscreen {
  max-width: 90%;
  max-height: 90%;
}

.modal-content-fullscreen img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 2px solid white;
}

/* Стили для кнопки прокрутки вверх */
#scrollToTopBtn {
  position: fixed; /* Фиксированная позиция */
  bottom: 20px; /* Расстояние от нижнего края */
  right: 30px; /* Расстояние от правого края */
  z-index: 99; /* Поверх других элементов */
  border: none; /* Без рамки */
  outline: none; /* Без контура */
  background-color: #4CAF50; /* Зеленый цвет фона */
  color: white; /* Белый цвет текста */
  cursor: pointer; /* Курсор в виде указателя */
  padding: 15px; /* Внутренние отступы */
  border-radius: 50%; /* Круглая форма */
  font-size: 18px; /* Размер шрифта */
  width: 50px; /* Ширина */
  height: 50px; /* Высота */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Тень для эффекта приподнятости */
}

#scrollToTopBtn:hover {
  background-color: #45a049; /* Цвет при наведении */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); /* Более выраженная тень при наведении */
}