body {
    font-family: 'Noto Serif SC', serif;
    background: #f8fafc;
    color: #333;
}

.navbar {
    background: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 0.8rem 0;
}

.navbar-brand {
    font-weight: 700;
    color: #2a6a8e !important;
    font-size: 1.6rem;
    transition: color 0.3s;
}

.navbar-brand:hover {
    color: #1e4b66 !important;
}

.nav-link {
    color: #555 !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #2a6a8e !important;
}

/* 搜索框样式 */
.search-form {
    display: flex;
    align-items: center;
    max-width: 250px;
}

.search-form input {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid #d3dbe3;
    border-radius: 8px 0 0 8px;
    background: #f0f4f8;
    color: #1e4b66;
    width: 200px;
    transition: border-color 0.3s ease;
}

.search-form input:focus {
    outline: none;
    border-color: #2a6a8e;
}

.search-form button {
    font-family: 'Noto Serif SC', serif;
    white-space: nowrap;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0 8px 8px 0;
    background: #2a6a8e;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.search-form button:hover {
    background: #1e4b66;
}

.search-form button:active {
    transform: scale(0.98);
}

/* 手机端导航栏和搜索框 */
@media (max-width: 767px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem !important;
    }

    .navbar-nav {
        padding: 0.5rem 0;
    }

    .search-form {
        max-width: 100%;
        margin: 0.5rem 1rem;
    }

    .search-form input {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        width: 100%;
    }

    .search-form button {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

.video-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.video-card img {
    object-fit: cover;
    height: 180px;
    width: 100%;
    transition: transform 0.3s ease;
}

.video-card:hover img {
    transform: scale(1.02);
}

.card-body {
    padding: 0.8rem;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.3rem;
}

.card-date {
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
}

.footer {
    background: #2a6a8e;
    color: white;
    padding: 2.5rem 0;
    font-size: 0.85rem;
}

.footer a {
    color: #e6edf3;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: #ffffff;
}

/* 分类区域样式 */
.category-filter {
    margin: 1.5rem auto;
    padding: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.category-filter .btn {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    margin: 0.4rem 0.3rem;
    border-radius: 8px;
    border: none;
    color: #ffffff;
    background: #2a6a8e;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    min-width: 6rem;
    text-align: center;
}

.category-filter .btn:hover,
.category-filter .btn.active {
    background: #1e4b66;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* 手机端分类每行4个 */
@media (max-width: 767px) {
    .category-filter .btn {
        flex: 0 0 22%;
        margin: 0.3rem 0.3rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-width: 0;
    }

    .video-card img {
        height: 150px;
    }
}

/* 电脑端分类间距 */
@media (min-width: 768px) {
    .category-filter .btn {
        padding: 0.6rem 1.4rem;
        margin: 0.5rem 0.4rem;
    }
}

/* 友情链接区域样式 */
.friend-links {
    margin: 1.5rem auto;
    padding: 1.2rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

.friend-links h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2a6a8e;
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
}

.friend-links .link-item {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 0.4rem 0.5rem;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    background: #e6edf3;
    text-decoration: none;
    color: #2a6a8e;
    transition: background 0.3s ease, color 0.3s ease;
}

.friend-links .link-item:hover {
    background: #2a6a8e;
    color: #ffffff;
}

/* 手机端友情链接每行4个，从左边开始排序，消除两边空白 */
@media (max-width: 767px) {
    .friend-links {
        padding: 0;
        margin: 1.5rem 0;
    }

    .friend-links h5 {
        margin-bottom: 0.8rem;
        font-size: 1rem;
        text-align: left;
        padding-left: 0.5rem;
    }

    .friend-links .link-item {
        flex: 0 0 calc(25% - 0.4rem);
        margin: 0.2rem;
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
        font-weight: 600;
        text-align: center;
        box-sizing: border-box;
        line-height: 1.2;
        background: #f0f4f8;
        color: #1e4b66;
        border: 1px solid #d3dbe3;
        transition: background 0.2s ease, transform 0.2s ease;
    }

    .friend-links .link-item:hover {
        background: none;
        color: #1e4b66;
        transform: none;
    }

    .friend-links .link-item:active {
        background: #1e4b66;
        color: #ffffff;
        transform: scale(0.98);
    }

    .friend-links {
        justify-content: flex-start;
    }
}

/* 热门推荐区域样式 */
.hot-recommend {
    margin: 1.5rem auto;
    padding: 1rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    max-width: 100%;
}

.hot-recommend h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a3c5e;
    margin-bottom: 1rem;
    width: 100%;
    text-align: center;
}

.hot-recommend .hot-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

/* 热门推荐区域样式 */
.hot-recommend .hot-item {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    background: #d1e0f5;
    text-decoration: none;
    color: #1a3c5e;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
    text-align: left; /* 改为左对齐 */
    white-space: normal; /* 允许换行 */
}

.hot-recommend .hot-item:hover {
    background: #2a6a8e;
    color: #ffffff;
}

.hot-recommend .hot-item:active {
    background: #1e4b66;
    color: #ffffff;
    transform: scale(0.98);
}

        /* 手机端热门推荐自适应排序 */
@media (max-width: 767px) {
    .hot-recommend .hot-items {
        gap: 0.3rem;
    }

    .hot-recommend .hot-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        white-space: normal; /* 允许文本换行 */
        max-width: 100%; /* 限制宽度以适应容器 */
        box-sizing: border-box; /* 确保padding不影响宽度 */
    }

    /* 长关键词动态缩小字体 */
    .hot-recommend .hot-item.long-text {
        font-size: 0.7rem;
    }
}

/* 广告横幅区域样式 */
.ad-banner {
    margin: 1.5rem auto;
    padding: 0;
    max-width: 728px;
    text-align: center;
}

.ad-banner a {
    display: inline-block;
    text-decoration: none;
}

.ad-banner img {
    width: 728px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ad-banner a:hover img {
    transform: scale(1.02);
    opacity: 0.9;
}

.ad-banner a:active img {
    transform: scale(0.98);
}

/* 手机端广告横幅 */
@media (max-width: 767px) {
    .ad-banner {
        margin: 1rem 0;
    }

    .ad-banner img {
        width: 100%;
        height: auto;
        max-height: 90px;
    }
}

/* 视频网格标题区域样式 */
.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-header h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2a6a8e;
    margin: 0;
}

.video-header a {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    background: #2a6a8e;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.video-header a:hover {
    background: #1e4b66;
    transform: scale(1.02);
}

.video-header a:active {
    transform: scale(0.98);
}

/* 手机端视频网格标题 */
@media (max-width: 767px) {
    .video-header {
        padding: 0.5rem;
    }

    .video-header h5 {
        font-size: 1rem;
    }

    .video-header a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* 视频网格：手机端2列，电脑端6列 */
@media (max-width: 767px) {
    .row-cols-sm-2 > * {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 768px) {
    .row-cols-md-6 > * {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }
}
.breadcrumb-nav {
    margin-bottom: 1rem;
    border-bottom: 1px solid #d3dbe3;
    padding-bottom: 0.5rem;
}

.breadcrumb {
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    font-weight: 600;
    background: transparent;
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item a {
    color: #2a6a8e;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #1e4b66;
}

.breadcrumb-item.active {
    color: #333;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #2a6a8e;
}

@media (max-width: 767px) {
    .breadcrumb {
        font-size: 0.9rem;
    }

    .breadcrumb-nav {
        padding-bottom: 0.3rem;
    }
}