
/* 全局变量 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 2px 20px rgba(0,0,0,0.1);
    --font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* 更多颜色变量 */
    --nature-primary: #4a90e2;
    --nature-secondary: #7ed321;
    --nature-accent: #f5a623;
    --nature-dark: #333333;
    --nature-gray: #9b9b9b;
    --nature-light: #f8f9fa;
    --nature-blue: #2e86c1;
    --nature-green: #27ae60;
    
    /* Cells 风格变量 */
    --cells-blue: #007aff;
    --cells-green: #34c759;
    --cells-orange: #ff9500;
    --cells-red: #ff3b30;
    --cells-purple: #af52de;
    --cells-pink: #ff2d92;
    --cells-yellow: #ffcc00;
    --cells-gray: #8e8e93;
    --cells-dark: #1c1c1e;
    --cells-light: #f2f2f7;
}

/* 淡蓝色主题 (默认) */
[data-theme="soft-blue"] {
    --primary-color: #a8c8ec;
    --secondary-color: #b6a8d4;
    --accent-color: #c8d5f0;
}

/* 淡粉色主题 */
[data-theme="soft-pink"] {
    --primary-color: #f5c2c7;
    --secondary-color: #f8d7da;
    --accent-color: #ffc0cb;
}

/* 淡绿色主题 */
[data-theme="soft-green"] {
    --primary-color: #c3e6cb;
    --secondary-color: #d1ecf1;
    --accent-color: #b8dbd9;
}

/* 淡紫色主题 */
[data-theme="soft-purple"] {
    --primary-color: #e2d9f3;
    --secondary-color: #f3e2f3;
    --accent-color: #ddc5e8;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    transition: background 0.5s ease;
}

