/* 相册容器 */
.album-container {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 20px;
}

/* 翻页书本容器 */
#flipbook {
    width: 1200px;
    height: 600px;
    margin: 0 auto;
}

/* 页面样式 */
.page {
    width: 600px;
    height: 600px;
    background: #fff;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* 移动端单页模式 */
.mobile-mode #flipbook {
    width: 100vw;
    height: 70vh;
    max-width: 400px;
}

.mobile-mode .page {
    width: 100%;
    height: 70vh;
    max-width: 400px;
}

/* 移动端隐藏导航按钮 */
.mobile-mode .nav-button {
    display: none !important;
}

/* 页面图片 */
.page img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 页面标题 */
.page-title {
    position: absolute;
    bottom: 20px;
    padding-bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    color: #333;
    font-weight: bold;
    text-align: center;
}

/* 加载中样式 */
.loading {
    display: flex;
    gap: 15px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #666;
    width: 100%;
    height: 100%;
    background-color: #fff;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}



@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-wrapper {
    z-index: 99999;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    gap: 16px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #666;
    font-size: 16px;
    font-weight: bold;
    background: rgba(255, 255, 255, 1);
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* 导航按钮 */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #333;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-button:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.nav-button:active {
    transform: translateY(-50%) scale(0.95);
}

.prev-btn {
    left: -80px;
}

.next-btn {
    right: -80px;
}

/* 页码显示 */
.page-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 封面页特殊样式 */
.cover-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cover-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
}

.cover-subtitle {
    font-size: 18px;
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 1300px) {
    .album-container {
        padding: 10px;
    }
    
    #flipbook {
        width: 1000px;
        height: 500px;
    }
    
    .page {
        width: 500px;
        height: 500px;
    }
}

@media (max-width: 1100px) {
    #flipbook {
        width: 800px;
        height: 400px;
    }
    
    .page {
        width: 400px;
        height: 400px;
    }
}

/* 平板端 - 仍然使用双页模式 */
@media (max-width: 900px) and (min-width: 769px) {
    #flipbook {
        width: 700px;
        height: 350px;
    }
    
    .page {
        width: 350px;
        height: 350px;
    }
    
    .nav-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .prev-btn {
        left: -60px;
    }
    
    .next-btn {
        right: -60px;
    }
}

/* 移动端 - 单页模式 */
@media (max-width: 768px) {
    
    .album-container {
        width: 100%;
    }
    
    /* 移动端单页样式会通过JavaScript动态添加 .mobile-mode 类来控制 */
    
    .page-title {
        font-size: 14px;
        bottom: 15px;
    }
    
    .cover-title {
        font-size: 28px;
    }
    
    .cover-subtitle {
        font-size: 16px;
    }
    
    /* 移动端隐藏导航按钮 */
    .nav-button {
        display: none;
    }

    .page img{
        max-width: 100%;
        max-height: unset;
        width: 100%;
        height: auto;
    }
}

/* Turn.js 相关样式 */
.turn-page {
    background-color: white;
}

.turn-page img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 阴影效果 */
.hard {
    background: #ccc !important;
    color: #333;
    border: solid 1px #999;
}

.odd {
    background-image: -webkit-linear-gradient(left, #fff 95%, #ddd 100%);
    background-image: -moz-linear-gradient(left, #fff 95%, #ddd 100%);
    background-image: -o-linear-gradient(left, #fff 95%, #ddd 100%);
    background-image: -ms-linear-gradient(left, #fff 95%, #ddd 100%);
}

.even {
    background-image: -webkit-linear-gradient(right, #fff 95%, #ddd 100%);
    background-image: -moz-linear-gradient(right, #fff 95%, #ddd 100%);
    background-image: -o-linear-gradient(right, #fff 95%, #ddd 100%);
    background-image: -ms-linear-gradient(right, #fff 95%, #ddd 100%);
}

.page-wrapper[page="1"] .page{
    background-color: #9acfff !important;
}
.page-wrapper[page="1"]::after{
    content: "电子相册";
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 40px;
    color: #fff;
    font-weight: bold;
    justify-content: center;
    align-items: center;
}
.no-tips .page-wrapper[page="1"]::after{
    display: none;
}