* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.type-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.type-btn {
    padding: 10px 30px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-btn:hover {
    border-color: #333;
    color: #333;
}

.type-btn.active {
    background: #333;
    color: #ffffff;
    border-color: #333;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.question-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.question-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.question-number {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.question-body {
    margin-bottom: 30px;
}

.question-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.option-item:hover {
    border-color: #666;
    background: #f9f9f9;
}

.option-item.selected {
    border-color: #333;
    background: #f5f5f5;
}

.option-item.correct {
    border-color: #4caf50;
    background: #f1f8f4;
}

.option-item.wrong {
    border-color: #f44336;
    background: #fef5f5;
}

.option-item.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.option-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.option-label {
    font-size: 16px;
    color: #333;
    flex: 1;
}

.question-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.btn {
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #333;
    color: #ffffff;
}

.btn-primary:hover {
    background: #555;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: #ffffff;
    color: #333;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #333;
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-panel {
    margin-top: 25px;
    padding: 20px;
    border-radius: 6px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.result-icon {
    font-size: 24px;
}

.result-text {
    font-size: 18px;
    font-weight: 600;
}

.result-panel.correct {
    background: #f1f8f4;
    border-color: #4caf50;
}

.result-panel.correct .result-text {
    color: #4caf50;
}

.result-panel.wrong {
    background: #fef5f5;
    border-color: #f44336;
}

.result-panel.wrong .result-text {
    color: #f44336;
}

.result-answer {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.result-answer span {
    font-weight: 600;
    color: #333;
}

.result-explanation {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.progress-panel {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 25px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
}

.progress-fill {
    height: 100%;
    background: #333;
    transition: width 0.3s ease;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .question-card {
        padding: 20px;
    }
    
    .question-footer {
        flex-wrap: wrap;
    }
    
    .btn {
        flex: 1;
        min-width: 120px;
    }
}