/* 导航栏 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.nav-brand i {
    margin-right: 10px;
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-item {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover,
.nav-item.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 200, 236, 0.4);
    transition: all 0.3s ease;
}


/* 淡雅主题切换器样式 */
.theme-switcher-nav {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.soft-theme-select {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    color: #555;
    padding: 6px 12px;
    font-size: 12px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.soft-theme-select:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.soft-theme-select option {
    background: #f8f9fa;
    color: #555;
    padding: 5px;
    border: none;
}

/* 学生选择器样式 */
.student-selector {
    margin: 15px 0;
}

.search-container {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1002;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
    font-size: 14px;
    position: relative;
    z-index: 1001;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.search-result-item:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item.highlighted {
    background-color: #667eea;
    color: white;
}

.selected-student {
    margin-top: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.selected-student .student-name {
    font-weight: bold;
    margin-right: 10px;
}

.selected-student .clear-selection {
    float: right;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.selected-student .clear-selection:hover {
    background: rgba(255, 255, 255, 0.3);
}

.form-select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select option {
    padding: 8px;
    font-size: 14px;
}

/* 主要内容区域 */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

.section {
    display: none;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section.active {
    display: block;
}

/* 首页样式 */
.hero {
    text-align: center;
    padding: 80px 0;
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 80px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.6s both;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.feature-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.6);
}

.btn-ai {
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-ai:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.6);
}

/* 上传区域样式 */
.upload-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.upload-header {
    text-align: center;
    margin-bottom: 40px;
}

.upload-header h2 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.upload-header p {
    color: #666;
    font-size: 1.1rem;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.05);
    margin-bottom: 30px;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.upload-content p {
    color: #666;
    margin-bottom: 20px;
}

.upload-info {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
}

.info-stats {
    display: flex;
    justify-content: space-around;
    margin: 30px 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.upload-tips {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 20px;
    border-radius: 10px;
}

.upload-tips h4 {
    color: #856404;
    margin-bottom: 15px;
}

.upload-tips ul {
    list-style: none;
    color: #856404;
}

.upload-tips li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.upload-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #ffc107;
    font-weight: bold;
}

/* 分析区域样式 */
.analysis-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.analysis-header h2 {
    color: #667eea;
    font-size: 2.5rem;
}

.analysis-controls {
    display: flex;
    gap: 15px;
}

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

.analysis-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.analysis-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-header h3 {
    color: #667eea;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-content {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
}

.summary-item {
    text-align: center;
}

.summary-value {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 1rem;
    color: #666;
}

/* 数据表格样式 */
.data-table-container {
    width: 100%;
    overflow-x: auto;
    height: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.data-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* 智能分析结果样式 */
.analysis-insights {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.insights-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.insights-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.insights-content {
    padding: 30px;
    line-height: 1.8;
}

.insights-content h4 {
    color: #ffd700;
    margin-top: 20px;
    margin-bottom: 10px;
}

.insights-content ul {
    margin-left: 20px;
}

.insights-content li {
    margin-bottom: 8px;
}

/* 表格分析卡片样式 */
#tableAnalysisContent {
    padding: 20px;
}

.table-analysis-item {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.table-analysis-item strong {
    color: #667eea;
}

.confidence-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #28a745;
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
}

/* AI分析模态框样式 */
.ai-options textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.ai-options textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.template-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn-template {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-template:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.ai-analysis-result {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ai-analysis-result h4 {
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-analysis-result .analysis-text {
    line-height: 1.8;
    color: #333;
}

.ai-provider-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #e74c3c 0%, #f39c12 100%);
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

/* 个人分析区域样式 */
.personal-container, .class-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.personal-header, .class-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.personal-header h2, .class-header h2 {
    color: #667eea;
    font-size: 2.5rem;
    margin: 0;
}

.personal-controls, .class-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.personal-layout {
    display: flex;
    gap: 30px;
    min-height: 600px;
}

/* 学生选择侧边栏 */
.student-sidebar {
    width: 320px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 20px;
}

.sidebar-header h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.class-filter {
    margin-bottom: 20px;
}

.class-filter select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.9rem;
}

.student-list {
    flex: 1;
    overflow-y: auto;
    max-height: 500px;
}

.student-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.student-item:hover {
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
    transform: translateX(5px);
}

.student-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left-color: #764ba2;
}

.student-item .student-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.student-item .student-info {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 个人分析内容 */
.personal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.no-student-selected {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #ddd;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #666;
}

/* 个人信息卡片 */
.personal-info-card, .class-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.student-avatar, .class-avatar {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.student-details, .class-details {
    flex: 1;
}

.student-details h3, .class-details h3 {
    margin: 0 0 20px 0;
    font-size: 2rem;
}

.info-grid, .class-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.info-item, .stat-item {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.info-item .label, .stat-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.info-item .value, .stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
}

/* 图表网格 */
.personal-charts-grid, .class-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    width: 100%;
}

.chart-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* 防止内容超出容器 */
}

/* 修复学生名字超出显示区域问题 */
.chart-card canvas {
    max-width: 100% !important;
    height: auto !important;
}

/* 图表容器样式优化 */
.chart-container {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
}

/* 确保图表标签不会超出容器 */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.85rem;
    max-height: 60px;
    overflow: hidden;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f8f9fa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.chart-card.large {
    grid-column: span 2;
}

.chart-card.full-width {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    margin: 30px 0;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.08);
}

/* 确保各科成绩详情真正占满全宽 */
.personal-charts-grid .chart-card.full-width {
    grid-column: 1 / -1;
    margin: 20px 0;
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* 各科成绩详情特殊样式，确保充分利用空间 */
#personalScoreDetails.subject-cards-grid {
    padding: 40px max(20px, calc((100vw - 1400px) / 2));
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.chart-card .card-header {
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-card .card-header h4 {
    color: #667eea;
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card .card-header select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
}

.chart-card .card-content {
    position: relative;
    height: auto;
    min-height: 400px;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.chart-card .card-content canvas {
    max-height: 250px;
    flex-shrink: 0;
}

.chart-card.full-width .card-content {
    height: auto;
    min-height: 300px;
    width: 100%;
    padding: 0;
    background: transparent;
}

/* 成绩详情 */
.score-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 100%;
}

.score-item {
    background: #f8f9fa;
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: auto;
}

.score-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.score-item .subject-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.score-item .score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 4px;
    line-height: 1.2;
}

.score-item .score-info {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.3;
}

.score-excellent {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white;
}

.score-good {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%) !important;
    color: white;
}

.score-average {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
    color: white;
}

.score-poor {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%) !important;
    color: white;
}

/* 科学期刊风格配色 */
:root {
    --nature-primary: #2E86C1;
    --nature-secondary: #E74C3C;
    --nature-accent: #F39C12;
    --nature-success: #27AE60;
    --nature-warning: #F1C40F;
    --nature-danger: #E74C3C;
    --nature-info: #3498DB;
    --nature-dark: #2C3E50;
    --nature-light: #ECF0F1;
    --cells-blue: #0066CC;
    --cells-red: #CC0000;
    --cells-green: #009900;
    --cells-orange: #FF9900;
    --cells-purple: #9900CC;
    --cells-teal: #009999;
    --cells-pink: #FF6699;
    --cells-gray: #666666;
}

/* 期刊风格图表容器 */
.journal-chart {
    background: white;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.journal-chart .chart-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--nature-dark);
    text-align: center;
    padding: 12px;
    border-bottom: 1px solid #E5E5E5;
    margin: 0;
}

.journal-chart canvas {
    max-height: 320px !important;
}

/* 专业图例样式 */
.custom-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 12px;
    font-size: 12px;
    border-top: 1px solid #E5E5E5;
    background: #FAFAFA;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.1);
}

.legend-text {
    font-size: 11px;
    color: var(--nature-dark);
    font-weight: 500;
}

/* 弧形图特殊样式 */
.arc-chart-container {
    position: relative;
    padding: 20px;
}

.arc-chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.arc-chart-center .total-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--nature-dark);
    margin: 0;
}

