html {
    height: 100%;
}

body {
    background: #f8f8f8;
    font-family: "Apple LiGothic Medium,Microsoft YaHei", "微软雅黑", "Arial", sans-serif;
    font-size: 14px;
    color: #4e4e4e;
    -webkit-font-smoothing: antialiased;
    -webkit-overflow-scrolling: touch;
    line-height: 1.8em;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
    border-radius: 7px;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(196, 196, 196, 0.7);
}


/* --- 头部样式 --- */
.header {
    width: 100%;
    height: 60px;
    position: relative; /* --- 相对定位 --- */
    background-color: #227eaa;
    z-index: 1000; /* --- 层级, 滑动固定作用 --- */
    margin-bottom: 15px; /* --- 下边距 --- */
}

.header * { /* 字体颜色 */
    color: #FFF !important;
}

.header .logopic img { /* 图标样式 */
    display: inline-block; /* 行内快 */
    width: 50px;
}

.header .title {
    display: inline-block;
    padding: 16px 10px;
}

/*  清除导航原背景颜色  */
.header .layui-nav {
    background: none;
}

/*  导航项鼠标悬停颜色  */
.layui-nav .layui-nav-item a:hover {
    color: #12caea !important;
}

/* ------------ layui重写 ------------ */
@media screen and (min-width: 1400px) {
    .layui-container {
        width: 1170px !important;
    }
}

/* --- 页面包装器样式 --- */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 确保至少占满整个视口高度 */
}

/* --- body block 内容区域样式 --- */
.page-wrapper > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* 允许 flex 子元素缩小 */
}

/* --- 内容区域样式 --- */
.page-wrapper .layui-container {
    flex: 1 0 auto; /* 允许增长，不允许缩小 */
    margin-bottom: 0; /* 移除默认 margin */
    padding-bottom: 15px; /* 底部内边距，为 footer 留出空间 */
}

/* --- 底部样式 --- */
.footer {
    width: 100%;
    padding: 16px 0;
    color: #FFF;
    background-color: #227eaa;
    text-align: center;
    margin-top: auto; /* 使用 flexbox 自动推到底部 */
    flex-shrink: 0; /* 防止 footer 被压缩 */
}

/* --- 侧边栏滚动容器样式 --- */
.sidebar-container {
    position: sticky;
    top: 75px; /* 距离顶部的位置（header高度60px + margin-bottom 15px） */
    max-height: calc(100vh + 40px); /* 视口高度减去header顶部位置和底部安全距离 */
    overflow-y: auto; /* 垂直滚动 */
    overflow-x: hidden; /* 隐藏水平滚动 */
    padding-right: 8px; /* 为滚动条留出空间 */
    margin-bottom: 0; /* 不设置底部 margin，由滚动条控制 */
}

/* 当侧边栏内容超出时显示滚动条 */
.sidebar-container:hover::-webkit-scrollbar-thumb {
    background: rgba(196, 196, 196, 0.8);
}

/* 自定义侧边栏滚动条样式 */
.sidebar-container::-webkit-scrollbar {
    width: 6px;
}

.sidebar-container::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-container::-webkit-scrollbar-thumb {
    background: rgba(196, 196, 196, 0.5);
    border-radius: 3px;
}

.sidebar-container::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 196, 196, 0.8);
}


/* --- 搜索框样式 --- */
.side-search {
    background-color: #fff;
    box-sizing: border-box;
    padding: 10px 20px;
    border-radius: 8px; /* 圆角 */
    margin-bottom: 15px;
    min-height: 40px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.side-search .layui-input {
    width: 170px;
    height: 30px;
    margin-right: 10px;
}

/* --- 个人信息样式 --- */
.side-avata {
    background-color: #fff;
    box-sizing: border-box; /* 为元素设定的宽度和高度决定了元素的边框盒。就是说，为元素指定的任何内边距和边框都将在已设定的宽度和高度内进行绘制 */
    padding: 10px 5px;
    border-radius: 15px;
    min-height: 100px;
    position: relative;
    text-align: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.side-avata-bg {
    margin: 0;
    padding: 0;
    width: 100%;
}

.side-avata-bg img {
    border-radius: 5px;
    height: 150px;
}

#adminlogin {
    display: inline-block;
    position: absolute;
    top: 112px;
    left: 34%;
}

#adminlogin img {
    height: 80px;
    width: 80px;
    border-radius: 50%;
    border: 4px solid rgba(220, 195, 195, 0.4);
    transition: transform 0.75s; /* 图片旋转 0.75 时间旋转一圈*/
}

#adminlogin :hover {
    transform: rotate(360deg);
}


