/* 基础样式 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 20px;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* 轮播容器 */
.slideshow-container {
    position: relative;
    width: 600px;
    height: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

/* 图片样式 */
.slideshow-container img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.8s ease-in-out;
    opacity: 0;
}

.slideshow-container img.active {
    opacity: 1;
}

/* 广告容器 */
.ad-container {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 560px;
    height: 150px;
    z-index: 5;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#ad-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

#ad-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.5s ease;
    background: white;
    padding: 10px;
    box-sizing: border-box;
}

#ad-image:hover {
    opacity: 0.9;
}

/* 控制按钮 */
.controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 10;
}

.controls button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.controls button:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 640px) {
    .slideshow-container {
        width: 100%;
        height: 100vw;
        max-height: 600px;
    }
    
    .ad-container {
        width: 90%;
        height: 120px;
        bottom: 60px;
    }
    
    .controls {
        bottom: 10px;
    }
    
    body {
        padding: 0;
        min-height: auto;
    }
}