body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #5b35a1 100%);
    min-height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 85vw;
    height: 85vh;
}

h1 {
    text-align: center;
    color: #333;
    margin: 0px;
    font-size: 6vh;
}

/* 设置面板样式 */
.settings-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group:last-child {
    margin-bottom: 0;
}

.setting-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
    font-size: 3vh;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option {
    padding: 8px 16px;
    background: #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 2.5vh;
}

.option:hover {
    background: #dee2e6;
}

.option.selected {
    background: #007bff;
    color: white;
}

/* 新增：范围设置样式 */
.range-settings {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.range-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.range-input-group label {
    font-size: 14px;
    color: #666;
}

.range-number-input {
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 2.5vh;
    width: 100%;
    box-sizing: border-box;
}

.range-number-input:focus {
    outline: none;
    border-color: #007bff;
}

.range-display {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
    background: #f1f8ff;
    padding: 8px;
    border-radius: 8px;
    margin-top: 10px;
}

.number-input {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 2.5vh;
    width: 100px;
    text-align: center;
}

.number-input:focus {
    outline: none;
    border-color: #007bff;
}

.btn {
    padding: 14px 28px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-start {
    background: #28a745;
}

.btn-start:hover {
    background: #218838;
}

.btn-end {
    background: #dc3545;
}

.btn-end:hover {
    background: #c82333;
}

.btn-restart {
    background: #17a2b8;
}

.btn-restart:hover {
    background: #138496;
}

.hidden {
    display: none !important;
}

/* 答题页面样式 */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.timer-container {
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-label {
    color: #666;
    font-size: 14px;
}

.timer {
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

.question-counter {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
}

.progress-container {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #17a2b8);
    width: 0%;
    transition: width 0.3s;
}

.question-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    font-size: 20vh;
}

.question-part {
    font-weight: bold;
    color: #333;
    padding: 0 20px;
}

.answer-input {
    padding: 12px;
    border: 3px solid #007bff;
    border-radius: 8px;
    font-size: 15vh;
    width: 20vw;
    height: 16vh;
    text-align: center;
    font-weight: bold;
}

.answer-input:focus {
    outline: none;
    border-color: #0056b3;
}

.feedback {
    text-align: center;
    font-size: 18px;
    min-height: 27px;
    margin-bottom: 20px;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 结果页面样式 */
.result-container {
    text-align: center;
}

.emoji {
    font-size: 48px;
    margin-bottom: 20px;
}

.score {
    font-size: 32px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 15px;
}

.incorrect-score {
    color: #dc3545;
}

.completion-info,
.time-info {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.results {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 25px;
}

.question-result {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 16px;
}

.question-result.correct {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.question-result.incorrect {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.question-result.incomplete {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.result-expression {
    font-weight: bold;
    margin-bottom: 5px;
}

.user-answer {
    color: #dc3545;
    font-weight: bold;
}

.correct-answer {
    color: #28a745;
    font-weight: bold;
}

.incomplete-marker {
    color: #ffc107;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .question-container {
        font-size: 22px;
        padding: 20px;
    }
    
    .answer-input {
        font-size: 22px;
        width: 100px;
    }
    
    .range-settings {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 15px;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .question-container {
        font-size: 18px;
        gap: 10px;
    }
    
    .answer-input {
        font-size: 18px;
        width: 80px;
    }
    
    .options {
        justify-content: center;
    }
    
    .option {
        padding: 6px 12px;
        font-size: 13px;
    }
}