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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* 故事书容器 */
.storybook-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 标题页样式 */
.title-page {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease-out;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.8rem;
    color: #e74c3c;
    margin-bottom: 15px;
    font-weight: 500;
}

.author {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 40px;
}

.start-button {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.3rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(238, 90, 36, 0.3);
    font-weight: 500;
}

.start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(238, 90, 36, 0.4);
}

/* 故事容器 */
.story-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

/* 导航栏 */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-indicator {
    font-size: 1.2rem;
    font-weight: 500;
}

/* 场景容器 */
.scene-container {
    position: relative;
    min-height: 600px;
}

.scene {
    display: none;
    padding: 40px;
    animation: fadeIn 0.6s ease-out;
}

.scene.active {
    display: block;
}

.scene-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* 图片容器 */
.image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.image-container:hover {
    transform: scale(1.02);
}

.scene-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
}

/* 文本容器 */
.text-container {
    padding: 20px;
}

.scene-title {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.scene-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #34495e;
    margin-bottom: 30px;
    text-align: justify;
}

/* 音频控制 */
.audio-controls {
    text-align: center;
}

.play-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.play-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(52, 152, 219, 0.4);
}

.play-btn.playing {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.play-icon {
    margin-right: 8px;
}

/* 结束页 */
.ending-page {
    text-align: center;
    padding: 60px 40px;
    animation: fadeInUp 0.8s ease-out;
}

.ending-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 600;
}

.ending-message {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #34495e;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.ending-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.restart-btn, .share-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.restart-btn {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.3);
}

.share-btn {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
    box-shadow: 0 8px 20px rgba(230, 126, 34, 0.3);
}

.restart-btn:hover, .share-btn:hover {
    transform: translateY(-3px);
}

.restart-btn:hover {
    box-shadow: 0 12px 25px rgba(46, 204, 113, 0.4);
}

.share-btn:hover {
    box-shadow: 0 12px 25px rgba(230, 126, 34, 0.4);
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .storybook-container {
        padding: 10px;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.4rem;
    }
    
    .scene-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .navigation {
        padding: 15px 20px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .scene {
        padding: 20px;
    }
    
    .scene-title {
        font-size: 1.8rem;
    }
    
    .scene-text {
        font-size: 1rem;
    }
    
    .ending-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .restart-btn, .share-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .title-page {
        padding: 40px 20px;
    }
    
    .scene-title {
        font-size: 1.5rem;
    }
    
    .ending-title {
        font-size: 2rem;
    }
    
    .ending-message {
        font-size: 1.1rem;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }
    
    .navigation, .audio-controls, .ending-buttons {
        display: none;
    }
    
    .scene {
        display: block !important;
        page-break-after: always;
    }
    
    .scene:last-child {
        page-break-after: avoid;
    }
}