/* ============================================
   Bitva Games - Main Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0f0f1a;
    color: #e0e0e0;
    line-height: 1.5;
    padding-top: 60px;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #1a1a2e;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid #2a2a3e;
    transition: transform 0.3s ease;
}

.header.is-hidden {
    transform: translateY(-100%); /* Уводит шапку ровно на её высоту вверх за пределы экрана */
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-right: 15px;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: #e0e0e0;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 60px;
    background: #1a1a2e;
    z-index: 999;
    border-right: 2px solid #3a3a5a;
    transition: width 0.3s ease, transform 0.3s ease, top 0.3s ease;
}

.sidebar.is-shifted {
    top: 0;
}

.sidebar-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-scroll::-webkit-scrollbar {
    display: none;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
}

.sidebar-divider {
    display: block;
    width: 80%;
    height: 1px;
    min-height: 1px; /* Жестко фиксируем высоту */
    flex-shrink: 0;  /* Запрещаем флексбоксу сжимать этот элемент */
    background: #4a4a6a;
    margin: 8px auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #a0a0b0;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s, opacity 0.2s ease;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

/* Стиль для активной ссылки */
.nav-item.is-active {
    color: #fff;
    background: rgba(0, 97, 208, 0.1); /* Легкое свечение акцентным цветом */
    border-left: 3px solid #005de9; /* Яркая полоса слева */
    padding-left: -3px; /* Компенсируем сдвиг из-за бордера */
}

.nav-item::before {
    content: "";
    width: 60px;
    text-align: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.nav-system-home::before { content: "🏠"; }
.nav-system-featured::before { content: "⭐"; }
.nav-system-new::before { content: "✨"; }

.nav-cat-puzzle::before { content: "🧩"; }
.nav-cat-match-3::before { content: "💎"; }
.nav-cat-bubble-shooter::before { content: "🎈"; }
.nav-cat-mahjong::before { content: "🀄"; }
.nav-cat-solitaire::before { content: "🃏"; }
.nav-cat-card-board::before { content: "♠️"; }
.nav-cat-hidden-object::before { content: "🔍"; }
.nav-cat-adventure::before { content: "🗺️"; }
.nav-cat-arcade-action::before { content: "🎮"; }
.nav-cat-rpg-strategy::before { content: "⚔️"; }
.nav-cat-shooting-war::before { content: "🎯"; }
.nav-cat-sports::before { content: "⚽"; }
.nav-cat-driving::before { content: "🚗"; }
.nav-cat-simulation::before { content: "🏗️"; }
.nav-cat-kids::before { content: "👶"; }
.nav-cat-for-girls::before { content: "👗"; }
.nav-cat-2-player::before { content: "👥"; }
.nav-cat-word::before { content: "📝"; }
.nav-cat-casual::before { content: "🎲"; }

.nav-utility-about::before { content: "❔"; }
.nav-utility-privacy::before { content: "🔒"; }
.nav-utility-contacts::before { content: "✉️"; }

.sidebar-footer {
    margin-top: auto;
    padding-bottom:10px;
}

/* Desktop Toggle Button */
.sidebar-toggle-btn {
    position: absolute;
    left: 100%; /* Всегда строго приклеена к правому краю панели */
    top: 16px;
    width: 24px;   /* Строгий размер: ширина 24px */
    height: 50px;  /* Строгий размер: высота 50px */
    background: #1a1a2e;
    color: #a0a0b0;
    font-size: 1.6rem; /* Увеличили размер галочки */
    font-weight: bold; /* Сделали её жирнее */
    cursor: pointer;
    z-index: 1000;
    border-radius: 0 8px 8px 0; /* Скругление ВСЕГДА только справа */
    border: 2px solid #3a3a5a; /* Выразительный и толстый бордер */
    border-left: none; /* Слева бордер не нужен, чтобы кнопка сливалась с панелью */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.sidebar-toggle-btn:hover {
    color: #00d4ff;
    background: #22223a;
    border-color: #4a4a6a; /* Бордер тоже можно немного подсвечивать при наведении */
}

/* Mobile close button — hidden on desktop */
.sidebar-mobile-close {
    display: none;
}

/* --- Desktop Sidebar States (>= 1025px) --- */
@media (min-width: 1025px) {
    /* Hide hamburger on desktop */
    .hamburger {
        display: none;
    }

    /* ОТКЛЮЧАЕМ реакцию на наведение у самой панели, чтобы кнопка не триггерила Hover */
    .sidebar {
        pointer-events: none;
    }

    /* ВКЛЮЧАЕМ реакцию обратно только для зоны скролла и самой кнопки */
    .sidebar-scroll, .sidebar-toggle-btn {
        pointer-events: auto;
    }

    /* State 1: Mini State (default) — скрываем ТОЛЬКО текст, эмодзи остаются! */
    .sidebar .nav-text {
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    /* State 2: Expanded State (hover) — раскрываем ТОЛЬКО если мышка над зоной меню */
    .sidebar:has(.sidebar-scroll:hover) {
        width: 250px;
    }

    /* Плавно показываем текст при расширении */
    .sidebar:has(.sidebar-scroll:hover) .nav-text {
        opacity: 1;
        transition-delay: 0.1s;
    }

    /* State 3: Fully Closed State (click) */
    .sidebar.is-closed {
        transform: translateX(-100%);
    }

    /* Когда панель закрыта полностью, отключаем расширение при случайном наведении */
    .sidebar.is-closed:has(.sidebar-scroll:hover) {
        width: 60px;
    }

    .sidebar.is-closed:has(.sidebar-scroll:hover) .nav-text {
        opacity: 0;
    }

    /* Main content margin adapts to sidebar state */
    .sidebar.is-closed ~ .main-content {
        margin-left: 0;
    }
}

/* --- Mobile Sidebar States (< 1025px) --- */
@media (max-width: 1024.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        transition: transform 0.3s ease, top 0.3s ease;
    }

    .sidebar.is-mobile-open {
        transform: translateX(0);
    }

    .sidebar.is-mobile-open ~ .sidebar-overlay {
        display: block;
    }

    /* Fully expanded on mobile — text always visible */
    .sidebar .nav-item {
        opacity: 1;
    }

    /* No hover expansion on mobile */
    .sidebar:hover {
        width: 280px;
    }

    /* Disable hover completely on touch devices */
    @media (hover: none) {
        .sidebar:hover {
            width: 280px;
        }
    }

    /* Hide desktop toggle on mobile */
    .sidebar-toggle-btn {
        display: none;
    }

    /* Mobile close button (X) visible on mobile */
    .sidebar-mobile-close {
        display: flex;
        position: absolute;
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #a0a0b0;
        font-size: 1.3rem;
        cursor: pointer;
        z-index: 1;
        border-radius: 50%;
        transition: color 0.2s, background 0.2s;
    }

    .sidebar-mobile-close:hover {
        color: #fff;
        background: rgba(255,255,255,0.1);
    }
}

/* --- Sidebar Overlay --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

/* --- Main Content --- */
.main-content {
    margin-left: 60px;
    padding: 30px 38px;
    min-height: calc(100vh - 60px);
}

/* --- Game Grid (Section 3) --- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(182px, 1fr));
    gap: 15px;
    align-items: start;
}

/* --- Game Card Component (Section 6) --- */
.game-card {
    display: block;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 7px;
    backface-visibility: hidden;
    transition: transform 0.1s ease-in-out, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.game-card:hover {
    box-shadow: 0 0 0 2px #ffcc00;
}

.game-card:active {
    transform: scale(0.94);
}

.game-card img {
    display: block;
    object-fit: cover;
    border-radius: 7px;
    transition: transform 0.3s ease;
}

/* --- Эффект приближения картинки при наведении на карточку --- */
.game-card:hover img {
    transform: scale(1.08); /* 1.08 — это золотая середина: заметно, но не слишком резко */
}

/* Context Sizing 1: Homepage Ribbons */
.horizontal-ribbon .game-card {
    height: 175px;
    flex-shrink: 0;
    display: block;
    min-width: 200px; /* СПАСАЕТ ОТ СХЛОПЫВАНИЯ: задает стартовую ширину до загрузки lazy-картинок */
}

.horizontal-ribbon .game-card img {
    height: 175px;
    width: auto;
    max-width: none;
}

/* Context Sizing 2: Category / Tag / Featured / New Grids */
.game-grid .game-card {
    width: 100%;
    height: auto;
    display: block;
}

.game-grid .game-card img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 100px; /* Спасает от схлопывания высоты в 0 */
    object-fit: contain;
    border-radius: 7px;
    transition: transform 0.3s ease;
}

/* Context Sizing 3: Similar Games / Sidebar (square) */
.similar-games .game-card,
.ad-sidebar .game-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
}

.similar-games .game-card img,
.ad-sidebar .game-card img {
    width: 100%;
    height: 100%;
}

/* --- Ribbon (Homepage Section 2) --- */
.home-ribbons {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ribbon-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ribbon-header {
    display: flex;
    align-items: baseline; /* Нужно, чтобы тексты разного размера стояли на одной линии */
    justify-content: flex-start;
    gap: 16px;
}

.ribbon-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

.ribbon-view-all {
    font-size: 0.85rem;
    color: #77bbff;
    transition: color 0.2s;
    flex-shrink: 0;
}

.ribbon-view-all:hover {
    color: #83e4ff;
}

/* Horizontal Ribbon scroll container */
.horizontal-ribbon-wrapper {
    position: relative;
    display: flex;
    margin: 0 -2px;
}

.horizontal-ribbon {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 15px;
    padding: 5px 2px;
    width: 100%;
}

/* Hide native scrollbar universally */
.horizontal-ribbon::-webkit-scrollbar {
    display: none;
}

.horizontal-ribbon {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Scroll overlay (arrow buttons, hover only) */
.scroll-overlay {
    position: absolute;
    top: 0;
    width: 60px; /* Ширина самой кнопки */
    height: 100%;
    border: none;
    color: #fff;
    font-size: 4.5rem; /* Размер символа стрелки */
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center; /* Теперь стрелка строго по центру блока */
    z-index: 2;
    background: rgba(20, 20, 25, 0.5); /* Четкий полупрозрачный фон */
    backdrop-filter: blur(2px); /* Легкий эффект матового стекла под кнопкой */
    transition: opacity 0.2s, color 0.2s, background 0.2s;
}

.scroll-overlay--left {
    left: 0;
}

.scroll-overlay--right {
    right: 0;
}

.scroll-overlay.is-hidden {
    display: none;
    pointer-events: none;
}

.horizontal-ribbon-wrapper:hover .scroll-overlay:not(.is-hidden) {
    display: flex;
}

.scroll-overlay:hover {
    color: #00d4ff; /* Акцентный цвет стрелки при наведении */
    background: rgba(15, 15, 20, 0.8); /* Фон становится плотнее при наведении */
}

/* --- Category / Tag / Featured / New Pages (Section 3) --- */
.category-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-header-card {
    padding: 30px;
    background: #22223a; /* Или можешь поставить #22223a, если хочешь чтобы блок чуть сильнее выделялся на фоне сайта */
    border: 1px solid #2a2a3e;
    border-radius: 15px;
    text-align: left;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase; /* Делает все буквы ЗАГЛАВНЫМИ */
    letter-spacing: 0.5px; /* Чуть-чуть раздвинуты буквы для красоты */
}

.seo-text-top {
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #a0a0b0;
}

.seo-text-top p {
    margin-bottom: 10px;
}

.seo-text-top p:last-child {
    margin-bottom: 0;
}

.seo-text-bottom {
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #a0a0b0;
}

.seo-text-bottom p {
    margin-bottom: 10px;
}

.seo-text-bottom p:last-child {
    margin-bottom: 0;
}

/* --- Tag Cloud --- */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tag-pill {
    display: inline-flex;
    padding: 6px 16px;
    border-radius: 20px;
    background: #1a1a2e;
    border: 1px solid #333348;
    font-size: 0.85rem;
    color: #a0a0b0;
    transition: all 0.2s;
}

.tag-pill:hover {
    background: #2a2a3e;
    color: #fff;
    border-color: #3a3a5e;
}

.tag-cloud-block {
    position: relative;
    padding: 10px 20px 0px 20px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- Стили для верхней плавающей кнопки --- */
.tag-cloud-toggle-top {
    position: absolute;
    top: -17px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5; /* Чтобы кнопка была поверх тегов */
    background: #1a1a2e;
    border: 1px solid #50506a;
    border-radius: 12px;
    color: #86bfff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    cursor: pointer;
    opacity: 0; /* Скрыта по умолчанию */
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

.tag-cloud-toggle-top:hover {
    color: #cce1ff;
    border-color: #3a3a5e;
    background: rgba(42, 42, 62, 0.95);
}

/* Показываем кнопку только когда блок раскрыт */
.tag-cloud-block.is-expanded .tag-cloud-toggle-top {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Возвращаем возможность кликать */
}

/* Обертка для тегов и градиента */
.tag-cloud-wrapper {
    position: relative;
    width: 100%;
}

/* Ограничиваем высоту и добавляем плавность */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    max-height: 170px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

/* Полупрозрачный градиент снизу */
.tag-cloud-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(26,26,46,0), rgba(26,26,46,1));
    pointer-events: none; /* Чтобы градиент не мешал кликать по тегам под ним */
    transition: opacity 0.3s ease;
}

/* --- Состояние РАСКРЫТОГО блока --- */
/* Ставим с запасом (например 2000px), чтобы любой объем тегов влез */
.tag-cloud-block.is-expanded .tag-cloud {
    max-height: 2000px;
}

/* Убираем градиент, когда блок полностью раскрыт */
.tag-cloud-block.is-expanded .tag-cloud-fade {
    opacity: 0;
}

/* Стили кнопки */
.tag-cloud-toggle {
    margin-top: 0px;
    align-self: center;
    background: none;
    border: none;
    color: #86bfff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px 15px;
}

.tag-cloud-toggle:hover {
    color: #cce1ff; /* При наведении подсвечиваем нашим новым желтым цветом! */
}

.inline-tag-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-right: 8px; /* Отступ от текста до первого тега */
    display: flex;
    align-items: center; /* Центрируем по вертикали */
}

.tag-cloud-block .tag-cloud {
    justify-content: flex-start;
}


/* --- SEO Text --- */
.seo-text {
    padding: 20px;
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid #2a2a3e;
    line-height: 1.7;
    font-size: 0.95rem;
}

.seo-text p {
    margin-bottom: 10px;
}

.seo-text p:last-child {
    margin-bottom: 0;
}

.seo-text ul {
    padding-left: 30px; /* Делаем явный отступ слева, чуть больше обычного */
    margin-bottom: 15px; /* Отступ снизу от всего списка */
    list-style-type: disc; /* Возвращаем классические точки-маркеры, если они пропали */
}

.seo-text li {
    margin-bottom: 8px; /* Небольшой отступ между самими пунктами для читаемости */
    line-height: 1.6;
}

/* --- Game Page --- */
.game-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #a0a0b0;
    font-weight: bold;
}

.breadcrumbs a {
    color: #86bfff;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #cce1ff;
}

.breadcrumb-sep {
    color: #cce1ff;
}

.game-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.game-player-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.game-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.game-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 15px;
    background: #1a1a2e;
}

.game-placeholder-icon {
    height: 175px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.play-button {
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #00d4ff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.play-button:hover {
    background: #00b8e6;
}

.game-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #c0c0d0;
}

.similar-games {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.similar-games .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

/* --- iOS Fullscreen --- */
.ios-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
}

.ios-fullscreen iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.ios-close-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10000;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Static Page --- */
.static-page {
    max-width: 800px;
    margin: 0 auto;
}

.static-page-content {
    padding: 20px;
    background: #1a1a2e;
    border-radius: 12px;
    border: 1px solid #2a2a3e;
    line-height: 1.7;
}

/* --- Footer --- */
.footer {
    padding: 25px 20px 25px 70px;
    margin-top: 40px;
    border-top: 1px solid #2a2a3e; /* Легкая линия под темную тему */
    color: #a0a0b0;
    font-size: 0.9rem;
}

.footer-inner {
    max-width: 1200px;
    width: 100%; /* Жестко говорим контейнеру не быть шире родителя */
    box-sizing: border-box; /* Учитываем отступы внутри ширины */
    margin: 0; /* Прибиваем к левому краю (отступ создается padding-ом самого .footer) */
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px 30px; /* 15px по вертикали (если перенесется), 30px по горизонтали */
}

.footer-copyright {
    min-width: 0;
    word-break: break-word; /* Разрешаем тексту ломаться, если места совсем не останется */
}

.footer-partners {
    display: flex;
    flex-wrap: wrap; /* Тоже разрешаем перенос внутри партнеров на всякий случай */
    gap: 30px; /* Отступ между самими сайтами-партнерами */
    align-items: center;
}

.footer-partners a {
    color: #a0a0b0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-partners a:hover {
    color: #cce1ff;
}

/* --- Мобильная адаптация (Сеточка) --- */
@media (max-width: 1024.98px) {
    .footer {
        padding: 25px 20px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 20px; /* Отступ между строкой копирайта и сеткой партнеров */
        text-align: center;
    }

    .footer-partners {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr; /* Ровно 2 колонки */
        gap: 15px; /* Расстояние между клеточками партнеров */
    }

    .footer-partners a {
        border-radius: 10px;
        padding: 12px 0;
        display: block; /* Заставляем ссылку занять всю клеточку */
    }

    .footer-partners a:hover {
        background: #2a2a3e;
        border-color: #3a3a5e;
    }
}

/* --- Error Page --- */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 20px;
}

