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

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

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 50%, #FFE4B5 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* 页面样式 */
.page {
    display: none;
    min-height: 80vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: block;
}

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

/* 标题页样式 */
#title-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    color: white;
    text-align: center;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.title-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.age-info {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

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

.start-btn:hover {
    background: #FF5252;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* 场景页面样式 */
.page-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
    align-items: start;
}

.image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

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

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

.text-content {
    padding: 20px;
}

.text-content h2 {
    color: #2C3E50;
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 3px solid #3498DB;
    padding-bottom: 10px;
}

.text-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #34495E;
    text-align: justify;
}

.fun-fact {
    background: linear-gradient(135deg, #FFE4B5, #F0E68C);
    padding: 15px;
    border-radius: 10px;
    border-left: 5px solid #FF6B6B;
    margin-top: 20px;
    font-size: 1rem;
    color: #2C3E50;
}

.fun-fact strong {
    color: #E74C3C;
}

/* 导航控制 */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.nav-btn {
    background: #3498DB;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.nav-btn:hover {
    background: #2980B9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

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

.page-indicator {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2C3E50;
}

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

.audio-btn {
    background: #E74C3C;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.audio-btn:hover {
    background: #C0392B;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .storybook-container {
        padding: 10px;
    }
    
    .page-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .title-content h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .text-content h2 {
        font-size: 1.5rem;
    }
    
    .text-content p {
        font-size: 1rem;
    }
    
    .navigation {
        padding: 10px 20px;
    }
    
    .nav-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .title-content h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .age-info {
        font-size: 0.9rem;
    }
    
    .start-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
    }
    
    .text-content {
        padding: 15px;
    }
    
    .text-content h2 {
        font-size: 1.3rem;
    }
    
    .navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .page-indicator {
        order: -1;
    }
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }
    
    .navigation,
    .audio-controls {
        display: none;
    }
    
    .page {
        display: block !important;
        page-break-after: always;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .page:last-child {
        page-break-after: avoid;
    }
}