.side-avata .nickname {
    margin-top: 50px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

.side-avata .link {
    text-align: center;
}

.side-avata .link a {
    display: inline-block;
    padding: 10px 20px;
    color: #666;
}

/* --- 文章分类样式 --- */
.side-categorys {
    background-color: #fff;
    box-sizing: border-box;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 5px;
    overflow: hidden;
    min-height: 100px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.side-categorys ul {
    overflow: hidden; /* 超出隐藏 */
}

.side-categorys ul li {
    padding: 5px 0; /* 内边距 */
}

.side-categorys ul span {
    float: right;
}

/* --- 分类显示更多功能样式 --- */
.category-hidden, .post_hidden {
    display: none !important;
}

.category-toggle {
    text-align: center;
    margin-top: 10px;
}

.show-more-btn {
    color: #1E9FFF;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.show-more-btn:hover {
    color: #009688 !important;
}


/* --- 公共标题样式 --- */
.side-title {
    border-bottom: 1px solid #eee; /* 下边框 */
    width: 100%;
    color: #666;
    padding-bottom: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    font-weight: 400;
}


/* --- 最新文章样式 --- */
.side-newposts {
    background-color: #fff;
    box-sizing: border-box;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 5px;
    overflow: hidden;
    min-height: 100px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.side-newposts ul li {
    padding: 5px 0; /* 内边距 */
}

.side-newposts a {
    word-break: break-all; /* 文字行内平铺 */
}

/* 文章标签样式 */
.side-tags {
    background-color: #fff;
    box-sizing: border-box;
    padding: 10px 20px;
    margin-top: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    min-height: 100px; /* 设置最小高度 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.side-tags div a {
    margin: 0 0 5px 0 !important;
    white-space: nowrap; /* 文本不换行 */
    text-overflow: ellipsis;
    overflow: hidden  /* 防止文本溢出 */
}


/* --- 文章内容区域 --- */
.post-card {
    background-color: #fff;
    box-sizing: border-box;
    padding: 10px 20px;
    margin-bottom: 15px;
    border-radius: 5px;
    min-height: 100px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    word-break: break-all;
}

/*文章标题颜色*/
.post-card h2 {
    color: #227eaa;
    padding: 10px 0;
    word-break: break-all;
}

/*阅读全文链接颜色*/
.post-card .detail, .category {
    color: #227eaa;
}

.post-msg {
    padding: 10px 5px 7px;
}

.post-msg > span {
    padding-right: 25px;
}

.post-msg .post-info, i {
    color: #b9a8a8;
}

.post-msg .author {
    color: #909399;
}

/* ------------ 文章详情页内容样式 ------------ */
/*正文页标题*/
.post-title {
    padding: 10px 5px;
}

/*正文页文章正文部分*/
.post-content {
    padding: 10px 5px;
    font-size: 15px;
}

/*恢复默认ul,ol样式（layui默认将该样式清除了）*/
.post-content ul, .post-content ol {
    display: block;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    padding-inline-start: 40px;
}

/*显示li小圆点（layui默认将该样式清除了）*/
.post-content li {
    list-style: unset;
}

/*正文页文章正文图片样式*/
.post-content img {
    max-width: 100%;
    max-height: 100%;
    margin: 10px 0;
    border-radius: 4px;
}


/*正文页文章正文各级标题样式*/
.post-content h1, .post-content h3 {
    line-height: 2.5em;
    color: #404040;
    word-break: break-all;
}

.post-content h3 {
    font-size: 20px;
}

.post-content h4 {
    line-height: 2em;
    font-size: 17px;
    color: #1E9FFF;
}

.post-content h2 {
    font-size: 24px;
    line-height: 2em;
    margin: 18px 0;
    color: #404040;
    border-bottom: 1px solid rgb(216, 222, 228);
    padding: 0;
}

.post-content h5, .post-content h6 {
    line-height: 2em;
    font-size: 15px;
    color: #f6886d;
}

.post-content a {
    color: #227eaa;
}

/* 引用标签css */
.post-content blockquote {
    padding: 0 1em;
    color: rgb(101, 109, 118);
    border-left: 0.25em solid rgb(208, 215, 222);
    margin-bottom: 16px;
}


/* 固定条样式 */
.layui-fixbar {
    /*right: 30px !important;*/
    bottom: 60px !important;
}


/* 文章底部 */
.post-tag {
    display: flex;
    align-items: center;
}

.post-tag div {
    margin-right: 60px;
    padding: 8px 0;
}

.post-tag a {
    color: rgba(40, 157, 255, 0.81);
}

.post-tag span {
    color: #b9a8a8;
}
/* ------------ 评论发送内容样式 ------------ */
.comment {
    background-color: #fff;
    box-sizing: border-box;
    padding: 5px 20px;
    margin-bottom: 15px;
    border-radius: 5px;
    min-height: 100px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

/*留言页标题样式*/
.comment .comment-title {
    text-align: center;
}

/*留言内容样式*/
.comment .comment-edit {
    padding: 0 18px;
    border-radius: 8px;
}

.comment .comment-edit h3 {
    margin: 20px 0;
    font-weight: 500;
}

/*留言列表底部间距*/
.comment .comment-item li {
    margin-bottom: 20px;
}


.comment-send {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.comment-send h3 {
    position: relative;
    padding-left: 1.2em;
    font-size: 15px;
}

.comment-send h3:before {
    position: absolute;
    content: '';
    width: 4px;
    background: #627bf5;
    top: 10%;
    left: 2px;
    bottom: 10%;
    border-radius: 5px;
    box-shadow: 1px 1px 3px -1px #627bf5;
}

/* ------------ 评论发送内容样式 ------------ */
.comment, .comment-list {
    background-color: #fff;
    box-sizing: border-box;
    padding: 5px 20px;
    margin-bottom: 15px;
    border-radius: 5px;
    min-height: 100px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

/* ------------ 评论列表样式 ------------ */
.comment-list .message-item {
    margin: 15px 0;
}

.comment-list .message-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 3px;
    border: 1px solid #dfedff;
}

.comment-list .list_bottom {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comment-list .list_bottom span {
    margin-right: 12px;
    color: #999;
}

.comment-list .message-item li{
    margin-bottom: 20px;
}

/* ------------ 评论回复盒子样式 ------------ */
.comment-reply{
padding-right: 60px;
}

.comment-reply input{
    margin-right: 15px;
}

.comment-reply .layui-col-md3{
    display: flex;
    justify-content: space-between;
}

.comment-reply button{
    width: 45%;
}

/* 归档页主体样式 */
.recoder{
    background-color: #fff;
    margin-bottom: 15px;
    border-radius: 20px;
}










