:root {
    --adsterra-desktop-container-width: 760px;
    --adsterra-mobile-container-width: 320px;
    --adsterra-container-padding: 8px;
    --adsterra-container-gap: 8px;
    --adsterra-desktop-spacing: 24px;
    --adsterra-mobile-spacing: 20px;
}

.ad-desktop-only,
.ad-banner-middle,
.ad-mobile-banner,
.ad-mobile-only,
.ad-square-desktop,
.ad-skyscraper-left,
.ad-skyscraper-right {
    text-align: center;
    box-sizing: border-box;
}

.ad-desktop-only,
.ad-banner-middle,
.ad-square-desktop,
.ad-skyscraper-left,
.ad-skyscraper-right {
    display: flex;
    flex-direction: column !important;
    justify-content: center;
    align-items: center !important;
    gap: var(--adsterra-container-gap);
    overflow: hidden;
}

.ad-label {
    display: block;
    align-self: center;
    margin: 0 0 2px;
    color: #666;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.5px;
    text-align: center;
    text-transform: uppercase;
}

.adsterra-unit {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

html:root body .adsterra-unit--desktop {
    width: 728px !important;
    min-width: 728px !important;
    max-width: 728px !important;
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
}

html:root body .adsterra-unit--mobile {
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    height: 250px !important;
    min-height: 250px !important;
    max-height: 250px !important;
}

.adsterra-unit iframe {
    display: block;
    flex: 0 0 auto;
    border: 0;
}

.ad-desktop-only,
.ad-banner-middle,
.ad-square-desktop {
    width: var(--adsterra-desktop-container-width) !important;
    max-width: 100vw !important;
    min-height: 0 !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: var(--adsterra-container-padding) !important;
    border: 1px solid rgba(42, 71, 94, 0.9);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(27, 40, 56, 0.96), rgba(23, 26, 33, 0.98));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.ad-mobile-banner,
.ad-mobile-only {
    display: none;
}

.main-layout-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.main-content-column {
    position: relative;
    z-index: 10;
    width: 100%;
    min-width: 0;
}

.ad-skyscraper-left,
.ad-skyscraper-right {
    position: static;
    width: var(--adsterra-desktop-container-width) !important;
    max-width: 100vw !important;
    min-height: 0 !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: var(--adsterra-container-padding) !important;
    border: 1px solid #2a475e;
    border-radius: 16px;
    background: #1b2838;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
    html:root body .ad-desktop-only,
    html:root body .ad-skyscraper-left,
    html:root body .ad-skyscraper-right,
    html:root body [class*="ad-"]:has(> .adsterra-unit--desktop) {
        display: none !important;
    }

    html:root body .ad-mobile-only,
    html:root body .ad-mobile-hero,
    html:root body [class*="ad-"]:has(> .adsterra-unit--mobile) {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: var(--adsterra-container-gap) !important;
        visibility: visible !important;
        width: var(--adsterra-mobile-container-width) !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        min-height: 0 !important;
        height: auto !important;
        margin-top: var(--adsterra-mobile-spacing) !important;
        margin-right: auto !important;
        margin-bottom: var(--adsterra-mobile-spacing) !important;
        margin-left: auto !important;
        padding: var(--adsterra-container-padding) !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        opacity: 1 !important;
    }
}

@media (min-width: 769px) {
    html:root body .ad-mobile-only,
    html:root body .ad-mobile-hero,
    html:root body [class*="ad-"]:has(> .adsterra-unit--mobile) {
        display: none !important;
    }

    html:root body .ad-desktop-only,
    html:root body .ad-skyscraper-left,
    html:root body .ad-skyscraper-right,
    html:root body [class*="ad-"]:has(> .adsterra-unit--desktop) {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: var(--adsterra-container-gap) !important;
        width: var(--adsterra-desktop-container-width) !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        min-height: 0 !important;
        height: auto !important;
        margin-top: var(--adsterra-desktop-spacing) !important;
        margin-right: auto !important;
        margin-bottom: var(--adsterra-desktop-spacing) !important;
        margin-left: auto !important;
        padding: var(--adsterra-container-padding) !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
}
