:root {
    --primary-blue: #003a8c;
    --secondary-blue: #0056b3;
    --light-blue: #e6f7ff;
    --kmust-red: #c60b1e;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    color: #333;
    background-color: #f9f9f9;
}

/* 顶部信息栏 */
.top-info-bar {
    background: linear-gradient(90deg, #003a8c 0%, #0056b3 100%);
    font-size: 0.85rem;
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(224, 134, 134, 0.1);
}

.top-info-bar a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    margin: 0 8px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
}

.top-info-bar a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.top-info-bar a i {
    margin-right: 5px;
    font-size: 0.9rem;
}

/* 导航栏 */
.navbar-kmust {
    background-color: var(--primary-blue);
    padding: 0.6rem 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.navbar-kmust .navbar-brand {
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
    max-width: 40%;
}

.navbar-kmust .navbar-brand i {
    margin-right: 8px;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.navbar-kmust .navbar-brand .logo {
    height: 40px;
    margin-right: 8px;
    flex-shrink: 0;
}

.navbar-kmust .navbar-brand .brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-kmust .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem;
    transition: all 0.3s;
    border-radius: 4px;
    margin: 0 2px;
    white-space: nowrap;
}

.navbar-kmust .nav-link:hover,
.navbar-kmust .nav-link.active {
    color: white;
    background-color: var(--secondary-blue);
}

/* 下拉菜单 */
.navbar-nav .dropdown {
    position: relative;
}

.dropdown-menu {
    background-color: var(--primary-blue);
    border: none;
    border-radius: 0 0 8px 8px;
    padding: 0;
    margin-top: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.7rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--secondary-blue);
    color: white;
}

.dropdown-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* 下拉箭头 */
.nav-link.dropdown-toggle::after {
    content: "";
    border: none;
    margin-left: 6px;
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
}

.dropdown:hover .nav-link.dropdown-toggle::after {
    transform: rotate(180deg);
    border-top-color: white;
}