.arc-chart-center .total-label {
    font-size: 12px;
    color: var(--nature-gray);
    margin: 0;
}

/* 箱型图样式 */
.box-plot-container {
    padding: 20px;
    background: white;
}

.box-plot-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
    background: #F8F9FA;
    border-radius: 6px;
}

.box-stat-item {
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #E5E5E5;
}

.box-stat-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--nature-primary);
    display: block;
}

.box-stat-label {
    font-size: 10px;
    color: var(--nature-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 各科成绩卡片网格 - 重新设计 */
.subject-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px 20px;
    max-height: none;
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f8faff 0%, #e6f3ff 50%, #ffffff 100%);
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.08);
}

/* 个人分析页面的各科成绩详情特殊处理 */
.personal-charts-grid .subject-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.subject-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 50%, #f8f9fa 100%);
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 
        0 4px 20px rgba(102, 126, 234, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    width: 100%;
    backdrop-filter: blur(10px);
}

.subject-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(102, 126, 234, 0.15),
        0 4px 15px rgba(0, 0, 0, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--cells-blue), var(--cells-green));
}

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.15);
}

.subject-name {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.subject-score {
    font-size: 24px;
    font-weight: 800;
    color: #667eea;
    margin: 0;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.subject-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 255, 0.7) 100%);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.15);
    min-height: 50px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.05);
    transition: all 0.2s ease;
}

.metric-value {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.metric-label {
    font-size: 11px;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
    font-weight: 600;
    opacity: 0.9;
}

.subject-progress {
    margin-top: 10px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cells-blue), var(--cells-green));
    border-radius: 4px;
    transition: width 0.6s ease;
}

.progress-label {
    font-size: 12px;
    color: var(--nature-gray);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

/* 成绩等级标识 */
.grade-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grade-excellent {
    background-color: var(--cells-green);
    color: white;
}

.grade-good {
    background-color: var(--cells-blue);
    color: white;
}

.grade-average {
    background-color: var(--cells-orange);
    color: white;
}

.grade-poor {
    background-color: var(--cells-red);
    color: white;
}

/* 响应式设计 */
@media (min-width: 1600px) {
    .personal-charts-grid .subject-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    #personalScoreDetails.subject-cards-grid {
        padding: 40px max(40px, calc((100vw - 1600px) / 2));
    }
}

@media (min-width: 1400px) {
    .personal-charts-grid .subject-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
    
    #personalScoreDetails.subject-cards-grid {
        padding: 40px max(30px, calc((100vw - 1400px) / 2));
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .subject-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
        padding: 30px 20px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .subject-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
        padding: 25px 15px;
    }
}

@media (max-width: 768px) {
    .subject-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 20px 15px;
        max-height: none;
    }
    
    .personal-charts-grid .chart-card.full-width {
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100vw - 10px);
        left: auto;
        right: auto;
    }
    
    #personalScoreDetails.subject-cards-grid {
        padding: 25px 15px;
    }
}
    
    .subject-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
    
    .subject-card {
        padding: 6px;
        min-height: 130px;
    }
    
    /* 移动端成绩详情优化 */
    .score-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .score-item {
        padding: 10px 6px;
    }
    
    .score-item .score-value {
        font-size: 1.3rem;
    }
    
    .ranking-chip {
        padding: 5px 8px;
        font-size: 9px;
        min-width: 50px;
    }
}

/* 班级对比控制器样式 - 响应式优化 */
.class-comparison-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    color: white;
    flex-wrap: wrap;
    overflow: visible;
}

.class-comparison-controls select {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    font-weight: 500;
    min-width: 100px;
    max-width: 150px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    flex: 1;
}

