/**
 * 首页侧边栏广告样式
 * 左右两侧各2个广告位
 */

/* 左侧广告容器 */
.sidebar-ads-left {
    position: fixed;
    left: 20px;
    top: 200px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 右侧广告容器 */
.sidebar-ads-right {
    position: fixed;
    right: 20px;
    top: 200px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 单个广告项 */
.sidebar-ad-item {
    width: 200px;
    height: 150px;
    background: #fff;
    border: 2px solid #FFD700;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-ad-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* 广告标签 */
.sidebar-ad-label {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #FFD700;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 10;
}

/* 广告关闭按钮 */
.sidebar-ad-close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #FFD700;
    color: #FFD700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 12px;
    transition: all 0.2s ease;
}

.sidebar-ad-close:hover {
    background: #FFD700;
    color: #000;
    transform: rotate(90deg);
}

/* 广告iframe */
.sidebar-ad-item iframe {
    width: 1200px;
    height: 900px;
    border: none;
    transform: scale(0.167);
    transform-origin: 0 0;
    pointer-events: none;
    display: block;
    background: #fff;
}

/* 点击遮罩层 */
.sidebar-ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    cursor: pointer;
    z-index: 5;
}

/* 加载状态 */
.sidebar-ad-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 响应式：中等屏幕（宽度小于1400px）- 缩小广告 */
@media (max-width: 1400px) {
    .sidebar-ad-item {
        width: 160px;
        height: 120px;
    }
    
    .sidebar-ad-item iframe {
        width: 1200px;
        height: 900px;
        transform: scale(0.133);
    }
    
    .sidebar-ads-left {
        left: 10px;
    }
    
    .sidebar-ads-right {
        right: 10px;
    }
}

/* 响应式：平板（宽度小于1024px）- 隐藏广告 */
@media (max-width: 1024px) {
    .sidebar-ads-left,
    .sidebar-ads-right {
        display: none;
    }
}

/* 广告位空状态提示 */
.sidebar-ad-empty {
    width: 200px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

