/* =========================================
   1. ЗМІННІ ТА СКИДАННЯ СТИЛІВ (RESET)
   ========================================= */
:root {
    --bg-main: #0b0f19;        /* Основний темний фон */
    --bg-secondary: #1a1f2e;   /* Фон для карток, хедера, футера */
    --accent-color: #fca311;   /* Акцентний колір (помаранчевий/золотий) */
    --accent-hover: #e5940f;
    --text-main: #d1d5db;      /* Основний текст */
    --text-light: #ffffff;     /* Заголовки */
    --border-color: #2d3748;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
}

a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

a:hover {
    color: var(--accent-color);
}

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

/* Обгортка для центрування контенту */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   2. ТИПОГРАФІКА ТА БАЗОВІ ЕЛЕМЕНТИ
   ========================================= */
h1, h2, h3, h4 {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.3;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; margin-top: 30px; }
h3 { font-size: 1.4rem; margin-top: 20px; }

p, ul, ol {
    margin-bottom: 20px;
}

ul, ol {
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

/* Кнопки */
.main-button, .login-btn, .registr-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    border: none;
    transition: var(--transition);
}

.main-button, .registr-btn {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 15px rgba(252, 163, 17, 0.3);
}

.main-button:hover, .registr-btn:hover {
    background-color: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
}

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

.login-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-light);
}

/* =========================================
   3. HEADER ТА НАВІГАЦІЯ
   ========================================= */
.header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

.menu-toggle {
    display: none;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1010;
}

.burger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 2px;
    transition: var(--transition);
}

.main-nav__list {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav__list a {
    font-size: 0.95rem;
    font-weight: 500;
}

.header-buttons {
    display: flex;
    gap: 15px;
}

/* =========================================
   4. ГОЛОВНИЙ КОНТЕНТ ТА ТАБЛИЦІ
   ========================================= */
.entry-content {
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.main-section {
    text-align: center;
}

.main-section img, .main-section__image img {
    border-radius: var(--border-radius);
    margin: 0 auto 30px;
}

/* Таблиці */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 20px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

/* Текстові блоки з картинками (Наприклад: Логін) */
.content-section__wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
}

.content-section__image img {
    border-radius: var(--border-radius);
    width: 100%;
}

/* =========================================
   5. СІТКА ІГОР ТА ТАБИ (BEST GAMES)
   ========================================= */
.best-games__nav {
    display: flex;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.best-games__nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.best-games__nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background-color: var(--bg-secondary);
    border-radius: 30px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    fill: var(--text-main);
}

.best-games__nav a.active {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    fill: #fff;
}

/* Стиль табів (приховування неактивних) */
.tab {
    display: none;
}
.tab.active {
    display: block;
}

/* Сітка карток */
.best-games__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

/* Для секцій з провайдерами та платежами робимо ширші картки */
.best-games:nth-of-type(n+4) .best-games__list {
     grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.best-games__item {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 15px;
    transition: var(--transition);
    border: 1px solid transparent;
    text-align: center;
}

.best-games__item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.best-games__item-img img {
    border-radius: 6px;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    margin-bottom: 12px;
}

.best-games__item span {
    display: block;
    color: var(--text-light);
    font-weight: 600;
    font-size: 1rem;
}

.best-games__item small {
    display: block;
    color: #8b949e;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* =========================================
   6. FAQ ТА ІНШІ БЛОКИ
   ========================================= */
.faq__item {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
}

.faq__item h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.faq__item p {
    margin-bottom: 0;
}

.updated-block {
    text-align: right;
}

.updated-block__box {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.85rem;
}

/* =========================================
   7. FOOTER
   ========================================= */
.footer {
    background-color: var(--bg-secondary);
    padding: 50px 0 20px;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

.footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.footer__info {
    max-width: 300px;
}

.footer__images {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.footer__images img {
    height: 35px;
    width: auto;
    opacity: 0.7;
    transition: var(--transition);
}

.footer__images img:hover {
    opacity: 1;
}

.footer__links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
}

.footer-nav__list {
    list-style: none;
    padding: 0;
}

.footer-nav__list li:first-child a {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
    cursor: default;
}

.footer-nav__list li:not(:first-child) a {
    color: var(--text-main);
    font-size: 0.9rem;
}

.footer-nav__list li:not(:first-child) a:hover {
    color: var(--accent-color);
}

.footer__bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: #6b7280;
}

/* =========================================
   8. MEDIA QUERIES (АДАПТИВНІСТЬ)
   ========================================= */
@media (min-width: 768px) {
    .content-section__wrap {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer__inner {
        grid-template-columns: 1fr 2fr;
    }
}

@media (max-width: 992px) {
    /* Мобільне меню */
    .burger {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 20px 15px;
        flex-direction: column;
        display: none; /* Приховано за замовчуванням */
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    
    .main-nav__list {
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 15px;
    }
    
    /* Логіка відкриття меню через checkbox (Pure CSS) */
    .menu-toggle:checked ~ .main-nav {
        display: flex;
    }
    
    /* Анімація бургера при відкритті */
    .menu-toggle:checked ~ .burger span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle:checked ~ .burger span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle:checked ~ .burger span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .header-buttons {
        display: none; /* Приховуємо кнопки в хедері на мобільному, якщо вони не влазять */
    }
}

@media (max-width: 576px) {
    .best-games__list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .best-games:nth-of-type(n+4) .best-games__list {
        grid-template-columns: 1fr;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}
/* =========================================
   ДОДАТКОВІ СТИЛІ: HERO BANNER
   ========================================= */
.hero-banner {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 30px;
    width: 100%;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 280px; /* Мінімальна висота для мобільних, щоб вліз текст */
    display: block;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.7); /* Темна напівпрозора маска для читабельності тексту */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-offer {
    text-align: center;
    padding: 20px;
    max-width: 80%;
}

.hero-offer__subtitle {
    display: block;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.hero-offer__title {
    color: #ffffff;
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    line-height: 1.2;
}

@media (max-width: 768px) {
    .hero-offer__title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-offer__title {
        font-size: 1.5rem;
    }
    .hero-offer {
        max-width: 95%;
    }
}

/* =========================================
   ДОДАТКОВІ СТИЛІ: АДАПТИВНІ ТАБЛИЦІ
   ========================================= */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Плавний скрол на iOS */
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
}

.table-responsive table {
    margin-bottom: 0; 
    min-width: 600px; /* Змушує таблицю зберігати ширину, активуючи горизонтальний скрол на вузьких екранах */
}