/* 搜索框 */
.navbar-search {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.navbar-search .form-control {
    background-color: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    padding-right: 45px;
    border-radius: 50px;
    width: 220px;
    transition: all 0.3s;
    box-shadow: none;
    flex-shrink: 0;
}

.navbar-search .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.navbar-search .form-control:focus {
    background-color: rgba(255, 255, 255, 0.25);
    width: 260px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.navbar-search .btn {
    position: absolute;
    right: 5px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.35rem 0.75rem;
    border-radius: 50%;
    transition: all 0.3s;
}

.navbar-search .btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

/* 轮播图 */
.carousel-kmust {
    margin-bottom: 30px;
    border-bottom: 3px solid var(--kmust-red);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carousel-item {
    height: 450px;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.carousel-caption h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #fff;
}

/* 轮播背景类 */
.carousel-bg-1 {
    background: linear-gradient(135deg, #003a8c 0%, #0056b3 50%, #007bff 100%);
}

.carousel-bg-2 {
    background: linear-gradient(135deg, #0056b3 0%, #007bff 50%, #28a745 100%);
}

.carousel-bg-3 {
    background: linear-gradient(135deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
}

/* 主要内容区 */
.main-content {
    padding: 40px 0;
}

.section-title {
    border-left: 4px solid var(--primary-blue);
    padding-left: 15px;
    margin-bottom: 25px;
    font-weight: bold;
    color: var(--primary-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title a {
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--dark-gray);
}

.card-custom {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    margin-bottom: 20px;
}

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

.card-header-custom {
    background-color: var(--primary-blue);
    color: white;
    border-radius: 8px 8px 0 0 !important;
    padding: 12px 20px;
    font-weight: bold;
}

.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    border-bottom: 1px dashed #ddd;
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-list a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
    flex-grow: 1;
}

.news-list a:hover {
    color: var(--secondary-blue);
}

.news-date {
    color: #888;
    font-size: 0.9rem;
    min-width: 90px;
    text-align: right;
}

/* 新闻滚动效果 */
.news-scroll-container {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.news-scroll {
    animation: newsScroll 20s linear infinite;
}

.news-scroll:hover {
    animation-play-state: paused;
}

@keyframes newsScroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* 分类标签颜色 */
.badge-category {
    background-color: var(--primary-blue) !important;
}

.badge-category[data-category*="专利"], 
.badge-category[data-category*="媒体报道"] {
    background-color: #2D7A5C !important;
}

.badge-category[data-category*="通知公告"], 
.badge-category[data-category*="软件著作权"] {
    background-color: #6B46C1 !important;
}

.badge-category[data-category*="学术论文"], 
.badge-category[data-category*="项目新闻"] {
    background-color: #2C5282 !important;
}

.badge-category[data-category*="数据集"], 
.badge-category[data-category*="学术活动"] {
    background-color: #C05621 !important;
}



.badge-category[data-category*="获奖情况"] {
    background-color: #2C7A7B !important;
}




/* 研究成果筛选 */
.research-filter {
    background-color: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
}

/* 下载列表 */
.download-list .download-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.download-list .download-item:hover {
    background-color: var(--light-gray);
}

/* 团队成员 */
.team-member {
    text-align: center;
    margin-bottom: 30px;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--primary-blue);
}

/* 合作单位 */
.partner-logo {
    text-align: center;
    padding: 20px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.partner-logo img {
    max-height: 80px;
    max-width: 100%;
}

/* 联系我们表单 */
.contact-form {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 后台管理面板 */
.admin-panel {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 20px;
    margin-top: 40px;
}

.admin-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 30px;
}

.stat-item {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    width: 22%;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue);
}

/* 页脚 */
.footer {
    background-color: var(--primary-blue);
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
    position: relative;
    z-index: 10;
}

.footer h5 {
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 30px;
    padding-top: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.wechat-box { display: flex; align-items: center; background-color: rgba(255,255,255,0.08); border-radius: 10px; padding: 12px; gap: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.wechat-qr { width: 86px; height: 86px; object-fit: cover; border-radius: 6px; background: #fff; padding: 6px; }
.wechat-text { color: #fff; }
.wechat-text .wechat-name { font-weight: 600; margin-bottom: 4px; }
.wechat-text small { opacity: 0.85; }

/* 响应式 */
@media (max-width: 1200px) {
    .navbar-kmust .navbar-brand {
        font-size: 1.3rem;
        max-width: 35%;
    }

    .navbar-kmust .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.6rem;
    }

    .navbar-search .form-control {
        width: 180px;
    }

    .navbar-search .form-control:focus {
        width: 220px;
    }
}

@media (max-width: 992px) {
    .navbar-kmust .navbar-brand {
        font-size: 1.2rem;
        max-width: 50%;
        margin-right: 1rem;
    }

    .navbar-kmust .navbar-brand i {
        font-size: 1.5rem;
    }

    .navbar-search {
        margin-top: 15px;
        width: 100%;
    }

    .navbar-search .form-control {
        width: 100%;
    }

    .navbar-search .form-control:focus {
        width: 100%;
    }

    .top-info-bar .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .top-info-bar a {
        margin: 0 4px;
    }

    .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        box-shadow: none;
    }

    .dropdown:hover .dropdown-menu {
        display: none;
    }

    .show .dropdown-menu {
        display: block;
    }

    .dropdown-item {
        padding-left: 2.5rem;
        color: rgba(255, 255, 255, 0.8);
    }

    .nav-link.dropdown-toggle::after {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (max-width: 768px) {
    .navbar-kmust .navbar-brand {
        font-size: 1.1rem;
        max-width: 60%;
    }

    .navbar-kmust .navbar-brand i {
        font-size: 1.3rem;
    }

    .navbar-kmust .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.5rem;
    }

    .carousel-item {
        height: 300px;
    }

    .carousel-caption h3 {
        font-size: 1.5rem;
    }

    .admin-stats {
        flex-direction: column;
    }

    .stat-item {
        width: 100%;
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .navbar-kmust .navbar-brand {
        font-size: 1rem;
        max-width: 70%;
    }

    .navbar-kmust .navbar-brand .brand-text {
        display: none;
    }

    .navbar-kmust .navbar-brand i {
        margin-right: 0;
        font-size: 1.2rem;
    }

    .top-info-bar a span {
        display: none;
    }

    .top-info-bar a i {
        margin-right: 0;
    }
}