* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    max-width: 1800px;
    margin: 0 auto;
}

.container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.message {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 16px;
    margin-bottom: 20px;
}

.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background-color: #f8fafc;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.upload-area:hover, .upload-area.dragover {
    background-color: #e8f4fc;
    border-color: #2980b9;
}

.upload-icon {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.upload-hint {
    color: #7f8c8d;
    margin-bottom: 20px;
}

.upload-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #2980b9;
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #3498db;
}

.file-icon {
    color: #3498db;
    margin-right: 12px;
    font-size: 20px;
}

.file-name {
    flex-grow: 1;
    font-weight: 500;
}

.file-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
}

.status-pending {
    background-color: #fef9e7;
    color: #f39c12;
}

.status-success {
    background-color: #e8f6f3;
    color: #27ae60;
}

.status-error {
    background-color: #fdedec;
    color: #e74c3c;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.control-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.extract-btn {
    background-color: #2ecc71;
    color: white;
}

.extract-btn:hover {
    background-color: #27ae60;
}

.clear-btn {
    background-color: #e74c3c;
    color: white;
}

.clear-btn:hover {
    background-color: #c0392b;
}

.refresh-btn {
    background-color: #3498db;
    color: white;
}

.refresh-btn:hover {
    background-color: #2980b9;
}

.export-btn {
    background-color: #9b59b6;
    color: white;
}

.export-btn:hover {
    background-color: #8e44ad;
}

.export-pdf-btn {
    background-color: #e67e22;
    color: white;
}

.export-pdf-btn:hover {
    background-color: #d35400;
}

.export-btn:disabled, .extract-btn:disabled, .export-pdf-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.result-section {
    margin-bottom: 30px;
}

.result-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    text-align: center;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    font-size: 14px;
}

.data-table th {
    background-color: #3498db;
    color: white;
    padding: 12px 10px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    text-align: center;
}

.data-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.data-table tr:hover {
    background-color: #f1f8ff;
}

.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.table-container table {
    border-collapse: collapse;
}

.table-container thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

.ranking-table th {
    background-color: #9b59b6;
}

.progress-container {
    height: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 100%;
    background-color: #2ecc71;
    width: 0%;
    transition: width 0.3s;
}

.info-box {
    background-color: #e8f6f3;
    border-left: 4px solid #2ecc71;
    padding: 15px;
    margin-top: 20px;
    border-radius: 0 8px 8px 0;
}

.info-box h3 {
    color: #27ae60;
    margin-bottom: 8px;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: #7f8c8d;
    font-size: 14px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}

