/* 动物认知绘本 - 样式表 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Yuanti SC', 'Yuanti', 'Microsoft YaHei', sans-serif;
    background-color: #fffbf0;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

/* 标题样式 */
h1 {
    text-align: center;
    color: #ff6b6b;
    margin: 20px 0;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 页面样式 */
.page {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    transition: opacity 0.5s ease;
}

.page.active {
    display: flex;
}

/* 图片容器 */
.image-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.page-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* 文本样式 */
.page-text {
    width: 100%;
    max-width: 800px;
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    font-size: 1.2rem;
    line-height: 1.8;
}

/* 导航按钮 */
.nav-buttons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 20px;
}

.nav-btn {
    background-color: #4ecdc4;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background-color: #ff6b6b;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

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

/* 音频按钮 */
.audio-btn {
    background-color: #ffd166;
    color: #333;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.audio-btn:hover {
    background-color: #ffb347;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.audio-btn i {
    font-size: 1.2rem;
}

/* 页码指示器 */
.page-indicator {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
}

.page-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-dot.active {
    background-color: #ff6b6b;
    transform: scale(1.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .page-text {
        font-size: 1rem;
        padding: 15px;
    }
    
    .nav-btn, .audio-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .page {
        padding: 15px;
    }
    
    .page-text {
        padding: 12px;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-btn, .audio-btn {
        width: 100%;
    }
}

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

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

/* 音频播放动画 */
.playing .audio-icon {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}