.error-container h1 {
    font-size: 4rem;
    color: #ff4444;
}

.error-container p {
    font-size: 1.2rem;
    color: #a0a0b0;
}

.btn-home {
    padding: 12px 32px;
    background: #3a3a5e;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-home:hover {
    background: #4a4a6e;
}

/* ============================================
   Responsive Design
   ============================================ */

/* --- Desktop & Tablet (>= 1025px) --- */
@media (min-width: 1025px) {
    /* Main content with sidebar in mini state */
    .main-content {
        margin-left: 60px;
    }
}

/* --- Mobile (< 1025px) --- */
@media (max-width: 1024.98px) {
    .main-content {
        margin-left: 0;
        padding: 20px 17px;
    }

    .game-layout {
        grid-template-columns: 1fr;
    }

    .game-layout .ad-sidebar {
        display: none;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .horizontal-ribbon .game-card {
        height: 140px;
    }

    .horizontal-ribbon .game-card img {
        height: 140px;
    }

    .game-placeholder-icon {
        height: 140px;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .hero-header-card {
        padding: 16px 14px;
    }

    .scroll-overlay {
        display: none !important;
    }
}

.seo-hidden-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- AdBlock Fallback Sidebar Grid --- */
.adblock-fallback-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 15px;
    padding: 15px;
}


/* СТИЛИ ДЛЯ КНОПКИ КОНТАКТОВ */
.contact-action {
    margin-top: 20px;
    text-align: left; /* или center, если тексты на странице по центру */
}

.contact-btn {
    display: inline-block;
    background-color: #434368; /* Приятный синий цвет, можешь заменить на фирменный цвет Bitva */
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 6px;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-btn:hover {
    background-color: #555585;
    color: #ffffff;
    text-decoration: none;
}

.contact-btn:active {
    transform: scale(0.98); /* Эффект легкого нажатия */
}

.contact-subtext {
    margin-top: 12px;
    font-size: 14px;
    color: #757575;
}

/* Отступы для заголовков на текстовых страницах */
.static-page-content h3 {
    margin-top: 10px;    /* Большой отступ сверху */
}

.static-page-content h4 {
    margin-top: 10px;    /* Чуть меньше, чем у h3 */
}