/* 基本菜单样式 */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system,"Segoe UI", Helvetica, Arial, sans-serif;
    font-size: calc(1.25rem+ 2vw);
}

.nav-background-images {
    position: relative;
    width: 100%;
    height: 150px;
    background-image: url("../img/rtaImage.jpg");
    background-size: cover;
    background-repeat: no-repeat;
}

.navbar {
    width: 100%;
    position: relative;
    z-index: 3;
    background-color: transparent;

}

.navbar-brand img {
    width: 160px;
    height: auto;
}

.navbar-nav .nav-link {
    color: white;
}

.navbar-nav .nav-link:hover {
    color: blue;
}

.submenu {
    display: none;
    position: absolute;
    padding: 0;
    background-color: #778899;
    border-radius: 5px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 3;
    list-style-type: none;
}

.nav-item:hover .submenu {
    display: block;
}

.submenu a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: white;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.submenu a:hover {
    color: lightseagreen;
    background-color: #1a1d20;
    border-radius: 5px;
}

/* 搜索栏的样式 */
.search-container {
    position: relative;
}

.search-icon {
    cursor: pointer;
}

.search-input {
    position: absolute;
    top: 0;
    left: -200px;
    width: 200px;
}

@media (max-width: 576px) {
    .navbar-brand img {
        width: 180px; /* 将品牌图片宽度缩小 */
    }

    .left-nav { /* 设置左侧导航栏的位置 */
        position: absolute;
        width: 30%;
        background-color: #909099;
        left: 140px;
        top: 65%;
        border-radius: 5px;
        /* 将导航菜单移到顶部 */
    }

    .left-nav .nav-item {
        position: relative;
        left: 5px;
    }

    .left-nav .nav-link {
        color: white; /* 设置链接颜色 */
    }

    .nav-item:hover > .submenu {
        top: 0;
        left: 95%;
        right: -130px;
        z-index: 4;
    }


    .search-input {
        position: absolute;
        top: 0;
        left: 50px;
        width: 200px;
    }

    .nav-item span {
        display: none;
    }

    /* 小屏幕时折叠栏的位置 */
    .navbar-toggler {
        position: absolute; /* 绝对定位 */
        top: auto; /* 距离顶部10px */
        left: 40%;
    }

    /*!* 当按钮被悬停时显示菜单 *!*/
    /*.navbar-toggler:hover + .navbar-collapse {*/
    /*    display: block;*/
    /*}*/

}

/* 大屏幕时导航栏的样式 */
@media (min-width: 769px) {

    .left-nav {
        margin-left: 3vw;
    }

    .navbar-nav .nav-item {
        margin-left: 5px;
    }

}

@media (min-width: 1440px) {
    .navbar-brand img {
        width: 300px; /* 将品牌图片宽度缩小 */
    }

    .left-nav {
        margin-left: 3vw;
    }

    .navbar-nav .nav-item {
        margin-left: 5px;
        font-size: larger;
    }
}

/* 鼠标悬停时显示二级菜单，并添加淡入效果 */
.nav-item:hover .submenu {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}



/* 常用链接导航部分 */
.links a {
    text-decoration: none;
}

.links a:hover {
    color: red;
}


.links img {
    width: 50px !important;
    height: 50px !important;
}

.links_container {
    display: none;
    flex-direction: row;
}

/* 常用链接在不同屏幕下一行放置链接的数量*/

@media (max-width: 576px){
    .links-detail .row .card {
        width: 50% !important;
    }
}
@media (min-width: 576px) {
    .links-detail .row .card {
        width: 33.33333333%;
    }
}

@media (min-width: 1024px) {
    .links-detail .row .card {
        width: 16.66666667%;
    }

    .list-group-item-action {
        font-size: larger;
    }
}

@media (min-width: 2400px) {
    .links-detail .row .card {
        width: 8.33333333%;
    }
}

/* 影视推荐的轮播幻灯片 */
.carousel-item a {
    width: auto;
    height: 512px;
    align-content: center;
}

.carousel-item img {
    width: auto;
    height: 512px;
    align-content: center;
}


/* Markdown 代码高亮样式 */
pre {
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 15px;
    margin: 10px 0;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    color: #f8f8f8;
}

code {
    background-color: #333333;
    border-radius: 5px;
    padding: 2px 5px;
    font-family: 'Courier New', Courier, monospace;
    color: #ff0000;
}

pre code {
    background-color: transparent;
    border: none;
    padding: 0;
}

/* 关于我页面的文本样式 */
#about_me li {
    list-style-type: none;
    font-style: oblique;
    padding: 10px 5px;
    border-bottom: 1px solid #ccc;
}

#about_me li p {
    font-size: smaller;
    font-style: oblique;
}

.video-container {
    position: relative;
    width: 100%;
    padding-top: calc(660 / 3840 * 100%);
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card-img-top {
      border-bottom-left-radius: var(--bs-card-inner-border-radius);
      border-bottom-right-radius: var(--bs-card-inner-border-radius);

}

.hotNews ul li{
    list-style-type: none;
}

.hotNews ul {
    list-style-type: none;
    padding: 0;
    margin: 0 0 0 5%;
    width: 40%;
    float: left;
}


.hotNews ul:last-child {
    margin-left: 5%;
}

@media (max-width: 768px) {
    .hotNews ul {
        width: 100%;
        float: none;
    }
}

/* 清除浮动 */
.clear {
    clear: both;
}

#post-list img {
    max-height: 68px;
}