* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Брендированный кликабельный фон (объединен в одно чистое правило) */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #06152b url('https://images.unsplash.com/photo-1508098682722-e99c43a406b2?auto=format&fit=crop&w=1920&q=80') no-repeat center top fixed;
    background-size: cover;
    color: #333;
    cursor: pointer;
    position: relative;
}

/* Водяной знак 1XBET по центру экрана */
body::before {
    content: '1XBET';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) skewX(-12deg);
    font-family: 'Arial Black', Impact, sans-serif;
    font-size: min(26vw, 340px);
    font-weight: 900;
    font-style: italic;
    letter-spacing: -2px;
    color: #00d2ff;
    opacity: 0.18;
    text-shadow: 0 0 50px rgba(0, 210, 255, 0.4);
    pointer-events: none;
    z-index: 0;
    user-select: none;
}

/* Изоляция контента от клика по фону */
.header,
.main-layout,
.footer,
.load-more-wrapper,
.ad-banner-link {
    cursor: default;
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 1. Компактный и узкий Header */
.header {
    background: linear-gradient(90deg, #00afca 0%, #0056b3 100%);
    color: white;
    padding: 10px 0;
    /* Уменьшили вертикальный отступ в два раза */
    text-align: center;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 22px;
    /* Аккуратный размер заголовка */
    letter-spacing: 1px;
    line-height: 1.1;
    margin: 0;
}

.header p {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

/* Ссылки баннеров */
.ad-banner-link {
    text-decoration: none;
    display: block;
    margin-bottom: 20px;
}

/* Контейнер верхнего слайдера */
.ad-top-promo {
    position: relative;
    background: #071a33;
    padding: 0;
    border-radius: 10px;
    border: 1.5px solid #00e5ff;
    box-shadow: 0 6px 25px rgba(0, 210, 255, 0.25);
    margin-bottom: 25px;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    display: block;
}

/* Окно просмотра */
.ad-top-viewport {
    width: 100%;
    overflow: hidden;
    display: block;
}

/* Трек перемещения слайдов */
.ad-top-track {
    display: flex;
    width: 100%;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* Ссылка-обертка для картинки */
.ad-top-slide {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    display: block;
    line-height: 0;
    text-decoration: none;
}

/* Изображение баннера */
.ad-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 70px;
}

/* Стрелки перелистывания */
.ad-top-promo .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(7, 26, 51, 0.85);
    border: 1px solid #00e5ff;
    color: #00e5ff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 14px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.ad-top-promo .slider-arrow:hover {
    background: #00e5ff;
    color: #071a33;
    transform: translateY(-50%) scale(1.08);
}

.ad-top-promo .slider-prev {
    left: 14px;
}

.ad-top-promo .slider-next {
    right: 14px;
}

/* Точки пагинации */
.ad-top-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 10;
}

.ad-top-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ad-top-dot.active {
    background: #00e5ff;
    width: 22px;
    border-radius: 4px;
}

/* 1. Колонка сайдбара растягивается на всю высоту новостной сетки */
.sidebar {
    height: 100%;
    position: relative;
}

/* 2. Липкий баннер скользит вдоль всей высоты сайдбара */
.sidebar .ad-banner-link {
    position: -webkit-sticky;
    position: sticky;
    top: 25px;
    /* Отступ от верхнего края экрана при прокрутке */
    z-index: 10;
    display: block;
}

/* Боковой контейнер под графический баннер */
.ad-sidebar-promo {
    background: #071a33;
    padding: 0;
    border-radius: 10px;
    border: 1.5px solid #00e5ff;
    box-shadow: 0 6px 25px rgba(0, 210, 255, 0.25);
    overflow: hidden;
    line-height: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-sidebar-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.4);
}

/* Картинка правого баннера */
.sidebar-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Сетка и контент */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
    align-items: stretch;
    /* Гарантирует одинаковую высоту новостей и сайдбара */
}

.news-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Карточка новости */
.news-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 210, 255, 0.25);
}

.news-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
    color: #0f172a;
}

