/* 世界建筑旅行绘本样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.storybook-container {
    max-width: 1200px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    min-height: 80vh;
}

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

.page.active {
    display: block;
}

/* 封面页样式 */
.cover-page {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cover-content {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 15px;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.age-info {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.start-btn {
    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;
    animation: fadeInUp 1s ease-out 0.9s both;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 107, 107, 0.4);
}

/* 故事页面样式 */
.story-page {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.page-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    height: 100%;
    align-items: center;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.story-image:hover {
    transform: scale(1.05);
}

.text-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.text-container h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

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

.learning-box {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
}

.learning-box h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.learning-box h3:before {
    content: "💡";
    margin-right: 10px;
    font-size: 1.5rem;
}

.learning-box p {
    font-size: 1rem;
    line-height: 1.6;
}

/* 结束页样式 */
.end-page {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.end-content {
    color: #2c3e50;
}

.end-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #e17055;
}

.summary {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.summary h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.summary ul {
    list-style: none;
    text-align: left;
}

.summary li {
    font-size: 1.2rem;
    margin: 10px 0;
    padding: 10px;
    background: rgba(116, 185, 255, 0.1);
    border-radius: 10px;
    border-left: 4px solid #74b9ff;
}

.restart-btn {
    background: linear-gradient(45deg, #00b894, #00cec9);
    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(0, 184, 148, 0.3);
}

.restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 184, 148, 0.4);
}

/* 控制按钮样式 */
.controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.control-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.audio-controls {
    display: flex;
    gap: 10px;
}

.audio-btn {
    background: linear-gradient(45deg, #fd79a8, #e84393);
}

.stop-btn {
    background: linear-gradient(45deg, #ff7675, #d63031);
}

/* 页面指示器 */
.page-indicator {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    color: #2c3e50;
}

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

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .page {
        padding: 20px;
    }
    
    .page-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .text-container h2 {
        font-size: 1.5rem;
    }
    
    .story-text {
        font-size: 1rem;
    }
    
    .controls {
        bottom: 20px;
        padding: 10px 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .control-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .page-indicator {
        top: 20px;
        right: 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .page-content {
        gap: 15px;
    }
    
    .text-container {
        padding: 20px;
    }
    
    .controls {
        gap: 8px;
    }
    
    .control-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .audio-controls {
        gap: 5px;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }
    
    .storybook-container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .controls,
    .page-indicator {
        display: none;
    }
    
    .page {
        display: block !important;
        page-break-after: always;
        min-height: auto;
    }
    
    .page:last-child {
        page-break-after: avoid;
    }
}