/* 基本重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 悬浮图片容器通用样式 */
.floating-container {
    display: none; /* 初始隐藏，根据媒体查询显示 */
    position: fixed;
    z-index: 999;
    bottom: 20px; /* 设置容器底部位置 */
    /* 改为偏右一些，可以用 right，而不是 left:50% */
    right: 5%; /* 让容器靠右一些，百分比根据需要调整 */
    /* 也可以用 left: auto, right: 10% */
    transform: translateX(0); /* 不再居中偏移，偏右独立控制 */
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 10px;
    cursor: move;
    display: flex; /* 使用 flexbox 布局 */
    flex-direction: column; /* 垂直排列 */
    gap: 10px; /* 设置广告之间的间距 */
    max-width: 80%; /* 最大宽度自适应 */
}

.floating-image {
    width: 60px; /* 缩小到原有一半，原120px改为60px */
    flex-shrink: 0; /* 防止缩小 */
}

.floating-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.floating-image img:hover {
    transform: scale(1.05); /* 鼠标悬停时轻微放大 */
}

/* 在大屏幕上显示悬浮图片 */
@media screen and (min-width: 768px) {
    .floating-container {
        display: flex; /* 在大屏幕上显示容器 */
    }
}

/* 响应式调整 */
@media screen and (max-width: 767px) {
    .floating-container {
        right: 5%;
        bottom: 10px;
    }
    
    .floating-image {
        width: 50px;
    }
}

/* 暗黑模式支持 */
@media (prefers-color-scheme: dark) {
    .floating-container {
        background: rgba(30, 41, 59, 0.95);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(74, 85, 104, 0.5);
        backdrop-filter: blur(10px);
    }
    
    .floating-image img {
        filter: brightness(0.95);
        transition: transform 0.3s ease, filter 0.3s ease;
    }
    
    .floating-image img:hover {
        transform: scale(1.05);
        filter: brightness(1.05);
    }
}