body {
    padding-top: 20px;
    background-color: #f8f9fa;
}

.sidebar {
    position: fixed;
    top: 20px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 20px 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #343a40;
    color: white;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 40px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    margin: 5px 0;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: white;
    background-color: #007bff;
}

.sidebar .nav-link i {
    margin-right: 10px;
}

main {
    padding: 20px;
    margin-left: 220px;
}

.row .col-md-4 {
    display: none;
    /* 默认隐藏所有卡片 */
}

.card {
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.resource-img {
    height: 150px;
    object-fit: cover;
    cursor: pointer;
}

.modal-img {
    max-width: 100%;
    max-height: 80vh;
}

/* 新增加载动画样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}