/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f0f7ff;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.app-container {
    width: 100%;
    max-width: 800px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    min-height: 80vh;
}

/* 屏幕样式 */
.screen {
    display: none;
    padding: 30px 20px;
    text-align: center;
    height: 100%;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* 标题和文本样式 */
h1 {
    color: #4a6bff;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #4a6bff;
    font-size: 2rem;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

/* 吉祥物样式 */
.mascot {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.mascot img {
    width: 100%;
    height: 100%;
}

.mascot-small {
    width: 100px;
    height: 100px;
    margin: 20px auto;
}

.mascot-small img {
    width: 100%;
    height: 100%;
}

/* 按钮样式 */
.primary-btn, .secondary-btn, .grade-btn {
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.primary-btn {
    background-color: #4a6bff;
    color: white;
}

.primary-btn:hover {
    background-color: #3a5bef;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.primary-btn:disabled {
    background-color: #b4b4b4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.secondary-btn {
    background-color: #f0f0f0;
    color: #333;
}

.secondary-btn:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

/* 年级选择样式 */
.grade-selection {
    margin: 20px 0;
}

.grade-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.grade-btn {
    background-color: #e0e0ff;
    color: #4a6bff;
    padding: 10px 20px;
}

.grade-btn:hover {
    background-color: #d0d0ff;
}

.grade-btn.selected {
    background-color: #4a6bff;
    color: white;
}

/* 指导说明样式 */
.instruction-content {
    background-color: #f9f9ff;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.instruction-content p {
    margin-bottom: 10px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 阅读屏幕样式 */
.timer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.timer-icon {
    margin-right: 10px;
    font-size: 1.5rem;
}

.reading-content {
    background-color: #fff;
    border: 1px solid #e0e0ff;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 问题样式 */
#quiz-container {
    margin: 20px 0;
}

.quiz-question {
    background-color: #f9f9ff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.quiz-question p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: bold;
}

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

.quiz-option {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #e0e0ff;
    border-radius: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    background-color: #f0f0ff;
}

.quiz-option.selected {
    background-color: #e0e0ff;
    border-color: #4a6bff;
}

.quiz-option input {
    margin-right: 10px;
}

/* 结果屏幕样式 */
.result-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.result-item {
    background-color: #f9f9ff;
    border-radius: 15px;
    padding: 15px;
    width: calc(33.33% - 20px);
    min-width: 120px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.result-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.result-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.result-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4a6bff;
}

.result-message {
    background-color: #e0e0ff;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.result-badge {
    margin: 30px auto;
    width: 150px;
}

.result-badge img {
    width: 100%;
    margin-bottom: 10px;
}

#badge-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4a6bff;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .result-item {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .app-container {
        border-radius: 15px;
    }
    
    .screen {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .mascot {
        width: 120px;
        height: 120px;
    }
    
    .result-item {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
        margin: 5px 0;
    }
}