    .gallery {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    .gallery img {
        width: 180px; /* Устанавливаем максимальную ширину */
        height: 180px; /* Устанавливаем фиксированную высоту */
        object-fit: cover; /*  Обрезает изображение, чтобы заполнить заданные размеры, сохраняя пропорции */
        display: block;
    }
    .pagination {
        margin-top: 20px;
    }
    .pagination a {
        margin: 0 5px;
        text-decoration: none;
        padding: 5px 10px;
        border: 1px solid #ccc;
        color: #333;
    }
    .pagination a.active {
        background-color: #333;
        color: #fff;
    }
	/* Оверлей для модального окна */
/* Оверлей для модального окна */
/* Оверлей для модального окна */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  display: flex;
  align-items: center; /* Центрирование по вертикали */
  justify-content: center; /* Центрирование по горизонтали */
  z-index: 9999;
  cursor: pointer;
  overflow: auto; /* Для прокрутки при больших изображениях */
}

/* Контейнер для изображения */
.modal-content {
  position: relative;
  display: inline-block;
  max-width: 25%;
  max-height: 20%;
  background: transparent;
  padding: 10px;
}

/* Изображение в модальном окне */
#modalImage {
  display: block;
  border-radius: 8px;
  object-fit: contain; /* сохраняет пропорции */
}
/* Кнопка закрытия */
.close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #fff;
  color: #000;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50%;
  padding: 4px 10px;
  cursor: pointer;
  z-index: 10000;
}

/* Styles for download and copy buttons */
.image-actions {
    display: flex;
    justify-content: center; /* Center buttons horizontally */
    margin-top: 5px;
}

.image-actions button {
    background-color: #0d6efd; /* Bootstrap primary color */
    color: white;
    border: none;
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-actions button svg {
    margin-right: 5px; /* Add some space between icon and text */
}

.image-actions button:hover {
    opacity: 0.8;
}

/* Стили для контейнера изображения с кнопкой воспроизведения */
.image-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.7); /* Полупрозрачный белый */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    z-index: 10;
    cursor: pointer;
}

.play-button:hover {
    opacity: 1;
}

.play-button::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 18px solid #333; /* Темный треугольник */
    margin-left: 4px;
}
/* Стили для модального окна подтверждения возраста */
.age-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); /* Затемнение 90% */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000; /* Очень высокий z-index чтобы быть поверх всего */
}

.age-modal-content {
  background: white;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.age-modal-content h3 {
  margin-bottom: 15px;
  color: #333;
}

.age-modal-content p {
  margin-bottom: 10px;
  color: #666;
}

.age-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.age-buttons button {
  padding: 12px 20px;
  font-size: 1.1rem;
}

/* Блокировка прокрутки когда модальное окно открыто */
body.modal-open {
  overflow: hidden;
}