:root {
    --color-theme-light: #007aff;
    --color-theme-0-light: #f6fbff;
    --color-theme-1-light: #eef7ff;
    --color-theme-2-light: #dff0ff;
    --color-theme-3-light: #cee7ff;
    --color-text-light: #444444;
    --color-text-1-light: #ebebeb;
    --color-text-5-light: #acacac;
    --color-white: #ffffff;
    --color-white-light: #ffffff;
    --size-radius: 8px;
}

html.dark {
    --color-theme-light: #166dc9;
    --color-theme-0-light: #222222;
    --color-theme-1-light: #444444;
    --color-theme-2-light: #555555;
    --color-theme-3-light: #666666;
    --color-text-1-light: #444444;
    --color-text-5-light: #555555;
    --color-white-light: #333333;
    --color-text-light: #999999;
}

/* 用户信息样式 */
.user-info {
    line-height: 1.2;
}

.user-info > .user-meta {
    flex: 1;
}

.user-info .avatar + .user-meta {
    margin-left: .5em;
}

.user-info .user-meta .other {
    margin-top: 5px;
    opacity: .7;
}

.avatar {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 100%;
    border: 2px solid var(--color-theme-3)
}

.avatar > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* 评论相关样式 */
.comment-title {
    padding-top: 0.5em;
    text-align: center;
    font-size: 1.5em;
}

.comment-user .avatar {
    width: 40px;
    height: 40px;
}

.comment-items .comment-item:not(:first-child) {
    border-top: 1px solid var(--color-text-1-light);
    padding-top: 1.5em;
    margin-top: 1.5em;
}

.comment-items .comment-item .comment-post {
    margin-top: 1em;
}

.comment-item > .item-right {
    flex: 1;
    margin-left: auto;
}

.comment-item > .item-right .info,
.comment-item .comment-time {
    opacity: .65;
}

.comment-item .comment-item .comment-item .item-right .info {
    display: none;
}

.user-level {
    color: #ff8f17;
}

.comment-form .head,
.comment-form .body,
.comment-form .foot {
    width: 100%;
    padding: 1em;
    background-color: var(--color-theme-0-light);
    border: 1px solid var(--color-text-1-light);
}

.comment-form .head {
    padding: 0;
    border-bottom: 0;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.comment-item .comment-item .comment-item .comment-form .head {
    flex-direction: column;
}

.comment-item .comment-item .comment-item .comment-form .head .comment-control:not(:first-child) {
    border-left: 0;
    border-top: 1px solid var(--color-text-1-light);
}

.comment-form .head .comment-control {
    flex: 1;
    color: var(--color-text-light);
    width: 100%;
}

.comment-form .head .comment-control:not(:first-child) {
    border-left: 1px solid var(--color-text-1-light);
}

.comment-form .body {
    border-bottom: 0;
}

.comment-form .body textarea {
    width: 100%;
    line-height: 1;
    border: 0;
    resize: none;
    background: transparent;
    color: var(--color-text-light);
}

.layui-form-danger:focus {
    border-color: transparent !important;
}

.comment-form .body textarea::-webkit-scrollbar-track {
    box-shadow: none;
    background-color: transparent;
}

.comment-form .foot {
    border-top: 0;
    padding-top: 0;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.comment-control {
    padding: 1em;
    background: transparent;
    border: 0;
}

.comment-form .foot #captcha,
.comment-form .foot .input-code {
    border: 1px solid var(--color-text-5-light);
    border-radius: 3px;
}

.comment-form .foot #captcha {
    cursor: pointer;
}

.comment-form .foot .input-code {
    padding: 5px;
    max-width: 5em;
    background-color: var(--color-white-light);
    color: var(--color-text-light);
}

.comment-form .foot > *:nth-child(2) {
    margin-left: auto;
}

a.button {
    display: inline-block;
}

.button {
    cursor: pointer;
    line-height: 1;
    padding: 10px;
    border: 0;
    background-color: var(--color-theme-light);
    color: var(--color-white) !important;
    border-radius: 5px;
}

.comment-closed,
.comment-login {
    border: 2px dashed var(--color-theme-3-light);
    padding: 2em;
    text-align: center;
    border-radius: 5px;
}

.message {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: .75em;
    background-color: var(--color-theme-1-light);
    border-radius: 5px;
    color: var(--color-text-light) !important;
    line-height: 1.2;
}

.message::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 18px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--color-theme-1-light);
}

a.message:hover {
    background-color: var(--color-theme-2-light);
}

a.message:hover::before {
    border-bottom: 7px solid var(--color-theme-2-light);
}

/*
** 适配
*/
@media screen and (max-width: 1280px) {
    .container {
        max-width: 992px;
    }

    .article-list > .item .meta > .item {
        display: none;
    }

    .article-list > .item .meta > .item.time,
    .article-list > .item .meta > .item.view,
    .article-list > .item .meta > .item.tags {
        display: block;
    }

    .article-list > .item .meta > .item.time {
        margin-left: 0;
    }
}
/* 评论区域整体样式 */
.comment-section {
    margin-top: 40px;
    background: white;
    border-radius: 8px;
    padding: 0px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comment-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.comment-list {
    margin-top: 20px;
}

/* 评论项基础样式 - 水平布局 */
.comment-item {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    background-color: #f8f3f1; /* 浅橙色背景 */
    display: flex; /* 启用flex布局 */
    align-items: flex-start; /* 顶部对齐 */
    gap: 15px; /* 头像与内容间距 */
}

/* 评论头像样式 */
.comment-item .avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0; /* 不压缩头像 */
}

