/* БАЗОВЫЙ СБРОС */
body, h1, h2, p {
    margin: 0;
    padding: 0;
}

body {
    background-color: #121212;
    color: #ffffff;
    font-family: 'Segoe UI', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ШАПКА САЙТА (ПК) */
.site-header {
    text-align: center;
    padding: 15px;
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
}

.site-header h1 {
    font-size: 26px;
    color: #e0c0ff;
    text-shadow: 0 0 20px rgba(160, 80, 220, 0.6);
    letter-spacing: 1px;
}

.site-subtitle {
    font-size: 13px;
    color: #a080cc;
    margin-top: 4px;
    font-family: monospace;
}

/* ГЛАВНЫЙ КОНТЕЙНЕР (ПК) */
.main-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
    margin-top: 20px;
    padding: 20px;
    gap: 20px;
}

/* КОЛОНКА С ИГРОЙ */
.game-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 800px;
}

/* ИГРОВОЙ БЛОК (ПК) */
.game-container {
    width: 100%;
    height: 600px;
    background-color: #000000;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
}

.game-container iframe {
    touch-action: none;
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}

/* БЛОК «КАК ИГРАТЬ» */
.how-to-play {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(30, 20, 50, 0.5);
    border: 1px solid rgba(120, 60, 200, 0.2);
    border-radius: 12px;
}

.htp-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 80px;
}

.htp-item span { font-size: 28px; }

.htp-item p {
    font-size: 12px;
    color: #c0a8e0;
    text-align: center;
}

/* БОКОВАЯ РЕКЛАМА (300x250) */
.ad-sidebar {
    width: 300px;
    height: 250px;
    background-color: #1e1e1e;
    border: 1px dashed #444;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.ad-sidebar iframe {
    display: block;
    margin: 0 auto;
}

/* НИЖНИЙ БАННЕР (320x50) */
.ad-bottom {
    width: 320px;
    height: 50px;
    background-color: #1e1e1e;
    border: 1px dashed #444;
    margin: 10px auto 15px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
}

.ad-bottom iframe {
    display: block;
    margin: 0 auto;
}


/* =========================================================
   АДАПТИВНОСТЬ: ВАРИАНТ 2 (ЧИСТАЯ ИГРА НА ВЕСЬ ЭКРАН)
   ========================================================= */
@media (max-width: 1150px) {
    /* 1. Скрываем всё, кроме игры */
    .site-header,
    .ad-sidebar,
    .ad-bottom,
    .how-to-play {
        display: none !important;
    }

    /* 2. Убираем отступы и скролл у страницы */
    body {
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        background-color: #000 !important; /* Черный фон, чтобы сливалось с игрой */
    }

    /* 3. Растягиваем обертку и игру на весь экран */
    .main-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        gap: 0 !important;
        height: 100dvh !important;
        display: flex;
        flex-direction: column;
    }

    .game-column {
        width: 100% !important;
        height: 100dvh !important;
        max-width: 100% !important;
        gap: 0 !important;
    }

    .game-container {
        width: 100% !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #000 !important;
        margin: 0 !important;
    }

    .game-container iframe {
        width: 100% !important;
        height: 100% !important;
    }
}

/* ЖЕСТКОЕ СКРЫТИЕ РЕКЛАМЫ (ДОП. ЗАЩИТА) */
@media (max-width: 1150px) {
    iframe[src*="bauval"],
    div[id*="ad"],
    iframe[id*="ad"] {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
    }
}