.news-source {
    font-size: 12px;
    color: #64748b;
    margin-top: auto;
    padding-top: 10px;
}

/* Кнопка подгрузки */
.load-more-wrapper {
    text-align: center;
    margin: 30px auto 40px;
}

.load-more-btn {
    background-color: #ffffff;
    color: #0056b3;
    border: 2px solid #00b4d8;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background-color: #0056b3;
    color: #ffffff;
}

/* Нижний баннер */
.ad-bottom-promo {
    background: linear-gradient(90deg, #0d2c54 0%, #1e3d59 50%, #0056b3 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 30px;
    border-radius: 10px;
    border: 1.5px solid #00e5ff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    margin-bottom: 40px;
    text-decoration: none;
    box-sizing: border-box;
}

.ad-bottom-text {
    font-size: 14px;
    font-weight: 600;
    color: #e0f2fe;
    letter-spacing: 0.3px;
}

/* Кнопка действия в нижнем баннере */
.ad-bottom-promo .ad-btn {
    background-color: #06d6a0 !important;
    color: #073b4c !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(6, 214, 160, 0.4) !important;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.ad-bottom-promo:hover .ad-btn {
    background-color: #00f0b5 !important;
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 240, 181, 0.5) !important;
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding-top: 40px;
    margin-top: 40px;
    border-top: 1px solid #1e293b;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 35px;
}

.footer-logo {
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 13px;
    line-height: 1.6;
    max-width: 400px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 15px;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #00e5ff;
}

.footer-bottom {
    background-color: #090d16;
    padding: 15px 0;
    font-size: 12px;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.age-restriction {
    border: 1px solid #64748b;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    color: #cbd5e1;
}

/* ==========================================================================
   ВСПЛЫВАЮЩИЙ БАННЕР (MODAL -> DOCKED)
   ========================================================================== */

/* Затемняющая подложка */
.promo-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 12, 24, 0.82);
    backdrop-filter: blur(5px);
    z-index: 99990;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.promo-backdrop.hidden {
    display: none !important;
}

/* Базовые свойства всплывающего баннера */
.sticky-promo {
    position: fixed;
    display: block;
    z-index: 99999;
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.sticky-promo.hidden {
    display: none !important;
}

.sticky-promo-link {
    text-decoration: none;
    color: #ffffff;
    display: block;
    width: 100%;
}

/* Кнопка сворачивания */
.sticky-toggle-btn {
    background: #071a33;
    color: #00e5ff;
    border: 1px solid #00e5ff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 100000;
    transition: background 0.2s, color 0.2s;
}

.sticky-toggle-btn:hover {
    background: #00e5ff;
    color: #071a33;
}

/* Кнопка действия внутри баннера */
.sticky-btn {
    background: #06d6a0 !important;
    color: #073b4c !important;
    border-radius: 6px;
    font-weight: 900;
    white-space: nowrap;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(6, 214, 160, 0.45) !important;
    display: inline-block;
    transition: transform 0.2s, background 0.2s;
}

.sticky-promo-link:hover .sticky-btn {
    background: #00f0b5 !important;
    transform: scale(1.03);
}

/* Центрирование логотипа и подписи в брендовом блоке */
.sticky-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Смещение текста под логотип с отступом вниз */
.sticky-hot {
    display: block;
    text-align: center;
    width: 100%;
    margin-top: 8px !important;
    /* Опускаем чуть ниже логотипа */
    font-size: 11px;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Корректировка для свернутого бара внизу */
.sticky-promo.state-docked .sticky-hot {
    margin-top: 4px !important;
    font-size: 10px;
}

/* 1. СОСТОЯНИЕ: МОДАЛЬНОЕ ОКНО ПО ЦЕНТРУ */
.sticky-promo.state-modal {
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 480px;
    background: linear-gradient(145deg, #071a33 0%, #004d80 55%, #00a8cc 100%);
    border: 2px solid #00e5ff;
    border-radius: 16px;
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.5), 0 20px 40px rgba(0, 0, 0, 0.8);
    padding: 35px 25px 25px;
}

.sticky-promo.state-modal .sticky-promo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.sticky-promo.state-modal .sticky-logo {
    font-size: 38px;
    font-family: 'Arial Black', Impact, sans-serif;
    letter-spacing: 1px;
}

.sticky-promo.state-modal .sticky-logo span {
    color: #00e5ff;
}

.sticky-promo.state-modal .sticky-hot {
    font-size: 11px;
    color: #ffd166;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: block;
}

.sticky-promo.state-modal .sticky-text {
    font-size: 16px;
    color: #e0f2fe;
    line-height: 1.4;
}

.sticky-promo.state-modal .sticky-text strong {
    color: #ffd166;
    font-size: 20px;
    display: block;
    margin-top: 4px;
}

.sticky-promo.state-modal .sticky-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    text-align: center;
    margin-top: 5px;
}

.sticky-promo.state-modal .sticky-toggle-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 6px;
    padding: 5px 10px;
}