.style-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.style-toggle-btn {
    background-color: #ecf0f1;
    border: 2px solid #bdc3c7;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.style-toggle-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

.style-toggle-btn:hover {
    background-color: #d5dbdb;
}

.style-toggle-btn.active:hover {
    background-color: #2980b9;
}

.grade-selector {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.grade-selector label {
    font-weight: 500;
    color: #2c3e50;
}

.grade-selector select {
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #bdc3c7;
    background-color: white;
    font-size: 14px;
    min-width: 150px;
}

/* 图表样式 */
.chart-section {
    margin-bottom: 30px;
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    text-align: center;
}

.chart-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.chart-box {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 400px;
}

.chart-box h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.chart-box canvas {
    width: 100% !important;
    height: 350px !important;
}

/* 数据看板样式 */
.dashboard-section {
    margin-bottom: 30px;
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    text-align: center;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 4px solid #3498db;
}

.stat-card:nth-child(2) {
    border-top-color: #2ecc71;
}

.stat-card:nth-child(3) {
    border-top-color: #e74c3c;
}

.stat-card:nth-child(4) {
    border-top-color: #9b59b6;
}

.stat-card:nth-child(5) {
    border-top-color: #f39c12;
}

.stat-card:nth-child(6) {
    border-top-color: #1abc9c;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
    margin: 10px 0;
}

.stat-label {
    font-size: 16px;
    color: #7f8c8d;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .controls {
        justify-content: center;
    }
    
    .style-toggle {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .data-table th, .data-table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .chart-container {
        grid-template-columns: 1fr;
    }
    
    .chart-box {
        height: 300px;
    }
    
    .chart-box canvas {
        height: 250px !important;
    }
}

.export-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}
/* 年级选择器样式 */
.grade-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.grade-selector-popup {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.selector-header {
    background-color: #3498db;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selector-header h3 {
    margin: 0;
    font-size: 20px;
}

.close-selector {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-selector:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.selector-body {
    padding: 30px;
}

.grade-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.grade-btn {
    padding: 15px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.grade-btn:hover {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.grade-btn:active {
    transform: translateY(0);
}

.selector-footer {
    padding: 20px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.select-all-btn, .clear-all-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    flex: 1;
    transition: all 0.3s;
}

.select-all-btn {
    background-color: #2ecc71;
    color: white;
}

.select-all-btn:hover {
    background-color: #27ae60;
}

.clear-all-btn {
    background-color: #e74c3c;
    color: white;
}

.clear-all-btn:hover {
    background-color: #c0392b;
}

/* 排名表特殊样式 */
.ranking-table td:first-child {
    font-weight: bold;
    color: #e74c3c;
}

.ranking-table tr:nth-child(1) td:first-child {
    font-size: 18px;
    color: #e74c3c;
}

.ranking-table tr:nth-child(2) td:first-child,
.ranking-table tr:nth-child(3) td:first-child {
    color: #e67e22;
}

.no-data-message {
    text-align: center;
    padding: 60px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 排名提示样式 */
.ranking-hint {
    text-align: center;
    padding: 15px;
    background-color: #e8f4fc;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #3498db;
    font-size: 14px;
}

.ranking-hint .hint-icon {
    font-size: 18px;
    margin-right: 8px;
}
/* 显示所有年级按钮样式 */
.show-all-btn {
    background-color: #9b59b6;
    color: white;
}

.show-all-btn:hover {
    background-color: #8e44ad;
}

/* 排名表标题样式 */
.ranking-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #9b59b6;
}

/* 排名提示样式优化 */
.ranking-hint {
    text-align: center;
    padding: 15px;
    background-color: #e8f4fc;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #3498db;
    font-size: 14px;
    border-left: 4px solid #3498db;
}

.ranking-hint .hint-icon {
    font-size: 18px;
    margin-right: 8px;
}

/* 年级选择器弹窗样式 */
.grade-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.grade-selector-popup {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.selector-header {
    background-color: #3498db;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selector-header h3 {
    margin: 0;
    font-size: 20px;
}

.close-selector {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-selector:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.selector-body {
    padding: 30px;
}

.grade-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.grade-btn {
    padding: 15px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.grade-btn:hover {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.grade-btn:active {
    transform: translateY(0);
}

.selector-footer {
    padding: 20px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.cancel-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background-color: #95a5a6;
    color: white;
    transition: background-color 0.3s;
}

.cancel-btn:hover {
    background-color: #7f8c8d;
}

/* 排名表标题样式 */
.ranking-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #9b59b6;
}

/* 排名提示样式优化 */
.ranking-hint {
    text-align: center;
    padding: 15px;
    background-color: #e8f4fc;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #3498db;
    font-size: 14px;
    border-left: 4px solid #3498db;
}

.ranking-hint .hint-icon {
    font-size: 18px;
    margin-right: 8px;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* 年级按钮容器样式 */
.grade-buttons-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.grade-buttons-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 14px;
}

.grade-buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.grade-button {
    padding: 8px 16px;
    background-color: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 60px;
    text-align: center;
}

.grade-button:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.grade-button.active {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
    font-weight: bold;
}

.no-data-hint {
    color: #6c757d;
    font-size: 14px;
    padding: 10px;
    text-align: center;
    width: 100%;
}