/* 广告样式 */
.ad-container {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ad-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ad-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

/* 响应式广告 */
@media (max-width: 768px) {
    .ad-container {
        margin: 10px 0;
        padding: 8px;
    }
    
    /* 移动端专用广告 */
    .ad-mobile {
        display: block;
    }
    
    .ad-desktop-only {
        display: none !important;
    }
}

@media (min-width: 769px) {
    /* 桌面端专用广告 */
    .ad-mobile-only {
        display: none !important;
    }
}

/* 不同位置的广告 */
.ad-header {
    text-align: center;
    margin-bottom: 20px;
}

.ad-sidebar {
    margin-bottom: 15px;
}

.ad-content {
    margin: 20px 0;
    text-align: center;
}

.ad-footer {
    margin-top: 30px;
    text-align: center;
}

/* 广告尺寸 */
.ad-size-auto {
    max-width: 100%;
}

.ad-size-728x90 {
    width: 728px;
    height: 90px;
    max-width: 100%;
}

.ad-size-300x250 {
    width: 300px;
    height: 250px;
    max-width: 100%;
}

.ad-size-160x600 {
    width: 160px;
    height: 600px;
}

/* 动画效果 */
@keyframes adFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ad-animated {
    animation: adFadeIn 0.5s ease-out;
}

/* 关闭按钮 */
.ad-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.ad-close:hover {
    background: rgba(0,0,0,0.7);
}