/* 全局样式 */
:root {
    --primary-color: #192887;  /* 主色调：深蓝色，与整站风格一致 */
    --primary-light: rgba(25, 40, 135, 0.1);
    --primary-dark: #131f6b;
    --accent-color: #4A90E2;   /* 强调色：蓝色 */
    --secondary-color: #F5A623; /* 次要强调色：橙色 */
    --bg-color: #F5F7FA;       /* 背景色：浅灰 */
    --card-bg: #FFFFFF;        /* 卡片背景：白色 */
    --text-dark: #333333;      /* 深文本色 */
    --text-medium: #666666;    /* 中文本色 */
    --border-color: #E0E6ED;   /* 边框颜色 */
    --header-bg: #192887;      /* 表头背景色：深蓝色 */
    --hover-color: #EAF2FD;    /* 悬停背景色 */
    --animation-speed: 0.3s;   /* 动画速度 */
    --gray-600: #6c757d;
    --physics-color: #3498db;  /* 物理科目颜色 */
    --chemistry-color: #2ecc71; /* 化学科目颜色 */
    --biology-color: #e74c3c;  /* 生物科目颜色 */
    --politics-color: #9b59b6; /* 政治科目颜色 */
    --history-color: #f39c12;  /* 历史科目颜色 */
    --geography-color: #1abc9c; /* 地理科目颜色 */
}

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

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn var(--animation-speed) ease-out;
}

/* 页面标题 - 精致版 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px 30px;
    position: relative;
    background: linear-gradient(135deg, rgba(25, 40, 135, 0.05) 0%, rgba(25, 40, 135, 0.08) 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    animation: fadeIn 0.6s ease-out;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(25, 40, 135, 0.5) 50%, transparent 95%);
    z-index: 1;
    opacity: 0.8;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(25, 40, 135, 0.15), transparent);
}

.page-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    letter-spacing: -0.5px;
}

.page-header h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color) 30%, var(--accent-color));
    transform: translateX(-50%);
    border-radius: 2px;
    animation: widthExpand 1s ease-out forwards;
    opacity: 0.8;
}

.page-header .subtitle {
    color: var(--gray-600);
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.3s;
    opacity: 0;
    transform: translateY(10px);
    padding: 0 20px;
    letter-spacing: 0.2px;
}

.page-header .subtitle span {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 500;
    padding: 0 2px;
}

/* 页头装饰元素 */
.header-decoration {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.decoration-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.decoration-dot:nth-child(1) {
    animation-delay: 1s;
    background: var(--primary-color);
    opacity: 0.7;
}

.decoration-dot:nth-child(2) {
    animation-delay: 1.2s;
    background: var(--accent-color);
}

.decoration-dot:nth-child(3) {
    animation-delay: 1.4s;
    background: var(--primary-color);
    opacity: 0.7;
}

/* 新增的动画 */
@keyframes widthExpand {
    from { width: 0; }
    to { width: 80px; }
}

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

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    animation: fadeIn calc(var(--animation-speed) + 0.1s) ease-out;
}

h1 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-medium);
    font-size: 1.1rem;
    animation: fadeIn calc(var(--animation-speed) + 0.2s) ease-out;
}

/* 主要内容区域 */
main {
    margin-bottom: 40px;
}

.data-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 30px;
    transition: box-shadow var(--animation-speed) ease, transform var(--animation-speed) ease;
    animation: fadeIn calc(var(--animation-speed) + 0.3s) ease-out;
}

.data-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* 添加渐变线样式 */
.gradient-line {
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), transparent 80%);
    margin: -10px 0 20px 0;
    border-radius: 2px;
    opacity: 0.7;
    width: 80%;
}

/* 章节标题优化 */
.section-title {
    position: relative;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.4rem;
    padding-bottom: 8px;
    border-bottom: none;
}

/* 表格容器优化 */
.table-container {
    overflow-x: auto;
    position: relative;
    border-radius: 8px;
    padding: 2px;
    background: linear-gradient(to bottom, var(--border-color), transparent 20%);
    background-size: 100% 10px;
    background-repeat: no-repeat;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    scrollbar-width: thin;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.table-container::-webkit-scrollbar {
    height: 8px;
    background-color: #f5f5f5;
}

.table-container::-webkit-scrollbar-track {
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
}

.table-container::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: var(--primary-light);
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 表格样式优化 */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    margin-bottom: 0;
    background-color: var(--card-bg);
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    transition: background-color var(--animation-speed) ease;
}

