body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    /* 确保内容不超出视口 */
    overflow: hidden;
    /* 添加全局无边框设置 */
    border: none;
}

* {
    /* 全局设置所有元素无边框 */
    border: none;
    box-sizing: border-box;
    outline: none;
}

.photo-album {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    /* 确保相册不超出屏幕 */
    height: 100%;
}

.slides {
    width: 100%;
    /* 保持全屏高度 */
    height: 100vh;
    position: relative;
    display: flex;
    transition: transform 1s ease-in-out;
}

.slides img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 改为contain以确保图片完全可见，两侧可能会有补白 */
    object-fit: contain;
    /* 添加黑色背景，图片两侧会显示黑色补白 */
    background-color:#eeedeb;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.slides img.active {
    opacity: 1;
}

.slides .page {
    display: none;
}

.slides .page.active {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.controls {
    position: fixed;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.controls button {
    pointer-events: auto;
    background: none;
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 15px 10px;
    opacity: 0.7;
    transition: all 0.3s;
    position: relative;
}

#prev::before {
    content: "⟨";
    font-size: 2.5rem;
    margin-right: -0.3em; /* 向左调整位置 */
}

#next::before {
    content: "⟩";
    font-size: 2.5rem;
    margin-right: -0.6em; /* 向左调整位置 */
}

.controls button:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 滑动提示动画 */
@keyframes slideHintLeft {
    0% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
    100% { transform: translateX(0); }
}

@keyframes slideHintRight {
    0% { transform: translateX(0); }
    50% { transform: translateX(10px); }
    100% { transform: translateX(0); }
}

#prev {
    animation: slideHintLeft 1.5s ease-in-out infinite;
}

#next {
    animation: slideHintRight 1.5s ease-in-out infinite;
}

/* 调整滑动提示文字位置 */
.swipe-hint {
    position: absolute;
    bottom: 30px; /* 调高位置以避开页脚 */
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
    padding: 8px 15px;
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 5; /* 确保在图片上方但不会挡住控制按钮 */
}

.pagination {
    text-align: center;
    margin-top: 20px;
}

/* 修改页码显示位置 */
.page-number {
    position: absolute;
    bottom: 65px; /* 调高位置以避开滑动提示 */
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 15px;
    z-index: 5;
}

@keyframes slide {
    0%, 20% { transform: translateX(0); }
    25%, 45% { transform: translateX(-100%); }
    50%, 70% { transform: translateX(-200%); }
    75%, 100% { transform: translateX(0); }
}

/* 修改播放控制按钮样式 */
.play-control {
    position: fixed;
    top: 51%;          
    left: 50%;         
    transform: translate(-50%, -50%); /* 确保按钮居中 */
    z-index: 999;       
    background: none;
    border: none;       
    border-radius: 50%; 
    color: white;
    font-size: 3rem;    /* 比原来大一倍，比之前减小 */
    line-height: 1;     
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s;
    padding: 0;         
    width: 75px;        /* 比原来大一倍，比之前减小 */
    height: 75px;       /* 比原来大一倍，比之前减小 */
    display: flex;      
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.play-control:hover {
    opacity: 1;
    /* 修改transform，保持居中位置不变 */
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 10px rgba(255,255,255,0.3); 
}

/* 使用更通用的CSS三角形替代Unicode字符，解决微信兼容性问题 */
.play-control::before {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 24px; /* 调整为扩大一倍的尺寸 */
    border-color: transparent transparent transparent white;
}

.play-control.playing::before {
    /* 创建暂停图标 */
    width: 20px;  /* 调整为扩大一倍的尺寸 */
    height: 24px; /* 调整为扩大一倍的尺寸 */
    border-style: double;
    border-width: 0 0 0 20px; /* 调整为扩大一倍的尺寸 */
    border-color: white;
    margin-left: 10px; /* 调整为扩大一倍的尺寸 */
}

/* 添加页脚样式 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 5px 0;
    font-size: 0.8rem;
    z-index: 5;
}

/* 响应式布局调整 */
@media screen and (max-width: 768px) {
    /* 平板设备 */
    .controls button {
        font-size: 1.8rem;
        padding: 10px 5px;
    }

    .play-control {
        /* 保持居中，调整大小为原来的一倍半 */
        width: 60px;  /* 调整尺寸 */
        height: 60px; /* 调整尺寸 */
        font-size: 2.4rem; /* 调整尺寸 */
    }
    
    .play-control:hover {
        /* 修改transform，保持居中位置不变 */
        transform: translate(-50%, -50%) scale(1.1);
    }

    .play-control::before {
        border-width: 12px 0 12px 19px;  /* 调整尺寸 */
    }
    
    .play-control.playing::before {
        width: 16px;  /* 调整尺寸 */
        height: 20px; /* 调整尺寸 */
        border-width: 0 0 0 16px; /* 调整尺寸 */
        margin-left: 10px; /* 调整尺寸 */
    }

    .page-number {
        font-size: 0.9rem;
        padding: 4px 12px;
    }

    .swipe-hint {
        font-size: 0.9rem;
        bottom: 50px;
    }
}

@media screen and (max-width: 480px) {
    /* 手机设备 */
    .slides {
        /* 确保在手机上也是全屏显示 */
        height: 100vh;
    }
    
    .controls button {
        font-size: 1.5rem;
        padding: 8px 3px;
    }

    .play-control {
        /* 调整尺寸 */
        width: 50px;  /* 调整尺寸 */
        height: 50px; /* 调整尺寸 */
        font-size: 2rem; /* 调整尺寸 */
    }
    
    .play-control:hover {
        /* 修改transform，保持居中位置不变 */
        transform: translate(-50%, -50%) scale(1.1);
    }

    .play-control::before {
        border-width: 10px 0 10px 16px;  /* 调整尺寸 */
    }
    
    .play-control.playing::before {
        width: 14px;  /* 调整尺寸 */
        height: 16px; /* 调整尺寸 */
        border-width: 0 0 0 14px; /* 调整尺寸 */
        margin-left: 12px; /* 调整尺寸 */
    }

    .page-number {
        font-size: 0.8rem;
        padding: 3px 10px;
        bottom: 60px; /* 调整在手机上的位置 */
    }

    .swipe-hint {
        font-size: 0.7rem;
        bottom: 30px; /* 为页脚留出空间 */
        padding: 4px 10px;
    }
    
    .footer {
        padding: 3px 0;
        font-size: 0.7rem;
    }
}

@media screen and (min-width: 1200px) {
    /* 大屏设备 */
    .controls button {
        font-size: 2.5rem;
        padding: 20px 15px;
    }

    .play-control {
        width: 90px; /* 调整尺寸 */
        height: 90px; /* 调整尺寸 */
        font-size: 3.6rem; /* 调整尺寸 */
    }
    
    .play-control:hover {
        /* 修改transform，保持居中位置不变 */
        transform: translate(-50%, -50%) scale(1.1);
    }

    .page-number {
        font-size: 1.2rem;
        padding: 6px 20px;
    }
}