.comment-item .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 122, 80, 0.2);
}
/* 移除评论头像的右外边距 */
.comment-item .avatar.mr-10 {
    margin-right: 0 !important;
}

/* 如果还有子评论的头像需要调整 */
.comment-item .children .avatar.mr-10 {
    margin-right: 0 !important;
}
/* 评论内容区域 - 占满剩余空间 */
.comment-item .comment-content-wrap {
    flex: 1;
    min-width: 0; /* 防止内容溢出 */
}

/* 评论头部信息 - 昵称和时间 */
.comment-item .comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-item .user {
    font-weight: 600;
    color: #333;
    white-space: nowrap; /* 防止昵称换行 */
}

.comment-item .comment-time {
    color: #999;
    font-size: 12px;
}

/* 评论容器及项目 */
.comment-items {
    /* 评论列表容器基础样式 */
}

.comment-item {
    /* 单个评论项基础样式 */
}

.comment-item:not(:first-child) {
    border-top: 1px solid var(--color-text-1-light);
    padding-top: 1.5em;
    margin-top: 1.5em;
}

.comment-post {
    margin-top: 1em;
}

/* 布局相关 */
.display-flex {
    display: flex;
}

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

.flex-v-center {
    display: flex;
    align-items: center;
}

.item-right {
    flex: 1;
    margin-left: auto;
}

/* 元素相关 */
.avatar {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 100%;
    border: 2px solid var(--color-theme-3)
}

.avatar > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.user {
    /* 用户信息容器样式 */
}

.user-level {
    color: #ff8f17;
}

.info {
    opacity: .65;
}

.comment-content {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: .75em;
    background-color: var(--color-theme-1-light);
    border-radius: 5px;
    color: var(--color-text-light) !important;
    line-height: 1.2;
}

.comment-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 18px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--color-theme-1-light);
}

.comment-time {
    opacity: .65;
    margin-right: 10px;
}

.comment-reply {
    color: var(--color-theme-light);
    cursor: pointer;
}

.comment-reply .icon-simply {
    margin-right: 2px;
}

/* 表单相关 */
.comment-form .head,
.comment-form .body,
.comment-form .foot {
    width: 100%;
    padding: 1em;
    background-color: var(--color-theme-0-light);
    border: 1px solid var(--color-text-1-light);
}

.comment-form .head {
    padding: 0;
    border-bottom: 0;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.comment-form .head .comment-control {
    flex: 1;
    color: var(--color-text-light);
    width: 100%;
}

.comment-form .head .comment-control:not(:first-child) {
    border-left: 1px solid var(--color-text-1-light);
}

.comment-form .body {
    border-bottom: 0;
}

.comment-form .body textarea {
    width: 100%;
    line-height: 1;
    border: 0;
    resize: none;
    background: transparent;
    color: var(--color-text-light);
}

.comment-form .body textarea::-webkit-scrollbar-track {
    box-shadow: none;
    background-color: transparent;
}

.comment-form .foot {
    border-top: 0;
    padding-top: 0;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

.comment-form .foot #captcha,
.comment-form .foot .input-code {
    border: 1px solid var(--color-text-5-light);
    border-radius: 3px;
}

.comment-form .foot #captcha {
    cursor: pointer;
}

.comment-form .foot .input-code {
    padding: 5px;
    max-width: 5em;
    background-color: var(--color-white-light);
    color: var(--color-text-light);
}

.comment-form .foot > *:nth-child(2) {
    margin-left: auto;
}

.comment-control {
    padding: 1em;
    background: transparent;
    border: 0;
}

.button {
    cursor: pointer;
    line-height: 1;
    padding: 10px;
    border: 0;
    background-color: var(--color-theme-light);
    color: var(--color-white) !important;
    border-radius: 5px;
}

/* 评论状态相关 */
.comment-closed,
.comment-login {
    border: 2px dashed var(--color-theme-3-light);
    padding: 2em;
    text-align: center;
    border-radius: 5px;
}

/* 嵌套评论相关 */
.comment-item .comment-item .comment-item .item-right .info {
    display: none;
}

.comment-item .comment-item .comment-item .comment-form .head {
    flex-direction: column;
}

.comment-item .comment-item .comment-item .comment-form .head .comment-control:not(:first-child) {
    border-left: 0;
    border-top: 1px solid var(--color-text-1-light);
}

/* 响应式调整 */
@media screen and (max-width: 992px) {
    .comment-item > .item-right .info {
        display: none;
    }

    .comment-form .head {
        flex-direction: column;
    }

    .comment-form .head .comment-control:not(:first-child) {
        border-left: 0;
        border-top: 1px solid var(--color-text-1-light);
    }
}