* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

.header {
    background-color: var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 100px;
    width: auto;
}

.nav-header ul {
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-header ul li a {
    color: var(--light-text);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s;
    text-decoration: none;
}

.nav-header ul li a:hover {
    color: var(--accent-color);
}

.btn-container {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-signup {
    background-color: transparent;
    border: 2px solid var(--light-text);
    color: var(--light-text);
}

.btn-login {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hero-section {
    position: relative;
    width: 100%;
    max-width: 1300px;
    min-height: 500px;
    margin: 40px auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--banner-text-color);
    max-width: 600px;
    padding: 60px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--banner-text-color);
}

.sub-title {
    font-size: 42px;
    margin-bottom: 20px;
    color: var(--banner-text-color);
    font-family: 'Bradley Hand', cursive;
    background-color: var(--banner-bg-color);
    padding: 15px 25px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    word-break: break-word;
}

.btn-get-bonus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--light-text);
    text-decoration: none;
    padding: 0 32px;
    height: 56px;
    font-size: 18px;
    border-radius: 999px;
    margin-top: 20px;
    max-width: 100%;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
    position: static;
}

.section-block {
    padding: 60px 0;
    overflow-x: hidden;
    max-width: 100%;
}

.dark-section {
    background-color: var(--dark-section-color);
    color: var(--light-text);
}

h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    line-height: 1.25;
    word-break: break-word;
}

.info {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    overflow-x: hidden;
    word-wrap: break-word;
}

.info > div {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.info h2 {
    text-align: left;
}

.info img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

/* Глобальне обмеження для текстових елементів */
p, li, h1, h2, h3, h4, .info * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-card {
    background-color: var(--light-text);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s;
    height: 100%;
    min-width: 0;
}

.image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 66.66%;
    overflow: hidden;
    background-color: #f0f0f0;
}

.image-container img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.game-card:hover .hover-overlay {
    opacity: 1;
}

.play-triangle {
    width: 0;
    height: 0;
    border-top: 30px solid transparent;
    border-bottom: 30px solid transparent;
    border-left: 50px solid var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s;
}

.play-triangle:hover {
    transform: scale(1.1);
    border-left-color: var(--accent-color);
}

.game-provider {
    display: none;
}

.text-container {
    padding: 20px;
    min-height: 120px;
}

.game-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
    cursor: pointer;
}

.game-rating {
    color: var(--accent-color);
    margin-bottom: 10px;
}

.game-text {
    color: var(--muted-text);
    font-size: 14px;
}

.text-center {
    text-align: center;
    margin-top: 40px;
}

.btn-view-all {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.promo-card {
    background-color: var(--light-text);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    position: relative;
    min-width: 0;
}

.promo-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.promo-content {
    padding: 20px;
    min-width: 0;
}

.promo-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--secondary-color);
    line-height: 1.3;
    word-break: break-word;
}

.promo-content p {
    color: var(--muted-text);
    margin-bottom: 20px;
    word-break: break-word;
}

.btn-promo {
    background-color: var(--secondary-color);
    color: var(--light-text);
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
}

footer {
    background-color: var(--darker-section-color);
    color: var(--light-text);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--light-text);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
    text-decoration: none;
    cursor: pointer;
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

.banners-block {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
}

.banners-block img {
    height: 30px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.banners-block img:hover {
    opacity: 1;
}

.footer-small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 20px;
}

.side-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--light-text);
    z-index: 1000;
    overflow-x: hidden;
    transition: width 0.3s;
}

.side-panel img {
    width: 150px;
    margin: 30px 0 40px 40px;
}

.side-panel ul {
    padding: 0 40px;
    list-style: none;
}

.side-panel ul li {
    margin-bottom: 15px;
}

.side-panel ul li a {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}

.side-panel-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    color: var(--secondary-color);
    cursor: pointer;
}

.side-panel-open {
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 24px;
    cursor: pointer;
    display: none;
}

.popular-games-title {
    color: var(--popular-games-color) !important;
}

.content-image {
    display: block;
    width: 100%;
    max-width: 700px;
    height: auto;
    margin: 20px auto;
    border-radius: 12px;
}

/* Стилі для таблиці - зберігаємо оригінальний вигляд */
.table-wrapper {
    width: 100%;
    margin: 20px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow-x: visible;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffffe7;
    color: var(--secondary-color);
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    color: #000000e7;
    border: 1px solid #000000;
    vertical-align: top;
}