.class-comparison-controls select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.vs-text {
    font-weight: bold;
    font-size: 14px;
    color: white;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    min-width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-stats {
    margin-top: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 50%, #e8f2ff 100%);
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.15);
    box-shadow: 
        0 4px 20px rgba(102, 126, 234, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.05);
    min-height: 160px;
    overflow: visible;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.comparison-stats h5 {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.comparison-stats h5::before {
    content: '📊';
    font-size: 16px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    overflow: visible;
    margin-top: 10px;
}

.stat-item {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 
        0 3px 10px rgba(102, 126, 234, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    min-height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.stat-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.15),
        0 3px 10px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-label {
    font-size: 12px;
    color: #4a5568;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1.2;
    opacity: 0.9;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.stat-value.better {
    color: var(--nature-green);
}

.stat-value.better::after {
    content: '↑';
    font-size: 14px;
    color: var(--nature-green);
}

.stat-value.worse {
    color: var(--cells-red);
}

.stat-value.worse::after {
    content: '↓';
    font-size: 14px;
    color: var(--cells-red);
}

/* 排名控制器样式 */
.ranking-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 14px;
}

.ranking-controls label {
    font-weight: 600;
    color: var(--nature-dark);
    white-space: nowrap;
}

.ranking-controls select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ranking-controls select:focus {
    outline: none;
    border-color: var(--nature-blue);
    box-shadow: 0 0 0 2px rgba(46, 134, 193, 0.2);
}

.ranking-statistics {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    border-left: 4px solid var(--nature-blue);
}

.ranking-statistics h6 {
    margin: 0 0 8px 0;
    color: var(--nature-dark);
    font-size: 13px;
    font-weight: 600;
}

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

.ranking-stat-item {
    background: white;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ranking-stat-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 2px;
}

.ranking-stat-value {
    font-size: 14px;
    font-weight: bold;
    color: var(--nature-dark);
}

/* ========== 在线编辑器样式 ========== */

/* 模板选择区域 */
.template-section {
    margin-bottom: 40px;
}

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

.template-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.template-card:hover {
    border-color: var(--nature-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.template-card.active {
    border-color: var(--nature-blue);
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.template-card i {
    font-size: 2.5rem;
    color: var(--nature-blue);
    margin-bottom: 15px;
}

.template-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--nature-dark);
    margin-bottom: 8px;
}

.template-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.template-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 编辑器区域 */
.editor-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.editor-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.editor-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.editor-controls .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.2);
    color: white;
    transition: all 0.3s ease;
}

.editor-controls .btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.editor-controls .btn-warning {
    background: rgba(255,193,7,0.3);
    border-color: rgba(255,193,7,0.5);
}

.editor-controls .btn-success {
    background: rgba(40,167,69,0.3);
    border-color: rgba(40,167,69,0.5);
}

/* 表格容器 */
.table-container {
    padding: 30px;
    min-height: 500px;
}

.spreadsheet-editor {
    width: 100%;
    height: 500px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

/* 数据验证区域 */
.validation-info {
    margin: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    border-left: 4px solid var(--nature-green);
}

.validation-info h3 {
    margin: 0 0 15px 0;
    color: #155724;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.validation-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
}

.validation-item.success {
    border-left: 4px solid var(--nature-green);
}

.validation-item.warning {
    border-left: 4px solid #ffc107;
}

.validation-item.error {
    border-left: 4px solid var(--cells-red);
}

.validation-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.validation-value {
    font-size: 1.1rem;
    font-weight: bold;
}

.validation-item.success .validation-value {
    color: var(--nature-green);
}

.validation-item.warning .validation-value {
    color: #856404;
}

.validation-item.error .validation-value {
    color: var(--cells-red);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .template-cards {
        grid-template-columns: 1fr;
    }
    
    .editor-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .editor-controls {
        justify-content: center;
    }
    
    .table-container {
        padding: 15px;
    }
    
    .spreadsheet-editor {
        height: 400px;
    }
}

/* ========== 列管理器样式 ========== */

.column-manager {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin: 20px 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.column-manager-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-manager-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 5px 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.column-manager-content {
    padding: 25px;
}

.column-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.category-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.category-section h4 {
    margin: 0 0 15px 0;
    color: var(--nature-dark);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.field-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.field-option:hover {
    border-color: var(--nature-blue);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.field-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--nature-blue);
}

.field-option input[type="checkbox"]:checked + .field-name {
    color: var(--nature-blue);
    font-weight: 600;
}

.field-name {
    font-weight: 500;
    color: var(--nature-dark);
    min-width: 80px;
    font-size: 0.95rem;
}

.field-desc {
    color: #666;
    font-size: 0.85rem;
    flex: 1;
}

.field-option input[type="checkbox"]:checked ~ .field-desc {
    color: #555;
}

.column-manager-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.column-manager-actions .btn {
    padding: 10px 25px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.column-manager-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.column-manager-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.column-manager-actions .btn-secondary {
    background: #6c757d;
    border: none;
    color: white;
}

.column-manager-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .column-categories {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .column-manager {
        margin: 15px;
    }
    
    .column-manager-content {
        padding: 20px;
    }
    
    .field-option {
        padding: 10px;
    }
    
    .field-name {
        min-width: 60px;
        font-size: 0.9rem;
    }
    
    .field-desc {
        font-size: 0.8rem;
    }
}

/* 班级对比分析响应式优化 */
@media (max-width: 768px) {
    .class-comparison-controls {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    
    .class-comparison-controls select {
        min-width: 100px;
        max-width: 100%;
        width: 100%;
        font-size: 12px;
    }
    
    .vs-text {
        font-size: 14px;
        padding: 4px 8px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 6px;
    }
    
    .stat-item {
        padding: 6px;
        min-height: 50px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    .stat-value {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
    
    .class-comparison-controls {
        padding: 8px;
    }
    
    .stat-item {
        padding: 4px;
        min-height: 45px;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .stat-value {
        font-size: 12px;
    }
}

/* 单班级提示样式 */
.single-class-tip {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tip-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.tip-content i {
    color: #007bff;
    font-size: 1.1rem;
}

/* 科目排名样式 */
.subject-rankings {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.subject-rankings h4 {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: var(--nature-dark);
    font-weight: 600;
}

.ranking-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ranking-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
    transition: all 0.3s ease;
}

.ranking-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.chip-label {
    font-size: 10px;
    opacity: 0.8;
    margin-bottom: 2px;
}

.chip-rank {
    font-size: 12px;
    font-weight: 700;
}

.top-rank-chip {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #8B4513;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.good-rank-chip {
    background: linear-gradient(135deg, var(--cells-green), #32CD32);
    color: white;
}

.average-rank-chip {
    background: linear-gradient(135deg, var(--cells-orange), #FF8C00);
    color: white;
}

.poor-rank-chip {
    background: linear-gradient(135deg, #6C757D, #ADB5BD);
    color: white;
}

/* 班级分析样式 */
.class-controls select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    margin-right: 15px;
}

/* 报告区域样式 */
.reports-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.reports-header {
    text-align: center;
    margin-bottom: 50px;
}

.reports-header h2 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.reports-header p {
    color: #666;
    font-size: 1.1rem;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.report-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.report-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.report-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.report-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.report-card p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 0 0 15px 15px;
}

.analysis-options {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fcff 100%);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.08);
}

.option-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.option-group label::before {
    content: '▸';
    color: #667eea;
    margin-right: 8px;
    font-weight: bold;
}

.option-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fcff 100%);
    color: #2c3e50;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.option-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.option-group select:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8fcff 0%, #ffffff 100%);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.checkbox-group label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal !important;
    margin-bottom: 0 !important;
}

.checkbox-group label:hover {
    background: #e9ecef;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
    accent-color: #667eea;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.modal-results {
    padding: 30px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
    color: #667eea;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.2rem;
    font-weight: 600;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .nav-menu {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-content {
        margin-top: 120px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-header {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* 格式指南样式 */
.format-guide {
    margin-bottom: 30px;
    text-align: center;
}

.guide-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2E86C1, #0066CC);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.guide-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

.guide-link i {
    font-size: 16px;
}

/* 排名信息样式 */
.original-rankings {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--cells-blue);
}

.original-rankings h4 {
    margin: 0 0 15px 0;
    color: var(--nature-dark);
    font-size: 14px;
    font-weight: 600;
}

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

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 13px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
    border-color: #dee2e6;
}

.ranking-label {
    color: #2c3e50;
    font-weight: 600;
    font-size: 13px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 3px 8px;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ranking-value {
    color: #3498db;
    font-weight: 700;
    font-size: 14px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 4px 10px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.ranking-value.top-rank {
    color: #fff;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: 1px solid #FFD700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}

.ranking-value.good-rank {
    color: #fff;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: 1px solid #27ae60;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

.ranking-value.average-rank {
    color: #fff;
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    border: 1px solid #e67e22;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 2px 4px rgba(230, 126, 34, 0.3);
}

.ranking-badge {
    background: linear-gradient(135deg, var(--cells-blue), var(--nature-primary));
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .guide-links {
        flex-direction: column;
        align-items: center;
    }
    
    .guide-link {
        width: 200px;
        justify-content: center;
    }
    
    .rankings-grid {
        grid-template-columns: 1fr;
    }
    
    /* 超小屏幕成绩详情优化 */
    .score-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 20px 10px;
    }
    
    .upload-container,
    .analysis-container,
    .reports-container {
        padding: 20px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .analysis-header h2,
    .reports-header h2,
    .upload-header h2 {
        font-size: 2rem;
    }
}


/* 相关系数显示美化 */
.correlation-matrix {
    background: linear-gradient(135deg, #ffffff 0%, #f8fcff 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 2px solid rgba(102, 126, 234, 0.15);
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.1),
        0 3px 10px rgba(0, 0, 0, 0.05);
}

.correlation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin: 8px 0;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.08);
    transition: all 0.3s ease;
}

.correlation-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
    border-left-width: 6px;
}

.correlation-subjects {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.correlation-value {
    font-weight: 700;
    font-size: 18px;
    padding: 8px 15px;
    border-radius: 20px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    min-width: 80px;
    text-align: center;
}

.correlation-strong {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.correlation-moderate {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
}

.correlation-weak {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

/* 图表说明样式 */
.chart-description {
    margin-top: 8px;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 3px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* 个人成绩追踪样式 */
.personal-tracking-section {
    margin-bottom: 30px;
}

.tracking-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.empty-tracking {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-tracking i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-tracking p {
    margin: 5px 0;
    font-size: 14px;
}

/* 班级对比横向布局 */
.class-comparison-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.comparison-left {
    flex: 1;
    min-width: 0;
}

.comparison-right {
    flex: 1;
    min-width: 0;
}

.comparison-left h4,
.comparison-right h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
}

.comparison-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.stat-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-comparison .stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-comparison .stat-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-comparison .stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.subject-comparison {
    max-height: 300px;
    overflow-y: auto;
}

/* 追踪操作按钮样式 */
.tracking-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.tracking-actions .btn {
    flex: 1;
    padding: 8px 15px;
    font-size: 13px;
}


/* 科目选择器样式 */
.subject-selector-card {
    margin-bottom: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fcff 100%);
    border: 2px solid #e3f2fd;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.1);
}

.subject-selection {
    padding: 20px;
}

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

.selection-controls .btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.subject-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.subject-checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.subject-checkbox-item:hover {
    background: #e3f2fd;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.subject-checkbox-item.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.subject-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #667eea;
}

.subject-checkbox-item label {
    cursor: pointer;
    font-weight: 500;
    flex: 1;
    margin: 0;
}

.selection-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.selected-list {
    color: #667eea;
    font-weight: 500;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-info {
    margin-top: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.ranking-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-label {
    font-weight: 500;
    color: #495057;
}

.ranking-subjects {
    color: #28a745;
    font-weight: 600;
    background: rgba(40, 167, 69, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .class-comparison-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-comparison {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tracking-actions {
        flex-direction: column;
    }
    
    .subject-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .selection-summary {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .selected-list {
        max-width: 100%;
    }
}

.chart-description p {
    margin: 0;
    font-style: italic;
}

/* 单科上传时的优化显示 */
.single-subject-optimization {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 10px;
    margin: 15px 0;
    border: 1px solid #ffeaa7;
}

.single-subject-optimization h4 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 16px;
}

.single-subject-optimization p {
    color: #856404;
    margin: 5px 0;
    font-size: 14px;
}

/* 班级对比分析特殊样式 */
.class-comparison-optimized {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #e1bee7;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
}

.class-comparison-optimized .chart-description {
    background: linear-gradient(135deg, #f3e5f5 0%, #e8f5e8 100%);
    border-left-color: #9c27b0;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .chart-description {
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .single-subject-optimization {
        padding: 15px;
        margin: 10px 0;
    }
    
    .single-subject-optimization h4 {
        font-size: 14px;
    }
    
    .single-subject-optimization p {
        font-size: 12px;
    }
}

/* 图表保存说明样式 */
.chart-save-tips {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.chart-save-tips h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
}

.chart-save-tips ol {
    margin: 0;
    padding-left: 20px;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.chart-save-tips li {
    margin-bottom: 5px;
}

.chart-save-tips li:last-child {
    margin-bottom: 0;
}
