:root {
    --primary-color: #1890ff;
    --text-color: #333;
    --text-secondary: #666;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 轮播图样式 */
.carousel-item {
    height: 500px;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 修改轮播图指示器样式 */
.carousel-indicators {
    bottom: 20px;
    margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
    width: 30px;
    height: 3px;
    border-radius: 1.5px;
    background-color: #fff;
    border: none;
    margin: 0 5px;
    position: relative;
    overflow: hidden;
}

/* 添加进度条动画效果 */
.carousel-indicators .active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background-color: #FF6B00;
    animation: progressBar 5s linear;
    transform-origin: left;
}

@keyframes progressBar {
    0% {
        transform: scaleX(0);
    }

    100% {
        transform: scaleX(1);
    }
}

/* 当轮播图暂停时停止动画 */
.carousel-indicators .active.pause::after {
    animation-play-state: paused;
}

/* 广告横幅样式 */
.banner {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: auto;
}

/* 合作机构样式 */
.partner-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    /* margin: 30px 0; */
    /* 上下间距统一 */
    padding: 1rem 0;
}

.partner-logos img {
    /* height: 70px; */
    /* object-fit: contain; */
    transition: transform 0.3s ease;
    width: 100%;
}

.partner-logos img:hover {
    transform: scale(1.1);
}

/* 轮播图按钮样式 */
.carousel-buttons {
    position: absolute;
    bottom: 50px;
    right: 50px;
    z-index: 10;
    display: flex;
    gap: 15px;
}

.carousel-btn {
    padding: 10px 25px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.carousel-btn-primary {
    background-color: #1890ff;
    color: white;
    border: none;
}

.carousel-btn-primary:hover {
    background-color: #40a9ff;
    color: white;
}

.carousel-btn-outline {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.carousel-btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* 课程网格布局调整 */
.row.g-4 {
    margin: 2rem -15px;
}

.col-md-4 {
    padding: 15px;
}

/* 容器宽度调整 */
.container {
    max-width: 1400px;
    padding: 0 15px;
    margin: 0 auto;
}

/* 模块标题样式 */
.section-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--text-color);
    margin: 40px 0 30px;
    /* 标题上下间距 */
    padding-bottom: 1rem;
    border-bottom: 2px solid #f5f5f5;
}

/* 添加模块间的分隔 */
.section-divider {
    margin: 60px 0;
    /* 分隔线上下间距 */
    height: 1px;
    background: #f0f0f0;
}

/* 轮播图控制按钮的悬停效果 */
.carousel-control-prev,
.carousel-control-next {
    opacity: 0;
    /* 默认隐藏 */
    transition: opacity 0.3s ease;
    /* 添加过渡效果 */
    width: 5%;
    /* 减小按钮宽度 */
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.3);
    /* 添加半透明背景 */
    border-radius: 50%;
    /* 圆形背景 */
    padding: 20px;
    /* 增加点击区域 */
}

/* 鼠标悬停时显示按钮 */
.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

/* 按钮悬停效果 */
.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    /* 悬停时背景色加深 */
}

/* 修改热门好课标题和标签容器的样式 */
.hot-courses {
    margin: 60px 0;
    /* 上下间距统一 */
}

.hot-courses-header {
    margin-bottom: 1rem;
    /* 减小标题和标签的间距 */
}

.hot-courses-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* 修改分类标签容器样式 */
.course-tags-container {
    position: relative;
    overflow: hidden;
    margin: 0;
    /* 移除上下margin */
    padding: 0 30px;
    /* 调整左右padding */
}

.course-tags {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
    padding-left: 0;
    /* 移除左padding使第一个标签对齐标题 */
    margin-left: -30px;
    /* 抵消容器的padding */
}

.course-tag {
    flex-shrink: 0;
    padding: 8px 24px;
    /* 增加内边距使按钮更大 */
    border-radius: 20px;
    /* 增加圆角 */
    background: #f0f2f5;
    color: #666;
    font-size: 15px;
    /* 增加字体大小 */
    text-decoration: none;
    transition: all 0.3s;
    white-space: nowrap;
    font-weight: 500;
    /* 增加字体粗细 */
}

.course-tag:hover,
.course-tag.active {
    background: #1890ff;
    color: white;
}

/* 修改导航按钮的基础样式 */
.tag-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    z-index: 1;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    opacity: 1;
    /* 默认显示 */
}

