/* 悬浮广告样式 */
.floating-ad-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: 10px;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideUp 0.5s ease-in-out;
    box-sizing: border-box;
}

@keyframes slideUp {
    from {
        bottom: -150px;
        opacity: 0;
    }
    to {
        bottom: 0;
        opacity: 1;
    }
}

.floating-ad-container.hidden {
    display: none;
}

.floating-ad-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.floating-ad-close {
    position: absolute;
    top: -12px;
    right: 8px;
    background-color: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    padding: 0;
    z-index: 1000;
}

.floating-ad-close:hover {
    background-color: #ff3838;
}

.floating-ad-container img {
    max-width: 100%;
    height: auto;
    display: block;
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .floating-ad-container {
        padding: 8px;
        min-height: auto;
    }

    .floating-ad-content {
        width: 100%;
    }

    .floating-ad-close {
        width: 32px;
        height: 32px;
        font-size: 16px;
        top: -16px;
        right: 4px;
    }

    .floating-ad-container img {
        width: 100% !important;
        height: auto !important;
    }
}

/* 与页面内容的间距 */
body.has-floating-ad {
    padding-bottom: 150px;
}

@media (max-width: 768px) {
    body.has-floating-ad {
        padding-bottom: 140px;
    }
}
