/* 柯蓝的奇幻森林冒险 - 样式表 */

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

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

/* 标题样式 */
.header {
    background-color: #4a9eff;
    color: white;
    text-align: center;
    padding: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="20" cy="20" r="10" fill="rgba(255,255,255,0.2)"/><circle cx="60" cy="60" r="15" fill="rgba(255,255,255,0.2)"/><circle cx="90" cy="30" r="8" fill="rgba(255,255,255,0.2)"/></svg>');
    z-index: 1;
    opacity: 0.6;
}

/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 故事书样式 */
.storybook {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    margin-bottom: 40px;
}

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

.page.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 封面页样式 */
.cover {
    text-align: center;
    background: linear-gradient(135deg, #a1d0ff, #7ab9ff);
    color: #fff;
    padding: 50px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

.cover h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.cover p {
    font-size: 1.5rem;
    margin-bottom: 40px;
}

.cover-image {
    width: 250px;
    height: 250px;
    background-color: #fff;
    border-radius: 50%;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.start-button {
    background-color: #ff9f43;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.start-button:hover {
    background-color: #ff8a1e;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 内容页样式 */
.page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

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

.page-text {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.page-text p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-indent: 2em;
}

/* 导航按钮样式 */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    width: 100%;
    max-width: 800px;
}

.nav-button {
    background-color: #4a9eff;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-button:hover {
    background-color: #3a8eef;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

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

.nav-button i {
    margin: 0 5px;
}

/* 音频控制样式 */
.audio-control {
    margin-top: 20px;
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.audio-button {
    background-color: #ff9f43;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.audio-status {
    font-size: 0.9rem;
    color: #666;
}

/* 页码样式 */
.page-number {
    position: absolute;
    bottom: 20px;
    right: 30px;
    font-size: 1rem;
    color: #999;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .cover h2 {
        font-size: 2.5rem;
    }
    
    .cover p {
        font-size: 1.2rem;
    }
    
    .page {
        padding: 20px;
    }
    
    .page-text p {
        font-size: 1rem;
    }
    
    .navigation {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .nav-button {
        width: 100%;
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* 装饰元素 */
.decoration {
    position: absolute;
    z-index: -1;
    opacity: 0.1;
}

.decoration.leaf1 {
    top: 50px;
    left: 50px;
    width: 100px;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,10 C70,25 90,40 50,90 C10,40 30,25 50,10 Z" fill="%234a9eff"/></svg>') no-repeat;
    transform: rotate(45deg);
}

.decoration.leaf2 {
    bottom: 70px;
    right: 70px;
    width: 80px;
    height: 80px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,10 C70,25 90,40 50,90 C10,40 30,25 50,10 Z" fill="%23ff9f43"/></svg>') no-repeat;
    transform: rotate(-30deg);
}

/* 页面切换效果 */
.page-transition {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-exit {
    opacity: 0;
    transform: translateX(-50px);
}

.page-enter {
    opacity: 0;
    transform: translateX(50px);
}