body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.casino-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 колонки */
    gap: 20px;
}

.casino-card {
    position: relative; /* Для позиционирования overlay */
}

.casino-image {
    width: 100%;
    height: auto; /* Автоматическая высота для изображения */
    border-radius: 10px;
}

.overlay {
    position: absolute;
    top: 0; /* Позиционирование сверху */
    left: 0;
    right: 0;
    bottom: 0; /* Занимает всю карточку */
    background: rgba(0, 0, 0, 0.7); /* Полупрозрачный фон */
    color: white;
    display: flex;
    flex-direction: column; /* Вертикальное выравнивание */
    justify-content: center; /* Центрирование по вертикали */
    align-items: center; /* Центрирование по горизонтали */
    border-radius: 10px; /* Закругление углов */
    text-align: center;
}

.overlay h3 {
    margin: 0;
}

.button {
    display: inline-block;
    padding: 10px 15px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.button:hover {
    background-color: #218838;
    transform: scale(1.05);
}

/* Модальное окно */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); /* Полупрозрачный фон */
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: center;
}

.modal-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 768px) {
    .casino-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на мобильных */
    }
}

@media (max-width: 480px) {
    .casino-grid {
        grid-template-columns: 1fr; /* 1 колонка на очень маленьких экранах */
    }
}