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

body {
    font-family: 'ZCOOL QingKe HuangYou', sans-serif;
    background-color: #f9f7e8;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #ffeb99;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 3rem;
    color: #ff6b6b;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
}

/* 故事书样式 */
.storybook {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.page {
    padding: 30px;
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 图片容器样式 */
.image-container {
    position: relative;
    text-align: center;
    margin-bottom: 20px;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 音频按钮样式 */
.audio-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.audio-btn:hover {
    background-color: #ff5252;
    transform: scale(1.1);
}

.audio-icon {
    display: inline-block;
}

/* 文本容器样式 */
.text-container {
    font-size: 1.2rem;
    line-height: 1.8;
    padding: 20px;
    background-color: #f9f7e8;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.text-container p:last-child {
    margin-bottom: 0;
}

/* 页面导航样式 */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.nav-btn {
    background-color: #4ecdc4;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'ZCOOL KuaiLe', sans-serif;
}

.nav-btn:hover:not([disabled]) {
    background-color: #36b5ac;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.page-number {
    font-size: 1.2rem;
    color: #666;
}

/* 控制按钮样式 */
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.controls button {
    background-color: #ff9a8b;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'ZCOOL KuaiLe', sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.controls button:hover {
    background-color: #ff8177;
    transform: translateY(-2px);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .page-content {
        flex-direction: row;
    }
    
    .image-container {
        flex: 1;
        margin-bottom: 0;
    }
    
    .text-container {
        flex: 1;
    }
}

@media (max-width: 767px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .page {
        padding: 20px;
    }
    
    .text-container {
        font-size: 1rem;
    }
    
    .nav-btn {
        padding: 8px 15px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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