th {
    background-color: var(--header-bg);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* 添加按钮样式 */
.btn {
    display: inline-block;
    font-weight: 500;
    color: #212529;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-group {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.btn-group .btn {
    border-radius: 4px;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 分析容器优化 */
.analysis-container {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    border-left: 3px solid var(--accent-color);
    transition: all var(--animation-speed) ease;
}

.analysis-container:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-left-color: var(--primary-color);
}

.analysis-container p {
    color: var(--text-medium);
    margin-bottom: 0;
    line-height: 1.7;
}

/* 仪表盘优化 */
.dashboard-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
    transition: all var(--animation-speed) ease;
    height: 100%;
    border: 1px solid var(--border-color);
}

.dashboard-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.dashboard-card h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* 表格注释优化 */
.table-note {
    font-size: 0.85rem;
    color: var(--text-medium);
    text-align: left;
    padding: 12px 15px;
    background-color: var(--primary-light);
    border-radius: 0 0 8px 8px;
}

.table-note span {
    font-style: italic;
    display: block;
    line-height: 1.6;
    position: relative;
    padding-left: 20px;
}

.table-note:before {
    content: "ℹ️";
    margin-right: 5px;
    position: absolute;
    left: 15px;
}

/* 表格自适应大小 */
table {
    border-collapse: separate; /* 改为separate以支持边框间距 */
    border-spacing: 0; /* 移除单元格间距 */
    width: 100%;
    margin-top: 0; /* 移除顶部外边距 */
    font-size: 0.875rem; /* 稍微减小字体 */
    font-weight: 400;
    table-layout: fixed; /* 固定表格布局 */
    border-radius: 8px;
    overflow: hidden; /* 确保圆角正确显示 */
    box-shadow: none; /* 移除表格阴影，保留容器阴影 */
    border: none; /* 移除表格边框，使用容器边框 */
    animation: fadeIn calc(var(--animation-speed) + 0.4s) ease-out;
}

/* 表格列宽度调整 */
th, td {
    padding: 10px 6px; /* 减小内边距 */
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    word-wrap: break-word; /* 允许长文本换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 超出显示省略号 */
}

/* 表格样式 */
th {
    background-color: var(--header-bg);
    background-image: linear-gradient(to bottom, rgba(64, 86, 212, 0.2), rgba(0, 0, 0, 0.1)); /* 添加渐变效果 */
    font-weight: 500;
    color: white;
    position: sticky;
    top: 0;
    padding: 12px 4px; /* 减少水平内边距，增加垂直内边距 */
    font-size: 0.85rem; /* 进一步减小字体 */
    letter-spacing: 0; /* 移除字间距 */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); /* 添加文字阴影 */
    border-right: 1px solid rgba(255, 255, 255, 0.1); /* 添加右侧分隔线 */
    border-bottom: 2px solid var(--primary-color); /* 加粗底部边框 */
    white-space: normal; /* 允许文本换行 */
    cursor: pointer; /* 添加指针样式表示可点击 */
    user-select: none; /* 防止文本被选中 */
    transition: background-color 0.2s ease; /* 添加过渡效果 */
    height: 50px; /* 设置固定高度 */
    line-height: 1.2; /* 减小行高 */
}

th:first-child {
    border-top-left-radius: 8px; /* 左上圆角 */
}

th:last-child {
    border-top-right-radius: 8px; /* 右上圆角 */
    border-right: none; /* 移除最后一列的右侧边框 */
}

/* 年份列宽度 */
th:first-child, td:first-child {
    width: 70px;
}

/* 分数线列宽度 */
th:nth-child(9), td:nth-child(9),
th:nth-child(10), td:nth-child(10),
th:nth-child(11), td:nth-child(11) {
    width: 60px;
}

/* 人数列宽度 */
th:nth-child(n+2):nth-child(-n+8), 
td:nth-child(n+2):nth-child(-n+8) {
    width: calc((100% - 70px - 180px) / 7); /* 平均分配剩余宽度 */
}

