/* 引入 AOS 动画库和 Bootstrap Icons */
@import url('https://unpkg.com/aos@2.3.1/dist/aos.css');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css');

.sidebar-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 1.5rem;
    height: calc(100vh - 3rem);
    overflow-y: auto;
}

/* 基础动画 */
.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 导航样式 */
.nav-pills .nav-link {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-pills .nav-link:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
    transform: translateX(5px);
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    border-left-color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.nav-pills .nav-link i {
    font-size: 1.1rem;
}

/* 卡片样式 */
.card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

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

/* 论文卡片特殊样式 */
.publication-card {
    border-left: 4px solid #0d6efd;
}

.publication-card:hover {
    border-left-color: #6610f2;
}

/* 专利卡片特殊样式 */
.patent-card {
    border-left: 4px solid #198754;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.patent-card:hover {
    border-left-color: #146c43;
}

/* 项目卡片特殊样式 */
.project-card {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
}

.project-card:hover {
    border-left-color: #ffcd39;
}


/* 图片容器样式 */
.image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgb(255, 255, 255);
}

/* 图片样式 */
.publication-image {
    width: auto !important;
    /* 宽度按比例自动缩放 */
    height: 100% !important;
    /* 图片高度与容器相同 */
    transition: transform 0.3s ease;
}


.publication-image:hover {
    transform: scale(1.05);
}

/* 内容区域 */
.card-title {
    font-weight: 600;
    line-height: 1.4;
}

.abstract-content {
    margin-top: 0.5rem;
    line-height: 1.6;
    color: #6c757d;
}

/* 链接按钮 */
.link-buttons .btn {
    transition: all 0.3s ease;
    border-radius: 20px;
}

.link-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* 徽章样式 */
.badge {
    font-size: 0.75rem;
    padding: 0.5em 0.8em;
    border-radius: 20px;
}

/* 空状态样式 */
.text-center.py-5 {
    color: #adb5bd;
}

.text-center.py-5 i {
    opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar-sticky {
        position: static;
        height: auto;
    }

    .image-container {
        position: static;
        height: 200px;
        min-height: 0;

    }

    .sticky-top {
        position: static !important;
    }

    .nav-pills .nav-link {
        padding: 1rem !important;
        text-align: center !important;
    }

    .card-body {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .nav-pills {
        flex-direction: row !important;
    }

    .nav-pills .nav-link {
        flex: 1;
        font-size: 0.9rem;
    }

    .badge {
        display: block;
        margin-top: 0.25rem;
        margin-left: 0 !important;
    }
}

/* 加载动画 */
.tab-pane {
    animation: slideIn 0.5s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 打印样式 */
@media print {

    .nav-pills,
    .sticky-top {
        display: none !important;
    }

    .col-lg-9 {
        width: 100% !important;
    }

    .card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

.journal-badge {
    white-space: normal;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    text-align: left;
}