/* 添加在文件最前面 */
:root {
    --bs-primary: #a21f24;
    --bs-link-color: #a21f24;
    --bs-link-hover-color: #8a1a1f;
}

/* 添加全局链接样式 */
a {
    color: #a21f24;
}

/* 添加按钮样式 */
.btn-primary {
    background-color: #a21f24 !important;
    border-color: #a21f24 !important;
}

.btn-primary:hover {
    background-color: #8a1a1f !important;
    border-color: #8a1a1f !important;
}

body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #f8f9fa;
}

.sidebar-heading {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    color: #333;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333 !important;
    padding: 0.5rem 1rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff !important;
    background-color: #a21f24;
}

main {
    padding-top: 48px;
}

@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        top: 56px;
        width: 100%;
        z-index: 1000;
    }
    
    main {
        margin-top: 56px;
    }
    
    .sidebar-heading {
        display: none;
    }
    
    .sidebar .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1.1rem;
    }
    
    .sidebar .mt-auto {
        margin: 1rem 0 !important;
    }
}

.border-bottom {
    border-bottom: 1px solid #a21f24 !important;
}

.h2 {
    color: #a21f24;
}

/* 添加这些新的样式规则 */
#score-table.table {
    border-collapse: separate;
    border-spacing: 0;
}

#score-table.table th,
#score-table.table td {
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
}

#score-table.table th:last-child,
#score-table.table td:last-child {
    border-right: 1px solid #dee2e6;
}

#score-table.table thead th {
    border-bottom: 2px solid #dee2e6;
}

/* 修改表格容器样式 */
.table-container {
    border: 1px solid #dee2e6;
    width: 100%;
    overflow-x: auto;
}

/* 确保表格填满容器宽度 */
#score-table.table {
    width: 100%;
}

/* 可选：为小屏幕设置最小宽度，确保所有列都可见 */
@media (max-width: 768px) {
    #score-table.table {
        min-width: 1000px; /* 根据实际需要调整 */
    }
}

/* 修改学生列表特定样式 */
#student-list a {
    color: #333333 ;  /* 黑色 */
    text-decoration: underline;  /* 添加下划线 */
}

#student-list a:hover {
    color: #000000;  /* 鼠标悬停时更深的黑色 */
}

/* 下载按钮自定义样式 - 使用深橙色，与红色主题更协调 */
#download-btn.btn-success,
button[id="download-btn"].btn-success {
    background-color: #d2691e !important;
    border-color: #d2691e !important;
    color: #fff !important;
}

#download-btn.btn-success:hover,
button[id="download-btn"].btn-success:hover {
    background-color: #b8541a !important;
    border-color: #b8541a !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(210, 105, 30, 0.3);
}

/* 添加新的响应式布局样式 */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
    
    main {
        padding: 1rem;
    }
    
    /* 优化表格在移动端的显示 */
    .table-responsive {
        margin: 0 -1rem;
    }
    
    /* 调整按钮大小 */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* 添加过渡动画效果 */
.sidebar {
    transition: all 0.3s ease-in-out;
}

/* 优化导航按钮样式 */
.navbar-toggler {
    padding: 0.5rem;
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

/* 修改分组标题样式 */
.section-title {
    font-size: 1rem !important;
    font-weight: bold !important;
    color: #a21f24 !important;
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
    border-left: 4px solid #a21f24;
    border-bottom: 2px solid rgba(162, 31, 36, 0.2);
    background-color: rgba(162, 31, 36, 0.05);
}

/* 调整分组容器的间距 */
.sidebar-section {
    margin-bottom: 0.5rem;
}

/* 调整分组内导航项的间距 */
.sidebar-section .nav-link {
    padding: 0.5rem 1.2rem;  /* 左侧稍微缩进，与标题对齐 */
}
