/* 添加新的动画关键帧 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 增强头部样式 */
.album-header {
    text-align: center;
    padding: 40px 0;
    animation: fadeIn 1s ease;
    position: relative;
    overflow: hidden;
}

.album-header h1 {
    font-size: 3.5rem;
    color: #fff;
    text-shadow:
            0 0 10px rgba(255, 107, 157, 0.8),
            0 0 20px rgba(255, 107, 157, 0.6),
            0 0 30px rgba(255, 107, 157, 0.4);
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
    background: linear-gradient(90deg, #ff9a9e, #fad0c4, #a18cd1, #fbc2eb);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 4s ease infinite;
}

/* 炫酷的分页控件 */
.album-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    position: relative;
}

.album-controls::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}

.nav-btn {
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
    position: relative;
    overflow: hidden;
}

.nav-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(255, 107, 157, 0.6);
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.5s;
}

.nav-btn:hover::before {
    left: 100%;
}

#pageInfo {
    color: white;
    font-weight: bold;
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 25px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* 炫酷照片网格 */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    perspective: 1000px;
}

.photo-item {
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
            0 10px 30px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(255, 107, 157, 0.3);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    aspect-ratio: 1/1;
    background: linear-gradient(45deg, #fff, #fff9fc);
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
}

.photo-item:hover {
    transform: translateY(-15px) scale(1.05) rotateY(5deg);
    box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.4),
            0 0 30px rgba(255, 107, 157, 0.5);
}

.photo-item:nth-child(even):hover {
    transform: translateY(-15px) scale(1.05) rotateY(-5deg);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s ease;
    border-radius: 20px;
}

.photo-item:hover img {
    transform: scale(1.15);
    filter: brightness(1.1) contrast(1.1);
}

/* 照片项发光效果 */
.photo-item::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff9a9e, #fad0c4, #a18cd1, #fbc2eb);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: 400%;
    animation: shimmer 3s linear infinite;
}

.photo-item:hover::after {
    opacity: 1;
}

/* 加载动画增强 */
.loading {
    text-align: center;
    padding: 60px;
    color: white;
    display: none;
}

.spinner {
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid #ff9a9e;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite, pulse 1.5s ease-in-out infinite;
    margin: 0 auto 25px;
    box-shadow: 0 0 20px rgba(255, 154, 158, 0.6);
}

/* 模态框增强 */
.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 800px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 20px;
    animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 50px rgba(255, 107, 157, 0.8);
    border: 5px solid white;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.close-btn:hover {
    color: #ff6b9d;
    transform: rotate(90deg) scale(1.2);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .album-header h1 {
        font-size: 2.5rem;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }

    .nav-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
}
