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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.controls input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
    min-width: 200px;
}

.controls button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.controls button:hover {
    background-color: #2980b9;
}

.stats {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.stats h2 {
    margin-bottom: 15px;
    color: #34495e;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background-color: #ecf0f1;
    border-radius: 4px;
}

.stat-item h3 {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.stat-item .value {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
}

.stat-item .percentage {
    font-size: 14px;
    color: #95a5a6;
}

.questions {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.questions h2 {
    margin-bottom: 20px;
    color: #34495e;
}

.question-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s;
}

.question-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.question-content {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.5;
}

.question-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item label {
    font-size: 14px;
    color: #7f8c8d;
}

.meta-item select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.question-actions {
    display: flex;
    gap: 10px;
}

.question-actions button {
    padding: 5px 15px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.question-actions button:hover {
    background-color: #27ae60;
}

.question-actions button.secondary {
    background-color: #95a5a6;
}

.question-actions button.secondary:hover {
    background-color: #7f8c8d;
}

.history {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.history h4 {
    margin-bottom: 10px;
    font-size: 14px;
    color: #7f8c8d;
}

.history-item {
    font-size: 12px;
    margin-bottom: 5px;
    padding: 5px;
    background-color: white;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.history-item.ai {
    border-left-color: #2ecc71;
}

.history-item.human {
    border-left-color: #e74c3c;
}

@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }
    
    .controls input {
        width: 100%;
    }
    
    .question-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Excel导入系统样式 */
.upload-area {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.upload-area input[type="file"] {
    flex: 1;
    min-width: 200px;
}

#uploadStatus {
    margin-left: 10px;
    font-weight: bold;
    color: #27ae60;
}

.section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.section h2 {
    margin-bottom: 20px;
    color: #34495e;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.section-desc {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 14px;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.data-table tr:hover {
    background-color: #f5f5f5;
}

.data-table input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.data-table select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.adjust-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.stat-chart {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-chart h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #34495e;
}

.stat-chart canvas {
    max-height: 300px;
}

/* 教学资源上传样式 */
.resource-upload-area {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 2px dashed #3498db;
}

.resource-type-selector {
    margin-bottom: 15px;
}

.resource-type-selector label {
    font-weight: bold;
    margin-right: 10px;
}

.resource-type-selector select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.resource-input {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.resource-input input[type="file"] {
    flex: 1;
    min-width: 200px;
}

.uploaded-resources {
    margin-top: 20px;
}

.uploaded-resources h4 {
    margin-bottom: 10px;
    color: #34495e;
}

.uploaded-resources ul {
    list-style: none;
}

.uploaded-resources li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: white;
    border-radius: 4px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.resource-type {
    background-color: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.resource-name {
    flex: 1;
    font-weight: 500;
}

.btn-remove {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-remove:hover {
    background-color: #c0392b;
}

/* AI分析区域样式 */
.ai-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-icon {
    font-size: 20px;
}

.ai-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ai-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.ai-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.analysis-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
}

.analysis-status.analyzing {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.analysis-status.completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.analysis-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background-color: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 15px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    color: #333;
}

/* 状态样式 */
.status-uploading {
    color: #3498db;
}

.status-success {
    color: #27ae60;
}

.status-error {
    color: #e74c3c;
}

/* 图例样式 */
.target-legend,
.difficulty-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* 分布信息样式 */
.distribution-info {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.distribution-info h4 {
    margin-bottom: 10px;
    color: #34495e;
}

.distribution-info ul {
    list-style: disc;
    padding-left: 20px;
}

.distribution-info li {
    margin-bottom: 5px;
    color: #555;
}

/* 预览表格样式 - 显示变化 */
.data-table td.changed {
    background-color: #fff3cd;
    color: #856404;
    text-decoration: line-through;
}

.data-table td.ai-result {
    background-color: #d4edda;
    color: #155724;
    font-weight: bold;
}

.data-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    position: sticky;
    top: 0;
}
