/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: #f5f0e1;
    color: #333;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* 故事书样式 */
.storybook {
    width: 100%;
    max-width: 800px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

/* 页面样式 */
.page {
    display: none;
    width: 100%;
    min-height: 600px;
    padding: 30px;
    position: relative;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 封面样式 */
.cover {
    background: linear-gradient(135deg, #ffd89b 0%, #ffb347 100%);
    text-align: center;
    padding: 50px 30px;
}

.cover h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2.5rem;
    color: #8b4513;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.cover-image {
    width: 80%;
    max-width: 300px;
    margin: 0 auto 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.cover-image img {
    width: 100%;
    height: auto;
    display: block;
}

.author {
    font-size: 1.2rem;
    color: #8b4513;
    margin-top: 20px;
}

/* 内容样式 */
.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-container {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.image-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px;
    font-size: 1.2rem;
    text-align: center;
}

.story-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.story-text p {
    margin-bottom: 15px;
}

/* 音频播放器样式 */
.audio-player {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.play-btn {
    background-color: #ff9800;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.play-btn:hover {
    background-color: #f57c00;
    transform: scale(1.05);
}

.play-btn .pause-icon {
    display: none;
}

.play-btn.playing .play-icon {
    display: none;
}

.play-btn.playing .pause-icon {
    display: inline;
}

/* 页面控制按钮 */
.page-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.prev-btn, .next-btn, .restart-btn {
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prev-btn:hover, .next-btn:hover, .restart-btn:hover {
    background-color: #388e3c;
    transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .cover h1 {
        font-size: 2rem;
    }
    
    .story-text {
        font-size: 1rem;
    }
    
    .image-text {
        font-size: 1rem;
    }
    
    .page {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .cover h1 {
        font-size: 1.8rem;
    }
    
    .page-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .prev-btn, .next-btn, .restart-btn {
        width: 100%;
    }
}