* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Arial', sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    line-height: 1.6;
}
header {
    background: linear-gradient(90deg, #ff0066, #ffcc00);
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.logo {
    font-size: 2.5em;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}
nav {
    background: #222;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}
nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s;
}
nav ul li a:hover {
    color: #ffcc00;
}
nav ul li .register-btn {
    background: #ff0066;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
}
nav ul li .register-btn:hover {
    background: #ffcc00;
}
.hamburger {
    display: none;
    font-size: 2em;
    color: #fff;
    cursor: pointer;
    padding: 10px 20px;
}
.banner {
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.banner img.fallback-image {
    display: none; /* Скрываем запасное изображение, если баннер — фон */
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}
.banner h1 {
    font-size: 3.5em;
    color: #fff;
    text-shadow: 2px 2px 4px #000;
    margin-bottom: 20px;
}
.banner p {
    font-size: 1.2em;
    max-width: 600px;
    text-shadow: 1px 1px 2px #000;
}
.banner button {
    background: #ff0066;
    border: none;
    padding: 15px 30px;
    color: #fff;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}
.banner button:hover {
    background: #ffcc00;
}
.section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    overflow: hidden; /* Предотвращаем переполнение */
}
.section h2 {
    font-size: 2em;
    color: #ffcc00;
    margin-bottom: 20px;
    text-align: center;
}
.section h3 {
    font-size: 1.5em;
    color: #fff;
    margin: 20px 0 10px;
}
.content-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    border-radius: 10px;
    object-fit: contain; /* Сохраняем пропорции без обрезки */
    max-height: 300px;
}
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}
.game-card {
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s;
}
.game-card:hover {
    transform: scale(1.05);
}
.game-card img {
    width: 100%;
    height: 160px;
    object-fit: cover; /* Обрезаем для карточек, чтобы заполнить */
    display: block;
}
.game-card h3 {
    margin: 10px 0;
    font-size: 1.2em;
    color: #fff;
}
.game-card button {
    background: #ff0066;
    border: none;
    padding: 10px;
    color: #fff;
    cursor: pointer;
    width: 100%;
    font-size: 1em;
    transition: background 0.3s;
}
.game-card button:hover {
    background: #ffcc00;
}
.bonus-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #333;
}
.bonus-table th, .bonus-table td {
    padding: 15px;
    text-align: left;
    border: 1px solid #444;
}
.bonus-table th {
    background: #ff0066;
    color: #fff;
}
.bonus-table td {
    color: #ddd;
}
.section ul, .section ol {
    margin-left: 20px;
    margin-bottom: 20px;
}
.section p {
    margin-bottom: 15px;
}
footer {
    background: #222;
    padding: 20px;
    text-align: center;
    color: #999;
    border-top: 1px solid #444;
}
footer a {
    color: #ffcc00;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: #333;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}
.modal-content h2 {
    color: #ffcc00;
    text-align: center;
    margin-bottom: 20px;
}
.modal-content label {
    display: block;
    margin: 10px 0 5px;
    color: #fff;
}
.modal-content input, .modal-content select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #222;
    color: #fff;
}
.modal-content button[type="submit"] {
    background: #ff0066;
    border: none;
    padding: 10px;
    color: #fff;
    cursor: pointer;
    width: 100%;
    font-size: 1em;
    border-radius: 5px;
}
.modal-content button[type="submit"]:hover {
    background: #ffcc00;
}
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    color: #fff;
    cursor: pointer;
}
img {
    max-width: 100%;
    height: auto;
    display: block; /* Устраняем лишние отступы */
}
@media (max-width: 768px) {
    .banner {
        height: 300px; /* Уменьшаем высоту баннера */
    }
    .banner h1 {
        font-size: 2em;
    }
    .banner p {
        font-size: 1em;
    }
    .content-image {
        max-height: 200px; /* Ограничиваем высоту на планшетах */
    }
    .games-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .game-card img {
        height: 120px; /* Уменьшаем для мобильных */
    }
    .modal-content {
        width: 95%;
    }
    .hamburger {
        display: block;
    }
    nav ul {
        display: none;
        flex-direction: column;
        gap: 10px;
        background: #222;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        padding: 20px;
        z-index: 99;
    }
    nav ul.active {
        display: flex;
    }
    nav ul li {
        text-align: center;
    }
    nav ul li a, nav ul li .register-btn {
        display: block;
        padding: 10px;
        font-size: 1.2em;
    }
}
@media (max-width: 480px) {
    .banner {
        height: 200px; /* Ещё меньше для маленьких экранов */
    }
    .banner h1 {
        font-size: 1.5em;
    }
    .banner p {
        font-size: 0.9em;
    }
    .content-image {
        max-height: 150px;
    }
    .game-card img {
        height: 100px;
    }
    .section {
        padding: 10px;
    }
}