/* 夏洛的网 - 阅读之旅 样式 */

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

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #fef9e7 0%, #f5e6d3 100%);
    min-height: 100vh;
    color: #5d4e37;
    line-height: 1.6;
}

/* 页面切换 */
.page {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

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

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

/* 按钮样式 */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.5);
}

.btn-secondary {
    background: white;
    color: #5d4e37;
    border: 2px solid #d4c5a9;
}

.btn-secondary:hover {
    background: #f5e6d3;
}

/* 欢迎页 */
.welcome-container {
    text-align: center;
    max-width: 500px;
}

.book-cover {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.cover-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-emoji {
    font-size: 80px;
}

.book-title {
    font-size: 36px;
    color: #8b4513;
    margin-bottom: 10px;
}

.book-author {
    font-size: 16px;
    color: #999;
}

.welcome-text {
    font-size: 18px;
    margin-bottom: 30px;
    color: #666;
}

/* 测验页 */
.quiz-container {
    max-width: 600px;
    width: 100%;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #f0e6d3;
    border-radius: 5px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f39c12 0%, #e67e22 100%);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.quiz-content {
    min-height: 300px;
}

.question-card {
    margin-bottom: 20px;
}

.question-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #8b4513;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    padding: 12px 20px;
    border: 2px solid #e0d5c1;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 16px;
}

.option-btn:hover {
    border-color: #f39c12;
    background: #fef9e7;
}

.option-btn.selected {
    border-color: #f39c12;
    background: #fef9e7;
    font-weight: 600;
}

.option-btn.correct {
    border-color: #27ae60;
    background: #e8f8f0;
}

.option-btn.wrong {
    border-color: #e74c3c;
    background: #fdeaea;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* 感想页 */
.reflection-container {
    max-width: 600px;
    width: 100%;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.reflection-container h2 {
    text-align: center;
    color: #8b4513;
    margin-bottom: 10px;
}

.reflection-prompt {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #5d4e37;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0d5c1;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f39c12;
}

/* 完成页 */
.complete-container {
    text-align: center;
    max-width: 500px;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.complete-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.complete-container h2 {
    color: #8b4513;
    margin-bottom: 10px;
}

.complete-container p {
    color: #666;
    margin-bottom: 25px;
}

.result-summary {
    background: #fef9e7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.result-item {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #e0d5c1;
}

.result-item:last-child {
    border-bottom: none;
}

.complete-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* 装饰元素 */
.decoration {
    position: fixed;
    font-size: 30px;
    opacity: 0.3;
    pointer-events: none;
}

.decoration-1 { top: 10%; left: 5%; }
.decoration-2 { top: 20%; right: 8%; }
.decoration-3 { bottom: 15%; left: 10%; }
.decoration-4 { bottom: 25%; right: 5%; }

/* 读后感和视频 Prompt 输出 */
.reflection-output,
.video-prompt-output {
    margin-top: 25px;
    text-align: left;
}

.reflection-output h3,
.video-prompt-output h3 {
    color: #8b4513;
    margin-bottom: 10px;
    font-size: 18px;
}

.prompt-hint {
    color: #999;
    font-size: 14px;
    margin-bottom: 10px;
}

.output-box {
    position: relative;
    background: #fef9e7;
    border: 2px solid #e0d5c1;
    border-radius: 12px;
    padding: 15px;
    padding-bottom: 50px;
}

.output-content {
    font-size: 14px;
    line-height: 1.8;
    color: #5d4e37;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.copy-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

.copy-btn.copied {
    background: #27ae60;
}

/* 响应式 */
@media (max-width: 600px) {
    .book-title {
        font-size: 28px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .quiz-container,
    .reflection-container,
    .complete-container {
        padding: 20px;
    }
}