.data-table th {
    background-color: var(--primary-color);
    color: #ffffffe7;
    font-weight: 600;
}

.data-table tr:hover {
    background-color: rgba(53, 49, 49, 0.137);
}

@media (max-width: 1024px) {
    .nav-header {
        display: none;
    }

    .side-panel-open {
        display: block;
    }

    .hero-section {
        width: 100%;
        min-height: 420px;
        margin: 20px 0;
    }

    .hero-content {
        padding: 30px 20px;
        max-width: 520px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .sub-title {
        font-size: 28px;
    }

    .info {
        flex-direction: column;
        gap: 30px;
    }

    .promotions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .section-block {
        padding: 40px 0;
    }

    h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .info p {
        font-size: 15px;
        line-height: 1.5;
    }

    .info {
        gap: 20px;
    }
    
    .info > div {
        width: 100%;
        min-width: 0;
    }

    .content-image,
    .info img {
        max-width: 100%;
        height: auto;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .promotions-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .promo-card {
        width: 100%;
    }

    .promo-content h3 {
        font-size: 18px;
    }

    .promo-content p {
        font-size: 14px;
        line-height: 1.45;
    }

    /* Стилі для таблиці на мобільних - зберігаємо вигляд, але стискаємо */
    .table-wrapper {
        overflow-x: visible;
        margin: 15px 0;
    }
    
    .data-table {
        font-size: 12px;
        min-width: auto;
        width: 100%;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
        white-space: normal;
        word-break: break-word;
    }
}

@media (max-width: 600px) {
    .btn-container {
        display: none;
    }

    .hero-section {
        min-height: 320px;
        border-radius: 10px;
    }

    .hero-content {
        padding: 18px 16px 20px;
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .sub-title {
        font-size: 22px;
        padding: 10px 14px;
        line-height: 1.3;
        margin-bottom: 14px;
    }

    .btn-get-bonus {
        font-size: 15px;
        padding: 0 20px;
        height: 48px;
        margin-top: 12px;
        max-width: 100%;
    }

    .play-triangle {
        border-top: 25px solid transparent;
        border-bottom: 25px solid transparent;
        border-left: 40px solid var(--primary-color);
    }

    .promo-content {
        padding: 16px;
    }

    .btn-promo {
        font-size: 12px;
        padding: 10px 8px;
    }
    
    .data-table {
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .header-content {
        padding: 10px 0;
    }

    .logo img {
        height: 72px;
    }

    .hero-section {
        min-height: 260px;
        margin: 14px 0 20px;
        border-radius: 10px;
    }

    .hero-content {
        padding: 14px 12px 16px;
    }

    .sub-title {
        font-size: 25px;
        padding: 8px 10px;
        margin-bottom: 10px;
        max-width: 100%;
    }

    .btn-get-bonus {
        font-size: 13px;
        height: 42px;
        padding: 0 14px;
        border-radius: 999px;
        max-width: 160px;
    }

    h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    p,
    li {
        font-size: 14px;
        line-height: 1.55;
    }

    .section-block {
        padding: 28px 0;
    }

    .text-container {
        padding: 16px;
        min-height: auto;
    }

    .game-title {
        font-size: 16px;
    }

    .game-text {
        font-size: 13px;
    }

    .promo-content {
        padding: 14px;
    }

    .promo-content h3 {
        font-size: 16px;
    }

    .promo-content p {
        font-size: 13px;
    }

    .btn-promo {
        font-size: 11px;
        padding: 9px 6px;
    }

    .table-wrapper {
        margin: 15px 0;
    }
    
    .data-table {
        font-size: 10px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 6px;
    }

    .footer-grid {
        gap: 25px;
    }

    .banners-block {
        gap: 10px;
    }

    .banners-block img {
        height: 24px;
    }
}

@media (max-width: 360px) {
    .hero-section {
        min-height: 230px;
    }

    .sub-title {
        font-size: 20px;
        max-width: 100%;
        padding: 7px 9px;
    }

    .btn-get-bonus {
        font-size: 12px;
        height: 40px;
        max-width: 145px;
        padding: 0 12px;
    }

    h2 {
        font-size: 20px;
    }

    p,
    li {
        font-size: 13px;
    }

    .data-table {
        font-size: 9px;
    }
    
    .data-table th,
    .data-table td {
        padding: 5px 5px;
    }

    .promo-content h3 {
        font-size: 15px;
    }

    .btn-promo {
        font-size: 10px;
        padding: 8px 5px;
    }
}