/* 表格响应式调整 */
@media (max-width: 992px) {
    .table-container {
        margin: 0 -15px 20px; /* 负外边距使表格容器可以全宽 */
        width: calc(100% + 30px);
        border-radius: 0; /* 移除边框半径 */
    }
    
    th {
        font-size: 0.8rem; /* 更小的字体 */
        padding: 10px 2px; /* 极小内边距 */
        white-space: normal; /* 允许文本换行 */
        height: 45px; /* 稍微减少高度 */
    }
    
    td {
        padding: 8px 4px; /* 减小内边距 */
        font-size: 0.8rem; /* 更小的字体 */
    }
    
    /* 年份和分数线列保持固定宽度 */
    th:first-child, td:first-child {
        width: 60px;
    }
    
    th:nth-child(9), td:nth-child(9),
    th:nth-child(10), td:nth-child(10),
    th:nth-child(11), td:nth-child(11) {
        width: 50px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 576px) {
    .data-card {
        padding: 10px; /* 减小卡片内边距 */
    }
    
    th, td {
        padding: 6px 2px; /* 极小内边距 */
        font-size: 0.75rem; /* 最小字体 */
    }
    
    /* 隐藏某些不太重要的列 */
    th:nth-child(6), td:nth-child(6),
    th:nth-child(7), td:nth-child(7),
    th:nth-child(8), td:nth-child(8) {
        display: none;
    }
}

/* 自定义滚动条样式 (Webkit浏览器) */
.table-container::-webkit-scrollbar {
    height: 6px; /* 水平滚动条高度 */
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1; /* 滚动条轨道背景 */
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--border-color); /* 滚动条颜色 */
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color); /* 滚动条悬停颜色 */
}

/* 表头顶部高亮效果 */
thead::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
}

/* 表格单元格样式 */
td {
    border-right: 1px solid rgba(0, 0, 0, 0.05); /* 添加淡边框 */
    transition: all 0.2s ease;
}

td:last-child {
    border-right: none; /* 移除最后一列的右侧边框 */
}

tr:last-child td {
    border-bottom: none; /* 移除最后一行的底部边框 */
}

tr:nth-child(even) {
    background-color: rgba(245, 247, 250, 0.5); /* 为偶数行添加浅色背景 */
}

tr:hover {
    background-color: var(--hover-color); /* 使用与选科要求相同的悬停色 */
    transition: background-color 0.2s ease;
}

tbody tr:hover td:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-bottom: 2px solid var(--primary-color);
    pointer-events: none;
}

/* 特殊数据样式 */
td:first-child {
    font-weight: 500;
    background-color: rgba(245, 247, 250, 0.3); /* 为年份列添加浅背景 */
}

td:nth-child(9), 
td:nth-child(10), 
td:nth-child(11) {
    color: var(--accent-color);
    font-weight: 400;
    background-color: rgba(245, 250, 247, 0.3); /* 为分数线列添加轻微不同的背景 */
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 15px 0;
    color: var(--text-medium);
    font-size: 0.9rem;
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

/* 加载状态 */
.loading-message {
    text-align: center;
    padding: 30px;
    color: var(--text-medium);
}

.error-message {
    text-align: center;
    padding: 30px;
    color: #E74C3C;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 响应式样式 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .data-card {
        padding: 15px;
    }
    
    th {
        padding: 12px 6px; /* 减小水平内边距 */
        font-size: 0.85rem; /* 进一步减小字体 */
        letter-spacing: 0; /* 移除字间距 */
        white-space: nowrap; /* 确保在移动设备上也不换行 */
    }
    
    td {
        padding: 10px 6px; /* 减小水平内边距 */
        font-size: 0.85rem;
    }
    
    /* 简化小屏幕上的样式 */
    tr:nth-child(even) {
        background-color: rgba(245, 247, 250, 0.3); /* 减淡背景色 */
    }
    
    .dashboard-row {
        flex-direction: column;
    }
    
    .dashboard-card {
        margin: 0 0 20px;
        min-width: auto;
    }
    
    .pie-container, .bar-container {
        height: 250px;
    }
}

/* 查看历史数据按钮样式 */
.history-button-cell {
    text-align: center;
    padding: 20px 0;
    background-color: rgba(74, 144, 226, 0.02);
}

