
:root {
    --header-height: 5rem;
    --nav-font-size: 1.25rem;
    --nav-font-color: #FFF;
    --blue-hover: #409EFF;
    --nav-item-width: 15rem;
    --context-width: 90rem;
    --aside-width: 17rem; /*16*/
    --header-color: rgba(5, 216, 250, 0.5);
    --context-bk-color: rgba(227, 235, 237, 0.7);
    --light-color: rgba(96, 98, 102, 1);
    --black--color: rgba(0, 0, 0, 1);
    --white-color: rgba(255, 255, 255, 1);
    --link-list-item-height: 100px;
}

[id] {
    scroll-margin-top: var(--header-height); /* 跳转时留出 50px 的顶部间距 */
}

* {
    box-sizing: border-box; /* 宽度包含padding和border */
}

::-webkit-scrollbar {
    width: 10px;
    height: 8px;
    background: rgb(255, 255, 255);
    border-radius: 5px;
}

.article-catalog::-webkit-scrollbar {
    width: 10px;
    height: 8px;
    background: rgba(0, 0, 0, 0);
}


::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 1);
}

a, a:link, a:visited, a:focus, a:hover, a:active {
    color: inherit;
    text-decoration: none;
}

/*分隔线*/
.el-divider--horizontal {
    margin: 0.5rem 0;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.padding-1{
    padding: 1rem
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    /* width: 100vw;*/
    height: 100vh;
    /* body铺满整个视口 */
    /* background-color: #333;*/
    /* 设置一个背景颜色防止图片加载不出来导致没有背景 */
    background-image: url("/public/pic/b.jpeg");
    /* background-image: url("/imge/b.jpeg");*/
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-attachment: fixed
    /* 图片位置居中，大小适应宽高，不重复 */
}

.context-bk {
    background-color: var(--context-bk-color);
}

.container-center {
    width: 100vw;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* 水平居中 */
}

.context-width {
    width: var(--context-width);
}

.main-width {
    width: calc(var(--context-width) - var(--aside-width));
}

/* headroom改变时不同的样式 ，可以自由设置*/
.headroom {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    transition: all .2s ease-in-out;
}

.headroom--unpinned {
    top: -100%;
}

.headroom--pinned {
    background-color: var(--header-color);
    top: 0;
}

.headroom--top {
    position: static;
    background: transparent;
}

.header {
    width: 100%;
    margin: 0;
    padding: 0;
    height: var(--header-height) !important;
    border-radius: 0 0 1rem 1rem;
    font-size: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* 水平居中 */
    z-index: 99;
}

.navbar {
    margin: 0;
    padding: 0;
    /* background-color: #0b8235;*/
    width: var(--context-width);
    font-size: var(--nav-font-size);
    color: var(--nav-font-color);
    justify-content: space-between;
    line-height: var(--header-height);
    display: flex;
    align-items: center;
    /*padding: 0 1rem;*/
}

.nav-sidebar-icon {
    width: var(--nav-item-width);
    text-align: left;
    display: none;
}

.colorful-text {
    -webkit-text-fill-color: transparent;
    background: linear-gradient(94.75deg, rgb(60, 172, 247) 0%, rgb(131, 101, 253) 43.66%, rgb(255, 141, 112) 64.23%, rgb(247, 201, 102) 83.76%, rgb(172, 143, 100) 100%);
    -webkit-background-clip: text;
}

.nav-logo {
    text-align: left;
    width: var(--nav-item-width);
    min-width: var(--nav-item-width);
}

.nav-menu {
    flex-grow: 1;
    display: flex;
    justify-content: center; /* 居中对齐 */
}
.nav-menu > .el-menu--horizontal > li{
    width: var(--nav-item-width);
}

.nav-search {
    display: inline-block;
    font-size: var(--nav-font-size);
    text-align: right;
    min-width: var(--nav-item-width);
    width: var(--nav-item-width);
}

.nav-search > .el-input {
    display: block;
}

/* 全局菜单样式 */
.el-menu--horizontal {
    border: none !important;
    background: transparent !important;
    font-size: var(--nav-font-size);
    display: flex;
    white-space: nowrap; /* 禁止换行 */
    overflow: hidden; /* 隐藏超出部分 */
}

.el-menu--horizontal > .el-menu--popup {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 1rem;
    font-size: 1rem;
}

.el-menu--horizontal > .el-menu--popup > .el-menu-item {
    width: auto;
    text-align: left;
    padding-left: 1rem;
    padding-right: 1rem;
}

.el-menu--horizontal .el-menu-item,
.el-menu--horizontal .el-submenu {
    width: var(--nav-item-width);
    text-align: center;
}

.el-menu--horizontal .el-submenu .el-submenu__title {
    width: 100%;
}

.el-menu--horizontal .el-menu .el-menu-item,
.el-menu--horizontal .el-menu .el-submenu__title {

}

/* 菜单项基础样式 */
.el-menu--horizontal .el-menu-item,
.el-menu--horizontal .el-submenu .el-submenu__title {
    font-size: inherit;
    background: transparent !important;
    border: none !important;
    color: var(--nav-font-color) !important;
    transition: all 0.3s;
    /*padding: 0 1rem;*/
}

/* 图标基础样式 */
.el-menu--horizontal .el-menu-item i,
.el-menu--horizontal .el-submenu .el-submenu__title i {
    font-size: inherit;
    color: inherit !important;
}

/* 悬停状态联动 */
.el-menu--horizontal .el-menu-item:hover,
.el-menu--horizontal .el-menu-item:hover i,
.el-menu--horizontal .el-menu-item:hover span,
.el-menu--horizontal .el-submenu .el-submenu__title:hover,
.el-menu--horizontal .el-submenu .el-submenu__title:hover i,
.el-menu--horizontal .el-submenu .el-submenu__title:hover span {
    color: var(--blue-hover) !important;
    background: transparent !important;
}

/* 禁用激活状态 */
.el-menu--horizontal .el-menu-item.is-active {
    color: inherit !important;
    border-bottom: none !important;
    background: transparent !important;
}

/* 移除横向模式的下划线 */
.el-menu--horizontal.el-menu--horizontal .el-menu-item::after {
    display: none !important;
}

/* 移除聚焦边框 */
.el-menu--horizontal .el-menu-item:focus {
    outline: none !important;
}

/*下拉图标*/
.el-menu--horizontal > .el-submenu > .el-submenu__title i.el-submenu__icon-arrow {
    display: none !important;
}

.show-text {
    flex-direction: column;
    display: flex; /* 启用 Flexbox */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    height: 300px;
    width: 100%;
    text-align: center;
    color: white;
    padding: 1rem;
}

.show-text-title {
    font-size: 2.5rem;
    color: white;
    font-weight: bold;
    font-style: italic;
    margin-bottom: 1rem;
}

.show-text-desc {
    font-size: 2rem;
    font-style: italic;
}


.aside {
    height: auto !important;
    background: transparent;
    width: var(--aside-width) !important;
    position: relative;
    padding: 0 1rem 0 0;
}

.aside-phone {
    width: var(--aside-width) !important;
    top: 0;
    margin: 0;
    padding: 0 0.5rem;
    background-color: #ffffff;
    position: fixed;
    height: 100vh;
    border-radius: 0 1rem 1rem 0;
}

.aside-normal {

}

.aside-fixed {

    position: fixed;
    /*  left: 1rem;*/
    transition: all .2s ease-in-out;
}

.aside-fixed-top {
    top: 1rem;
}

.aside-fixed-un-top {
    top: calc(var(--header-height) + 1rem);
}


.aside-user {
    width: calc(var(--aside-width) - 1rem);
    border-radius: 1rem;
    background-color: var(--context-bk-color);
    padding: 0 0 1.5rem 0;
    margin-bottom: 1rem;
}

.user-avatar {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    text-align: center;
}

.avatar {
    margin-top: 1rem;
    height: 5rem;
    width: 5rem;
    margin-bottom: 0.5rem;
}

.avatar img {
    transition: transform 0.5s;
}

.avatar img:hover {
    cursor: pointer;
    transform: rotate(360deg);
}


.statistic {
    margin-top: 1rem;
    width: 100%;
    padding: 0 1rem;
}

.statistic *:hover {
    cursor: pointer;
}

.tag-badge {
    margin: 0.5rem 0.5rem;

}

.sns-links {
    margin-top: 1.5rem;
    text-align: center;

}

.sns-links i {
    font-size: 1.5rem;
}

.sns-links i:hover {
    color: var(--blue-hover);
    cursor: pointer;
}

.aside-catalog {
    height: 500px;
    background-color: var(--context-bk-color);
    border-radius: 1rem;
    width: calc(var(--aside-width) - 1rem);
    overflow: hidden;
}


.catalog-top {
    font-size: 1.5rem;
    height: 2.5rem;
    line-height: 3rem;
    text-align: center;
}

.article-catalog {
    overflow: auto;
    height: calc(100% - 3.5rem);
}

.article-catalog ul {
    list-style-type: none;
    padding-left: 1rem;
    margin-block-start: 0.5rem;
}

.article-catalog > ul {

}

.article-catalog ul li {
    padding-left: 0;
}

.article-catalog ul li a {
    color: var(--black--color);
}

.article-catalog ul li a:link {
    color: var(--black--color); /* 未访问链接 */
}

.article-catalog ul li a:hover {
    color: var(--blue-hover);
    cursor: pointer;
}

.article-catalog ul li a.active {
    color: var(--blue-hover);
}

.main {
    width: 100%;
    padding: 0;
    margin: 0;
}

.main-common {
    width: 100%;
    border-radius: 1.5rem;
    background-color: var(--context-bk-color);
    margin-bottom: 1rem;
    color: var(--black--color);
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.index-title {
    min-height: 0;
    font-size: 1.5rem;
    text-align: center;
    padding: 0.5rem;
}


.cover-img {
    display: block;
    width: 100%;
    height: 380px;
}

.article-info {
    padding: 1.5rem;
    background-color: var(--context-bk-color);
    border-radius: 0 0 1.5rem 1.5rem;
}


.article-content {
    margin-bottom: 2rem;
}

.article-title {
    display: block;
    font-size: 1.5rem;
}

.article-more {
    margin-top: 0.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-right: 16px;
}

.common-tag {
    height: 18px;
    line-height: 18px;
    background: rgba(255, 255, 255, 0.6);
    padding: 0 4px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    margin-right: 8px;
}

.category-tag {
    background: rgba(163, 255, 255, 0.6);
}

.create-time {
    white-space: nowrap;
}

.create-time > span {
    font-size: 14px;
}


.pagination {
    margin-top: 1rem;
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.pagination i {
    display: block;
    border-radius: 1rem;
    text-align: center;
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    background-color: white;
    color: var(--black--color);
    font-size: 14px;
    font-style: normal;
}

.pagination i:hover, .pagination i.active {
    background-color: var(--blue-hover);
    color: white;
}


.article-title-div {
    text-align: center;
}

.article-title-div > i {
    text-align: center;
    margin: 0 3px;
}

.article-title-div .title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.article-content .emoji {
    cursor: auto;
    max-width: 20px;
    vertical-align: sub;
}

.article-content .hljs {
    border-radius: 5px;
}
.article-content div {
    word-wrap: break-word;
}



.article-content > table, .article-content > table th, .article-content > table td {
    border: 1px solid black;
}

.article-content > table {
    width: 100%;
    border-collapse: collapse;
}

/* 行号样式 */
.article-content .hljs-ln-n {
    color: #606266;
    text-align: right; /* 右对齐 */
    padding-right: 0.5rem !important; /* 增加右边距 */
}

.article-content pre {
    position: relative;
}

.article-content .copy-button {
    color: var(--white-color);
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    cursor: pointer;
}

.article-content .copy-button:hover {
    color: var(--blue-hover);

}

.article-content .copy-button.active {
    color: var(--blue-hover);
}

.article-content img {
    max-width: 100%;
}


.link-list {
    font-size: 0;
}

.link-list-item {
    height: var(--link-list-item-height);
    background-color: var(--context-bk-color);
    border-radius: 1rem;
    display: inline-block;
    box-sizing: border-box;
    margin: 0.5rem;
    width: calc((100% - 2rem) / 2);
    vertical-align: top;
}

.link-avatar {
    display: inline-block;
    width: var(--link-list-item-height);
    height: var(--link-list-item-height);
    border-radius: 1rem calc(var(--link-list-item-height) / 2) calc(var(--link-list-item-height) / 2) 1rem;
    vertical-align: middle;
}

.link-info {
    display: inline-block;
    width: calc(100% - var(--link-list-item-height));
    height: var(--link-list-item-height);
    padding: 1rem;
    vertical-align: middle;
    position: relative;
}

.link-info > a {
    font-weight: bold;
    display: block;
    font-size: 18px;
}

.link-info > span {
    margin-top: 0.5rem;
    display: block;
    font-size: 16px;
}

.link-info > .url-icon {
    display: block;
    position: absolute;
    right: 1rem;
    bottom: 1rem;
}

.comment-top{
    font-size: 20px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-list{
    min-height: 50px;
}
.comment-root-item,.comment-child-item{
    padding: 2px;
    margin-top: 0.5rem;
    display: flex;
    border-bottom: 1px solid var(--light-color);
}
.comment-child-item{
    margin-left: 40px;
    width: calc(100% - 40px);
}
.comment-texts{
    width: 100%;
}
.comment-text{
    width: 100%;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}
.comment-to{
    border-radius: 0.5rem;
    background-color: var(--context-bk-color);
}
.comment-to-dialog{
    margin: 0 1rem 0.5rem 1rem;
    padding: 1rem 2rem;

    display: flex;
    border-radius: 0.5rem;
    background-color: var(--context-bk-color);
}
.comment-user-name{
    color: var(--light-color);
}
.comment-content{
    color: var(--black--color);
    margin-top: 5px;
}
.comment-more{
    color: var(--light-color);
    margin-top: 5px;
    font-size: 14px;
}

.comment-form{
    padding: 0 1.5rem;

}

.copyright-notice {
    margin-top: 1rem;
    border: none;
    border-radius: 1rem;
    background-color: rgba(146, 170, 191, 0.8);
}


.footer {
    height: auto !important;
    padding: 1rem 1rem;
    text-align: center;
    margin-top: 1rem;
    background-color: var(--header-color);
    border-radius: 1.5rem;
    margin-bottom: 3rem;
}

.footer > div {
    margin: 2px;
}


@media only screen and (max-width: 92rem) {
    :root {
        --nav-item-width: 10rem;
        --context-width: 70rem;
    }
}

@media only screen and (max-width: 72rem) {
    :root {
        --nav-item-width: 10rem;
        --context-width: calc(100% - 2rem);
    }

    .el-menu--horizontal .el-menu-item,
    .el-menu--horizontal .el-submenu {
        width: 7rem;
    }

    .container-aside {
        width: calc(100% - 2rem);
    }

}

@media only screen and (max-width: 52rem) {
    :root {
        --context-width: 100%;
        --nav-item-width: 5rem;
    }

    .navbar {
        padding: 0 1rem;
    }

    .main {
        width: calc(100% - 2rem);
        margin: 0 1rem;
    }

    .footer {
        margin: 1rem 1rem;
        width: calc(100% - 2rem);
    }

    .nav-sidebar-icon {
        display: inline-block;
    }

    .nav-logo {
        text-align: center;
        flex-grow: 1;
    }

    .nav-menu {
        display: block;
        position: fixed;
        padding: 0;
        margin: 0;
        left: 0;
        top: 5rem;
        width: 100%;
        transition: none !important;
    }

    .aside-phone {
        z-index: 100;
    }

    .aside-user {
        margin-top: 1rem;
    }

    .link-list-item {
        width: calc(100% - 1rem);
    }

}

