/* 广告背景遮罩 */
.site-wide-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999998; /* 比广告内容低一层 */
    margin: 0;
    padding: 0;
    pointer-events: none; /* 不响应点击事件 */
}

/* 全站广告样式 */
.site-wide-ad {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999999;
    margin: 0;
    padding: 0;
    width: auto;
    height: auto;
    background-color: transparent;
    display: block;
    /* 确保广告容器不会意外覆盖整个屏幕 */
    max-width: 90%;
    max-height: 90%;
    overflow: visible;
}

/* 移除body类样式，允许页面正常滚动 */
/* body.site-wide-ad-active {
    overflow: hidden;
} */

.site-wide-ad-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.site-wide-ad-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.site-wide-ad-close {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #333;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.site-wide-ad-close:hover {
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: translateX(-50%) scale(1.1);
}

.site-wide-ad-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}