.history-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.history-button:hover {
    background-color: #3a80d1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.history-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 图表样式 */
.chart-container {
    position: relative;
    height: 400px;
    margin-top: 20px;
    padding: 10px;
    animation: fadeIn calc(var(--animation-speed) + 0.5s) ease-out;
}

/* 年度数据仪表盘样式 */
.dashboard-controls {
    display: flex;
    align-items: center;
    margin: 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-controls label {
    margin-right: 10px;
    font-weight: 500;
    color: var(--text-dark);
}

.dashboard-controls select {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color var(--animation-speed) ease, box-shadow var(--animation-speed) ease;
}

.dashboard-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.dashboard-container {
    margin-top: 20px;
}

.dashboard-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 20px;
}

.dashboard-card {
    flex: 1;
    min-width: 300px;
    margin: 0 10px 20px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow var(--animation-speed) ease, transform var(--animation-speed) ease;
    animation: fadeIn calc(var(--animation-speed) + 0.6s) ease-out;
}

.dashboard-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.dashboard-card h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-dark);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.full-width {
    flex: 0 0 100%;
}

.pie-container, .bar-container {
    height: 300px;
}

.kpi-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.kpi-item {
    flex: 1;
    min-width: 150px;
    margin: 10px;
    padding: 15px;
    text-align: center;
    background-color: rgba(245, 247, 250, 0.5);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
    transition: transform var(--animation-speed) ease, box-shadow var(--animation-speed) ease;
}

.kpi-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.kpi-title {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.kpi-change {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.change-up {
    color: #F44336; /* 修改为红色 */
}

.change-down {
    color: #4CAF50; /* 修改为绿色 */
}

.change-neutral {
    color: var(--text-medium);
}

.analysis-container {
    padding: 15px;
    background-color: rgba(245, 247, 250, 0.5);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
    transition: transform var(--animation-speed) ease, box-shadow var(--animation-speed) ease;
}

.analysis-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.analysis-container p {
    line-height: 1.6;
    color: var(--text-dark);
}

/* 可排序表头样式 */
.sortable {
    position: relative;
    padding-right: 15px; /* 减少为排序图标腾出的空间 */
}

.sortable::after {
    content: "⇅"; /* 双向箭头表示可排序 */
    position: absolute;
    right: 4px; /* 减少右侧间距 */
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    font-size: 0.75em; /* 减小箭头大小 */
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sortable:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.sortable.asc::after {
    content: "↑"; /* 上箭头表示升序 */
    opacity: 1;
    color: white;
}

.sortable.desc::after {
    content: "↓"; /* 下箭头表示降序 */
    opacity: 1;
    color: white;
}

/* 激活排序的列样式 */
.sorted-column {
    background-color: rgba(64, 86, 212, 0.9) !important;
    position: relative;
}

.sorted-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    pointer-events: none;
}

/* 表格排序时的平滑过渡效果 */
tbody {
    transition: min-height 0.3s ease;
}

tbody tr {
    transition: transform 0.3s ease, opacity 0.2s ease, background-color 0.3s ease;
}

@keyframes highlightRow {
    0% { background-color: rgba(74, 144, 226, 0.15); }
    50% { background-color: rgba(74, 144, 226, 0.25); }
    100% { background-color: transparent; }
}

.highlight-row {
    animation: highlightRow 1s ease;
}

/* 修正平板和移动端显示问题 */
@media (max-width: 1024px) {
    .dashboard-card {
        min-width: calc(50% - 20px);
    }
    
    .sortable::after {
        right: 5px; /* 减少箭头右侧间距 */
        font-size: 0.75em; /* 稍微减小箭头大小 */
    }
}

@media (max-width: 768px) {
    .dashboard-card {
        min-width: 100%;
    }
    
    .sortable {
        padding-right: 18px; /* 为排序图标减少空间 */
    }
    
    .sortable::after {
        right: 3px; /* 移动排序图标 */
        font-size: 0.7em; /* 更小的图标 */
    }
}

/* 表格底部注释样式 */
tfoot tr {
    background-color: #f5f7fa !important;
    border-top: 1px solid var(--border-color);
}

tfoot td {
    padding: 8px 15px !important;
    text-align: center !important;
    font-size: 0.85rem !important;
    color: var(--text-medium) !important;
    font-style: normal;
    line-height: 1.4;
    white-space: nowrap !important; /* 强制在一行显示 */
    overflow: visible !important;
}

.table-note {
    display: inline-block;
    position: relative;
}

.table-note span {
    display: inline;
    position: relative;
    white-space: nowrap;
    color: var(--text-medium);
    font-weight: normal;
}

.table-note:before {
    content: "📊";
    margin-right: 6px;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    tfoot td {
        font-size: 0.75rem !important;
        padding: 8px 10px !important;
    }
} 