.student-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.student-avatar {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.student-avatar-placeholder {
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
}

.navbar-brand {
    font-weight: bold;
}

/* 为固定顶栏调整页面内容 */
body {
    padding-top: 76px; /* 导航栏高度 + 额外间距 */
}

/* 移动端导航栏高度调整 */
@media (max-width: 768px) {
    body {
        padding-top: 66px; /* 移动端导航栏高度较小 */
    }
}

/* 卡片样式 */
.card {
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
}

/* 按钮样式 */
.btn {
    border-radius: 20px;
    padding: 8px 16px;
}

/* 徽章样式 */
.badge {
    border-radius: 12px;
    padding: 6px 12px;
}

/* 积分徽章样式 */
.points-badge {
    border-radius: 12px;
    display: inline-block;
    white-space: nowrap;
    color: white;
}

/* 表格样式 */
.table {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0;
}

.table thead th {
    background-color: #0d6efd !important;
    color: white !important;
    border-bottom: 2px solid #dee2e6;
}

/* 手动添加表格条纹效果 */
.table tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

/* 分离表头和表体的样式 */
.table-header-fixed {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: white;
}

.table-body-scrollable {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* 确保表头和表体列宽一致 */
.privileges-table .table th,
.privileges-table .table td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* 固定表头容器样式 */
.table-responsive {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    position: relative;
}

/* 确保表头真正固定 - 使用更高优先级 */
.privileges-table .table-responsive thead {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

.privileges-table .table-responsive thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background-color: #0d6efd !important;
    color: white !important;
    border-bottom: 2px solid #dee2e6;
}

/* 模态框样式 */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    border-radius: 0 0 15px 15px;
}

/* 表单样式 */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 警告框样式 */
.alert {
    border-radius: 10px;
    border: none;
}

/* 加载框样式 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-content {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    width: 90%;
}

/* 页脚样式 */
footer {
    margin-top: auto;
}

/* 移动端响应式调整 */
@media (max-width: 768px) {
    /* 调整卡片大小和间距 */
    .rank-card {
        padding: 12px !important;
    }
    
    /* 调整字体大小 */
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    /* 调整按钮大小 */
    .btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    /* 调整输入框大小 */
    .form-control, .form-select {
        font-size: 0.9rem;
    }
    
    /* 调整导航栏 */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* 调整积分徽章 */
    .points-badge {
        padding: 4px 8px !important;
        font-size: 0.85rem;
    }
    
    /* 表格响应式调整 - 使用动态计算确保一致性 */
    .table-body-scrollable {
        max-height: calc(100vh - 200px);
    }
    
    .table-responsive {
        max-height: calc(100vh - 200px);
    }
    
    .privileges-table .table th,
    .privileges-table .table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.85rem;
    }
    
    /* 调整表格列宽 */
    .privileges-table .table th:nth-child(1),
    .privileges-table .table td:nth-child(1) {
        width: 40px !important;
    }
    
    .privileges-table .table th:nth-child(2),
    .privileges-table .table td:nth-child(2) {
        width: 80px !important;
    }
    
    .privileges-table .table th:nth-child(3),
    .privileges-table .table td:nth-child(3),
    .privileges-table .table th:nth-child(4),
    .privileges-table .table td:nth-child(4),
    .privileges-table .table th:nth-child(5),
    .privileges-table .table td:nth-child(5),
    .privileges-table .table th:nth-child(6),
    .privileges-table .table td:nth-child(6),
    .privileges-table .table th:nth-child(7),
    .privileges-table .table td:nth-child(7),
    .privileges-table .table th:nth-child(8),
    .privileges-table .table td:nth-child(8) {
        width: 60px !important;
    }
    
    /* 调整徽章大小 */
    .badge {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
}

/* 超小屏幕调整 */
@media (max-width: 480px) {
    .table-body-scrollable {
        max-height: calc(100vh - 180px);
    }
    
    .table-responsive {
        max-height: calc(100vh - 180px);
    }
    
    .privileges-table .table th,
    .privileges-table .table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.8rem;
    }
    
    /* 隐藏部分文字或使用缩写 */
    .privileges-table .table th:nth-child(3):after,
    .privileges-table .table th:nth-child(4):after,
    .privileges-table .table th:nth-child(5):after,
    .privileges-table .table th:nth-child(6):after,
    .privileges-table .table th:nth-child(7):after {
        content: "";
        display: block;
        font-size: 0.7rem;
        margin-top: 2px;
    }
    

    
    /* 调整按钮大小 */
    .btn-sm {
        padding: 3px 6px;
        font-size: 0.75rem;
    }
}