* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(90deg, #ff9a9e 0%, #fad0c4 100%);
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.block-selection {
    padding: 30px;
    text-align: center;
}

.block-selection h2 {
    margin-bottom: 20px;
    color: #333;
}

.blocks-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.block-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px 40px;
    border-radius: 15px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    min-width: 200px;
}

.block-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.block-btn:active {
    transform: translateY(-1px);
}

.subject-selection {
    padding: 30px;
    text-align: center;
}

.subject-selection h2 {
    margin-bottom: 20px;
    color: #333;
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.subject-btn {
    padding: 15px 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.subject-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.subject-btn:active {
    transform: translateY(1px);
}

.quiz-container {
    padding: 30px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.question-content {
    margin-bottom: 30px;
}

.question-content h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.6;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
}

.option:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

.option.selected {
    border-color: #007bff;
    background-color: #e3f2fd;
}

.option input[type="radio"],
.option input[type="checkbox"] {
    margin-right: 10px;
}

.quiz-actions {
    text-align: center;
}

.quiz-actions button {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.quiz-actions button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.result-container {
    padding: 30px;
    text-align: center;
}

.score-display {
    margin: 30px 0;
    font-size: 1.3rem;
}

.score-display span {
    font-weight: bold;
    color: #4facfe;
}

.answer-review {
    text-align: left;
    margin: 30px 0;
    max-height: 300px;
    overflow-y: auto;
}

.review-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #f8f9fa;
}

.review-item.correct {
    border-left: 5px solid #28a745;
}

.review-item.incorrect {
    border-left: 5px solid #dc3545;
}

#restartBtn {
    padding: 15px 40px;
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .container {
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .question-header {
        flex-direction: column;
        gap: 10px;
    }
}