/* 左侧按钮初始状态 */
.tag-nav-prev {
    left: 0;
    opacity: 0;
    /* 初始隐藏 */
    visibility: hidden;
    /* 使用visibility代替pointer-events */
    transition: all 0.3s ease;
    /* 添加过渡效果 */
}

/* 左侧按钮显示状态 */
.tag-nav-prev.visible {
    opacity: 1;
    visibility: visible;
}

.tag-nav-next {
    right: 0;
}

/* 按钮悬停效果 */
.tag-nav-button:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 1.5rem;
}

.course-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.course-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.course-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.course-content {
    padding: 12px;
}

.course-name {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
}

.course-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.course-school {
    display: flex;
    align-items: center;
    gap: 6px;
}

.school-logo {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.school-name {
    font-size: 13px;
    color: #666;
}

.course-stats {
    font-size: 13px;
    color: #999;
}

/* 修改容器响应式宽度 */
.container {
    max-width: 1400px;
    padding: 0 15px;
    margin: 0 auto;
}

/* 修改课程网格布局 */
.course-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 热门好课响应式样式 */
.course-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.course-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* 响应式布局调整 */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .course-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 隐藏第7和第8个课程卡片 */
    .course-item:nth-child(7),
    .course-item:nth-child(8) {
        display: none;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    .partner-logos {
        flex-wrap: wrap;
        justify-content: center;
        /* gap: 20px; */
        display: none;
    }

    .partner-logos img {
        height: 50px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }

    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-item {
        height: 300px;
    }

    .carousel-buttons {
        bottom: 20px;
        right: 20px;
    }

    .carousel-btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .hot-courses-title {
        font-size: 18px;
    }

    .course-name {
        font-size: 14px;
    }

    .course-desc {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .course-grid {
        grid-template-columns: 1fr;
    }

    .navbar-brand img {
        height: 30px;
    }

    .search-box input {
        width: 150px;
    }

    .carousel-item {
        height: 200px;
    }

    .carousel-buttons {
        bottom: 10px;
        right: 10px;
    }

    .course-tags-container {
        padding: 0 20px;
    }

    .course-tag {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* 导航栏响应式 */
@media (max-width: 992px) {
    .navbar {
        padding: 0.5rem 0;
    }

    .nav-link {
        padding: 0.25rem 0.5rem !important;
    }
}

/* 标签导航按钮响应式 */
@media (max-width: 768px) {
    .tag-nav-button {
        width: 20px;
        height: 20px;
    }

    .tag-nav-button i {
        font-size: 12px;
    }
}

/* 添加全局过渡效果 */
* {
    transition: all 0.3s ease-in-out;
}

/* 修改网格布局过渡效果 */
.course-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    will-change: transform, opacity;
}

/* 优化响应式过渡效果 */
@media (max-width: 1200px) {
    .course-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .course-item:nth-child(7),
    .course-item:nth-child(8) {
        opacity: 0;
        transform: scale(0.8);
        height: 0;
        margin: 0;
        padding: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
        transition: max-width 0.4s ease;
    }

    .partner-logos {
        transition: all 0.4s ease;
    }

    .partner-logos img {
        transition: all 0.3s ease;
    }
}

@media (max-width: 768px) {
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .course-item {
        animation: fadeInScale 0.4s ease forwards;
    }

    @keyframes fadeInScale {
        from {
            opacity: 0;
            transform: scale(0.9);
        }

        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    .carousel-item {
        transition: height 0.4s ease;
    }

    .hot-courses-title,
    .course-name,
    .course-desc {
        transition: font-size 0.3s ease;
    }
}

@media (max-width: 576px) {
    .course-grid {
        grid-template-columns: 1fr;
    }

    .course-item {
        transform: none;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .course-item:hover {
        transform: translateY(-5px);
    }

    .navbar-brand img {
        transition: height 0.3s ease;
    }

    .search-box input {
        transition: width 0.3s ease;
    }
}

/* 添加内容淡入效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.hot-courses {
    animation: fadeIn 0.6s ease-out forwards;
}

/* 优化标签切换动画 */
.course-tags {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-tag {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 优化导航按钮过渡 */
.tag-nav-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-nav-prev {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 修改为什么选择学堂在线模块样式 */
.why-choose {
    background: url(../img/school-bg.png);
    background-size: cover;
    position: relative;
    padding: 60px 0 140px;
    /* 上部间距，底部需要更大间距因为有溢出的卡片 */
    color: white;
    margin: 60px 0 140px;
}

.why-choose-title {
    font-size: 32px;
    font-weight: normal;
    margin-bottom: 20px;
}

.why-choose-desc {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 800px;
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -80px;
    padding: 0 15px;
    margin: 0 auto;
    max-width: 1400px;
    z-index: 2;
}

.feature-item {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: 240px;
    display: flex;
    flex-direction: column;
}

/* 添加标题行容器样式 */
.feature-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    /* 防止图标缩小 */
    background: #f5f7fa;
    padding: 8px;
    border-radius: 8px;
}

.feature-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin: 0;
    /* 移除标题的margin */
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.feature-list li {
    font-size: 14px;
    line-height: 2.2;
    color: #666;
    position: relative;
    padding-left: 16px;
    padding-top: 8px;
}

.feature-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1890ff;
}

/* 修改响应式布局 */
@media (max-width: 992px) {
    .why-choose {
        padding: 40px 0;
        margin: 40px 0;
        overflow: hidden;
    }

    .features-grid {
        position: static;
        /* 改回静态定位 */
        margin-top: 30px;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .feature-item {
        height: auto;
        min-height: 220px;
    }

    .feature-title {
        font-size: 16px;
    }

    .feature-list li {
        font-size: 13px;
        line-height: 2;
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-item {
        min-height: 180px;
    }

    .why-choose-title {
        font-size: 20px;
    }

    .why-choose-desc {
        font-size: 14px;
    }
}

/* 响应式调整 */
@media (max-width: 992px) {
    .carousel {
        margin-bottom: 40px;
    }

    .partner-logos {
        margin: 40px 0;
    }

    .hot-courses {
        margin: 40px 0;
    }

    .why-choose {
        margin: 40px 0;
        padding: 40px 0;
    }

    .section-divider {
        margin: 40px 0;
    }
}

@media (max-width: 576px) {
    .carousel {
        margin-bottom: 30px;
    }

    .partner-logos {
        margin: 30px 0;
    }

    .hot-courses {
        margin: 30px 0;
    }

    .why-choose {
        margin: 30px 0;
        padding: 30px 0;
    }

    .section-divider {
        margin: 30px 0;
    }
}

/* 添加查看更多链接样式 */
.view-more {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.view-more-link {
    display: flex;
    align-items: center;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.view-more-link:hover {
    color: #1890ff;
}

.view-more-link i {
    margin-left: 4px;
    font-size: 12px;
}

/* 合作伙伴模块样式 */
.partners {
    margin: 60px 0;
}

.partners-title {
    font-size: 28px;
    font-weight: normal;
    color: #333;
    margin-bottom: 40px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.partner-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.partner-item img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 修改页脚样式 */
.footer {
    background: #2c2c2c;
    padding: 40px 0;
}

.footer-middle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-slogan {
    color: #fff;
}

.footer-slogan h2 {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 10px;
}

.footer-slogan p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0;
}

.qr-code-container {
    text-align: center;
}

.qr-code {
    width: 120px;
    height: 120px;
    padding: 5px;
    background: #fff;
    border-radius: 4px;
}

.qr-code-text {
    color: #999;
    font-size: 12px;
    margin-top: 8px;
}

.footer-nav {
    /* display: flex; */
    gap: 16px;
    margin-bottom: 30px;
}

.footer-nav a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-nav span {
    color: #666;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-info {
    color: #a8a8a8;
    font-size: 12px;
    line-height: 1.8;
    text-align: left;
}

.footer-info a {
    color: #a8a8a8;
    text-decoration: none;
}

.footer-info a:hover {
    color: #999;
}

@media (max-width: 768px) {
    .footer-middle {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}

/* 修改侧边栏样式 */
.side-bar {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.side-bar{
    border-radius: 12px;
}
.side-bar-item {
    position: relative;
    width: 60px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    background: #fff;
    overflow: hidden;
}
.side-bar-item:first-child{
    border-radius: 12px 12px 0 0;
}
.side-bar-item:last-child{
    border-radius: 0 0 12px 12px;
}
.side-bar-item i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.side-bar-item span {
    position: absolute;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 悬停效果 */
.side-bar-item:hover {
    color: #fff;
    background: #1890ff;
}

.side-bar-item:hover i {
    opacity: 0;
    transform: translateY(-20px);
}

.side-bar-item:hover span {
    opacity: 1;
    transform: translateY(0);
}

.side-bar-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0;
}

/* 修改侧边栏样式 */
.back-to-top {
    transition: all 0.3s ease;
}
#hzshcool{
    display: flex;
    align-items: center;
    flex-wrap: wrap !important;
}
@media screen and (max-width: 768px) {
    #hzshcool{
        display: none;
    }
}
    /* 添加全局样式防止横向滚动 */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* 确保所有容器不超出视口宽度 */
    .container {
        width: 100%;
        max-width: 1400px;
        padding-left: 15px;
        padding-right: 15px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
    
    /* 确保图片不会超出其容器 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 修改课程卡片样式 */
    .course-item {
        text-decoration: none;
        color: inherit;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: block;
    }

    .course-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        color: inherit;
        text-decoration: none;
    }

    /* 二维码弹出层样式 */
    .qr-popup {
        position: fixed;
        right: 90px;
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
        padding: 20px;
        width: 400px;
        max-width: calc(100vw - 100px); /* 确保不超出屏幕 */
        z-index: 1000;
        display: none;
        text-align: left;
        left: auto;
    }
    
    .qr-popup-content {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
    }
    
    .qr-popup-image {
        width: 160px;
        height: 160px;
        margin-right: 20px;
        margin-bottom: 0;
        flex-shrink: 0; /* 防止图片被压缩 */
    }
    
    .qr-popup-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 10px;
        flex: 1; /* 允许文本区域伸缩 */
    }
    
    .qr-popup-title {
        font-size: 18px;
        color: #4e73df;
        margin-bottom: 10px;
        font-weight: 500;
    }
    
    .qr-popup-desc {
        font-size: 14px;
        color: #666;
        margin-bottom: 20px;
    }
    
    .qr-popup-platforms {
        font-size: 14px;
        color: #333;
        margin-bottom: 5px;
    }
    
    .qr-popup-hint {
        font-size: 12px;
        color: #999;
        margin-bottom: 0;
    }

    /* 轮播图控制按钮样式 */
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 20px;  /* 原始大小通常为30px或更大 */
        height: 20px; /* 原始大小通常为30px或更大 */
        background-size: 100% 100%; /* 确保背景图标适应新尺寸 */
    }
    
    /* 可选：调整控制按钮的大小 */
    .carousel-control-prev,
    .carousel-control-next {
        width: 5%; /* 减小控制按钮的宽度 */
    }

    /* 添加媒体查询实现自适应 */
    @media (max-width: 576px) {
        .qr-popup {
            right: 60px;
            padding: 15px;
            width: 300px;
        }
        
        .qr-popup-image {
            width: 120px;
            height: 120px;
            margin-right: 15px;
        }
        
        .qr-popup-title {
            font-size: 16px;
            margin-bottom: 8px;
        }
        
        .qr-popup-desc {
            font-size: 13px;
            margin-bottom: 15px;
        }
        
        .qr-popup-platforms {
            font-size: 13px;
        }
        
        .qr-popup-hint {
            font-size: 11px;
        }
    }

    @media (max-width: 400px) {
        .qr-popup {
            right: 10px;
            width: calc(100vw - 20px);
        }
        
        .qr-popup-content {
            flex-direction: column;
            align-items: center;
        }
        
        .qr-popup-image {
            margin-right: 0;
            margin-bottom: 15px;
        }
        
        .qr-popup-info {
            align-items: center;
            text-align: center;
            padding-top: 0;
        }
    }

    /* 修改热门好课标题与标签的垂直对齐 */
    .hot-courses-header {
        display: flex;
        align-items: center;
        margin-bottom: 20px;
    }
    
    .hot-courses-title {
        font-size: 20px;
        font-weight: bold;
        color: #333;
        margin: 0;
        padding: 0 0.8rem;
        line-height: 36px;
    }
    
    /* 优化标签容器在移动端的显示 */
    .course-tags-container {
        position: relative;
        overflow: hidden;
        width: 100%;
        margin: 0;
        padding: 0 40px;
    }
    
    /* 优化标签样式，使其在移动端更紧凑 */
    .course-tag {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 36px;
        padding: 0 16px;
        border-radius: 20px;
        font-size: 14px;
        text-decoration: none;
        color: #666;
        background-color: #f5f5f5;
        transition: all 0.3s ease;
        flex-shrink: 0;
        line-height: 36px;
        white-space: nowrap;
    }
    
    /* 优化标签容器内的标签排列 */
    .course-tags {
        display: flex;
        align-items: center;
        height: 36px;
        transition: transform 0.3s ease;
        white-space: nowrap;
        gap: 15px;
        padding: 0;
        overflow-x: auto;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    /* 隐藏滚动条但保留滚动功能 */
    .course-tags::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .course-tag.active {
        color: #fff;
        background-color: #4e73df;
    }
    
    /* 调整导航按钮位置 */
    .tag-nav-button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        z-index: 10;
        border-radius: 50%;
        background-color: #fff;
        border: 1px solid #ddd;
        color: #666;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
    }
    
    .tag-nav-button:hover {
        background-color: #f8f9fa;
        color: #4e73df;
        border-color: #4e73df;
    }
    
    .tag-nav-prev {
        left: 0;
    }
    
    .tag-nav-next {
        right: 0;
    }
    
    /* 禁用状态的按钮样式 */
    .tag-nav-button[style*="opacity: 0.5"] {
        cursor: default;
    }
    
    /* 确保热门好课部分的整体布局 */
    .hot-courses {
        margin: 60px 0;
    }
    
    /* 课程网格样式优化 */
    .course-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
        margin-top: 20px;
    }
    
    /* 移动端自适应样式 */
    @media (min-width: 992px) {
        .course-tag{
            width: 10%;
        }
    }
    @media (max-width: 1200px) {
        .course-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 18px;
        }
    }
    
    @media (max-width: 992px) {
        .course-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }
        
        .hot-courses-title {
            font-size: 18px;
        }
        
        .hot-courses {
            margin: 40px 0;
        }
    }
    
    @media (max-width: 768px) {
        .course-tags-container {
            padding: 0 30px;
        }
        
        .tag-nav-button {
            width: 28px;
            height: 28px;
        }
        
        .course-tag {
            height: 32px;
            padding: 0 12px;
            font-size: 13px;
            line-height: 32px;
        }
        
        .hot-courses-title {
            line-height: 32px;
            padding: 0 0.5rem;
        }
        
        .course-tags {
            height: 32px;
            gap: 10px;
        }
        
        /* 优化课程卡片在平板上的显示 */
        .course-item .course-name {
            font-size: 15px;
            margin-bottom: 6px;
        }
        
        .course-item .course-desc {
            font-size: 13px;
            margin-bottom: 8px;
            line-clamp: 2; /* 限制为2行 */
        }
        
        .course-item .course-content {
            padding: 12px;
        }
        
        .course-item .school-logo {
            width: 20px;
            height: 20px;
        }
        
        .course-item .school-name,
        .course-item .course-stats {
            font-size: 12px;
        }
    }
    
    @media (max-width: 576px) {
        .course-grid {
            grid-template-columns: repeat(1, 1fr);
            gap: 15px;
        }
        
        .hot-courses {
            margin: 30px 0;
        }
        
        .hot-courses-header {
            margin-bottom: 15px;
        }
        
        .hot-courses-title {
            font-size: 16px;
        }
        
        .course-tags-container {
            padding: 0 25px;
        }
        
        .tag-nav-button {
            width: 24px;
            height: 24px;
        }
        
        .course-tag {
            height: 30px;
            padding: 0 10px;
            font-size: 12px;
            line-height: 30px;
        }
        
        .course-tags {
            height: 30px;
            gap: 8px;
        }
        
        /* 优化课程卡片在手机上的显示 */
        .course-item {
            display: flex;
            flex-direction: row;
            align-items: center;
            border-radius: 6px;
        }
        
        .course-item .course-image {
            width: 120px;
            height: 90px;
            object-fit: cover;
            border-radius: 6px 0 0 6px;
            flex-shrink: 0;
        }
        
        .course-item .course-content {
            flex: 1;
            padding: 10px 12px;
        }
        
        .course-item .course-name {
            font-size: 14px;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .course-item .course-desc {
            font-size: 12px;
            margin-bottom: 6px;
            display: -webkit-box;
            line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .course-item .course-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .course-item .school-logo {
            width: 16px;
            height: 16px;
            margin-right: 4px;
        }
        
        .course-item .school-name,
        .course-item .course-stats {
            font-size: 11px;
        }
    }
    
    @media (max-width: 375px) {
        .course-tags-container {
            padding: 0 20px;
        }
        
        .tag-nav-button {
            width: 22px;
            height: 22px;
        }
        
        .tag-nav-button i {
            font-size: 10px;
        }
        
        .course-tag {
            height: 28px;
            padding: 0 8px;
            font-size: 11px;
            line-height: 28px;
        }
        
        .course-tags {
            height: 28px;
            gap: 6px;
        }
        
        /* 进一步优化超小屏幕上的课程卡片 */
        .course-item .course-image {
            width: 100px;
            height: 75px;
        }
        
        .course-item .course-content {
            padding: 8px 10px;
        }
        
        .course-item .course-name {
            font-size: 13px;
            margin-bottom: 3px;
        }
        
        .course-item .course-desc {
            font-size: 11px;
            margin-bottom: 4px;
        }
        
        .course-item .school-logo {
            width: 14px;
            height: 14px;
            margin-right: 3px;
        }
        
        .course-item .school-name,
        .course-item .course-stats {
            font-size: 10px;
        }
    }

    /* 添加课程内容区域的显示/隐藏样式 */
    .course-content-section {
        display: none; /* 默认隐藏所有内容区域 */
    }
    
    .course-content-section.active {
        display: block; /* 显示激活的内容区域 */
    }
    
    /* 导航栏响应式样式 */
    @media (max-width: 991.98px) {
        .navbar {
            padding: 10px 0;
            background-color: #fff;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        
        .navbar .container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 15px;
        }
        
        .navbar-brand {
            margin-right: 0;
            padding: 0;
        }
        
        .navbar-brand img {
            height: 30px;
            width: auto;
        }
        
        .navbar .search-container {
            flex: 1;
            margin: 0 15px;
            position: relative;
            max-width: 300px;
        }
        
        .navbar .search-box {
            width: 100%;
        }
        
        .navbar .search-box input {
            width: 100%;
            height: 36px;
            border-radius: 18px;
            border: 1px solid #e0e0e0;
            background-color: #f5f5f5;
            padding: 0 15px;
            font-size: 14px;
        }
        
        .navbar .search-box i {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #999;
            cursor: pointer;
        }
        
        .navbar-toggler {
            padding: 0;
            border: none;
            background: transparent;
        }
        
        .navbar-toggler-icon {
            width: 24px;
            height: 24px;
            background-size: contain;
        }
        
        .navbar .nav-qrcode {
            display: none;
        }
        
        .collapse.navbar-collapse {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            z-index: 1000;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            padding: 10px 0;
        }
    }
    
    /* 搜索下拉框样式 */
    .search-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        z-index: 1000;
        display: none;
        margin-top: 5px;
        padding: 20px;
        max-height: 400px;
        overflow-y: auto;
    }

    .search-dropdown-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        margin-bottom: 16px;
    }

    .search-dropdown-header span {
        color: #888;
        font-size: 14px;
        font-weight: normal;
    }

    .clear-search {
        background: none;
        border: none;
        color: #bbb;
        cursor: pointer;
        font-size: 14px;
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .clear-search:hover {
        color: #999;
    }

    .recent-search-items {
        margin-bottom: 24px;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .recent-search-items .search-item {
        background-color: #f5f5f5;
        border-radius: 20px;
        padding: 8px 16px;
        display: inline-block;
        font-size: 14px;
        color: #555;
    }

    .recent-search-items .search-item:hover {
        background-color: #eee;
    }

    .hot-search-items {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px 20px;
    }

    .hot-search-items .search-item {
        padding: 0;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 14px;
        color: #555;
        transition: color 0.2s;
    }

    .hot-search-items .search-item:hover {
        color: #F86923;
    }

    .search-item {
        cursor: pointer;
        transition: all 0.2s;
    }

    .hot-item {
        color: #F86923 !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .hot-item .fa-fire {
        margin-left: auto;
        font-size: 14px;
        color: #F86923;
    }

    /* 确保搜索框有相对定位，以便下拉框能够正确定位 */
    .search-box {
      position: relative;
    }
    
    /* 下拉框文本溢出处理 */
    #mobile-search-dropdown .list-group-item,
    #desktop-search-dropdown .list-group-item {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      padding-right: 20px; /* 为图标留出空间 */
    }
    
    /* 火焰图标样式调整 */
    #mobile-search-dropdown .fa-fire,
    #desktop-search-dropdown .fa-fire {
      position: absolute;
      right: 0;
      font-size: 0.8rem;
    }
    .text-truncate{
        width: 80%;
    }
    /* 桌面端搜索下拉框自适应 */
    @media (min-width: 992px) {
        .d-none.d-lg-flex .search-box .search-dropdown {
            width: 320px;
            right: 0;
            left: auto;
            position: absolute;
            top: 100%;
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
            z-index: 1000;
            display: none;
            margin-top: 5px;
            padding: 20px;
            max-height: 400px;
            overflow-y: auto;
        }
    }
    
    @media (max-width: 1200px) and (min-width: 992px) {
        .d-none.d-lg-flex .search-box .search-dropdown {
            width: 300px;
        }
    }
    
    /* 搜索下拉框自适应样式 */
    @media (max-width: 768px) {
        .search-dropdown {
            padding: 16px;
            border-radius: 8px;
        }
        
        .hot-search-items {
            grid-template-columns: 1fr;
            gap: 14px;
        }
        
        .recent-search-items {
            gap: 10px;
        }
        
        .recent-search-items .search-item {
            padding: 6px 14px;
            font-size: 13px;
            border-radius: 16px;
        }
        
        .search-dropdown-header {
            font-size: 13px;
            margin-bottom: 12px;
            color: #999;
        }
        
        .hot-search-items .search-item {
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .hot-item .fa-fire {
            margin-left: auto;
            font-size: 14px;
        }
    }
    
    @media (max-width: 480px) {
        .search-dropdown {
            padding: 14px;
            max-height: 350px;
        }
        
        .search-item {
            font-size: 13px;
        }
        
        .hot-search-items {
            gap: 12px;
        }
        
        .recent-search-items {
            margin-bottom: 20px;
        }
    }
    
    /* 在更小的屏幕上进一步缩小搜索下拉框的文本 */
    @media (max-width: 576px) {
      #mobile-search-dropdown .list-group-item,
      #desktop-search-dropdown .list-group-item {
        font-size: 0.7rem !important;
      }
      
      #mobile-search-dropdown .row-cols-2,
      #desktop-search-dropdown .row-cols-2 {
        --bs-gutter-x: 0.3rem;
      }
    }
    
    @media (max-width: 400px) {
      #mobile-search-dropdown .list-group-item,
      #desktop-search-dropdown .list-group-item {
        font-size: 0.65rem !important;
      }
      
      #mobile-search-dropdown .row-cols-2,
      #desktop-search-dropdown .row-cols-2 {
        --bs-gutter-x: 0.2rem;
      }
    }
    
    /* 确保移动端搜索框下拉菜单不会超出屏幕 */
    @media (max-width: 576px) {
        .search-container .search-dropdown {
            width: calc(100vw - 30px);
            left: 50%;
            transform: translateX(-50%);
        }
    }
    
    /* 搜索下拉框中的垃圾桶按钮样式 */
    #mobile-search-dropdown .trash-btn,
    #desktop-search-dropdown .trash-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        color: #bbb;
        cursor: pointer;
        z-index: 10;
    }
    
    #mobile-search-dropdown .trash-btn:hover,
    #desktop-search-dropdown .trash-btn:hover {
        color: #999;
    }
    /* 添加下划线和查看更多链接的样式 */
    .school-footer {
        margin-top: 20px;
        padding-top: 15px;
        width: 100%;
        position: relative;
    }
    .school-footer::before{
        content: "";
        display: block;
        width: 85%;
        height: 1px;
        background-color: #e0e0e0;
        margin-bottom: 15px;
    }
    .school-more-link {
        display: inline-flex;
        align-items: center;
        color: #666;
        font-size: 14px;
        text-decoration: none;
        transition: all 0.3s ease;
        position: absolute;
        right: 0;
        top: 0;
        letter-spacing: 7px;
        font-size: 12px;
        line-height: 1.5rem;
    }

    .school-more-link:hover {
        color: #4e73df;
    }

    .school-more-link i {
        margin-left: 5px;
        font-size: 12px;
        transition: transform 0.3s ease;
    }

    .school-more-link:hover i {
        transform: translateX(3px);
    }

    @media (max-width: 768px) {
        .school-footer {
            margin-top: 15px;
            padding-top: 12px;
        }
        
        .school-more-link {
            font-size: 13px;
        }
    }