/* 2. СОСТОЯНИЕ: ПРИКРЕПЛЕННЫЙ БАР ВНИЗУ */
.sticky-promo.state-docked {
    top: auto !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(0) !important;
    width: 90%;
    max-width: 960px;
    background: linear-gradient(90deg, #071a33 0%, #004d80 50%, #00a8cc 100%);
    border: 2px solid #00e5ff;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -8px 25px rgba(0, 229, 255, 0.35);
    padding: 0;
}

.sticky-promo.state-docked .sticky-promo-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 25px;
    gap: 15px;
}

.sticky-promo.state-docked .sticky-logo {
    font-size: 22px;
    font-family: 'Arial Black', Impact, sans-serif;
}

.sticky-promo.state-docked .sticky-logo span {
    color: #00e5ff;
}

.sticky-promo.state-docked .sticky-hot {
    font-size: 10px;
    color: #ffd166;
    font-weight: 800;
    display: block;
}

.sticky-promo.state-docked .sticky-text {
    font-size: 14px;
    color: #e0f2fe;
}

.sticky-promo.state-docked .sticky-text strong {
    color: #ffd166;
}

.sticky-promo.state-docked .sticky-btn {
    width: auto;
    padding: 10px 22px;
    font-size: 13px;
}

.sticky-promo.state-docked .sticky-toggle-btn {
    position: absolute;
    top: -27px;
    right: 20px;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

/* 3. СОСТОЯНИЕ: СВЕРНУТ В ПОЛОСКУ ВНИЗУ */
.sticky-promo.state-docked.state-collapsed {
    transform: translateX(-50%) translateY(calc(100% - 32px)) !important;
}

/* Логотип-картинка для всплывающего баннера */
.sticky-logo-img {
    display: block;
    height: auto;
    object-fit: contain;
}

/* Размер логотипа в центре экрана (модалка) */
.sticky-promo.state-modal .sticky-logo-img {
    max-width: 180px;
    max-height: 45px;
    margin: 0 auto;
}

/* Размер логотипа на прикрепленной полосе внизу (docked) */
.sticky-promo.state-docked .sticky-logo-img {
    max-width: 110px;
    max-height: 28px;
}

/* Курсор-рука при наведении на рекламные баннеры и их элементы */
.sidebar .ad-banner-link,
.sidebar .ad-banner-link *,
.ad-sidebar-promo,
.sidebar-banner-img,
.ad-bottom-promo,
.ad-bottom-promo * {
    cursor: pointer !important;
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .ad-top-promo {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .ad-offer {
        flex-direction: column;
        gap: 5px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .ad-bottom-promo,
    .footer-bottom-flex {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .sticky-promo.state-docked .sticky-promo-content {
        flex-direction: column;
        text-align: center;
        padding: 12px;
        gap: 8px;
    }

    .ad-top-slide {
        flex-direction: column;
        padding: 20px 35px 25px;
        gap: 12px;
        text-align: center;
    }

    .sidebar .ad-banner-link {
        position: static;
        /* На смартфонах баннер просто встает под новостями */
    }
}