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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

header p {
    font-size: 16px;
    opacity: 0.9;
}

main {
    padding: 30px 20px;
}

#story-content {
    margin-bottom: 40px;
}

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

.story-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.story-text {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 15px;
}

.story-text p {
    margin-bottom: 15px;
}

.scenes-container {
    margin-bottom: 30px;
}

.scene-item {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

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

.scene-description {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
    margin-bottom: 10px;
}

.scene-english {
    font-size: 14px;
    line-height: 1.6;
    color: #888;
    font-style: italic;
    margin-bottom: 15px;
}

.audio-player {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.audio-control {
    width: 100%;
}

.audio-label {
    font-size: 12px;
    color: #999;
}

.download-section {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 30px;
}

.download-section h2 {
    font-size: 22px;
    margin-bottom: 10px;
    color: #333;
}

.download-section p {
    color: #666;
    margin-bottom: 20px;
}

#qrcode-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode-container img {
    max-width: 200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
}

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

.download-btn:active {
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
}

/* 移动端优化 */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 15px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }
    
    header {
        padding: 30px 15px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    header p {
        font-size: 14px;
    }
    
    main {
        padding: 20px 15px;
    }
    
    .story-title {
        font-size: 20px;
    }
    
    .story-text {
        font-size: 14px;
        line-height: 1.8;
    }
    
    .scene-item {
        margin-bottom: 25px;
    }
    
    .scene-image {
        border-radius: 12px;
    }
    
    .scene-description {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .scene-english {
        font-size: 13px;
    }
    
    .audio-player {
        gap: 8px;
    }
    
    .audio-control {
        height: 40px;
    }
    
    .download-btn {
        padding: 12px 30px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }
    
    .download-section {
        padding: 20px 15px;
    }
    
    #qrcode-container img {
        max-width: 180px;
    }
    
    /* 移动端按钮触摸优化 */
    button {
        min-height: 44px; /* iOS 推荐的最小触摸目标 */
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
    }
    
    /* 移动端错误提示优化 */
    .error {
        padding: 30px 20px;
    }
    
    .error button {
        min-height: 44px;
        padding: 12px 24px;
        font-size: 16px;
    }
}

