/**
 * 文章页样式
 */

/* 锚点滚动偏移 - 避免被导航栏遮挡 */
:target {
    scroll-margin-top: 100px;
}

/* 文章页和页面样式 */
.post-article,
.page-article {
    margin-top: 40px;
}

/* 移动端文章页和页面样式 - 适应固定导航条 */
@media (max-width: 768px) {
    .post-article,
    .page-article {
        margin-top: 80px; /* 60px导航条高度 + 20px间距 */
    }
    
    :target {
        scroll-margin-top: 80px;
    }
}

.post-article .post-header,
.page-article .page-header {
    margin-bottom: 30px;
}

.post-article .post-title,
.page-article .page-title {
    font-size: 36px;
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 500;
    color: #000;
}

/* 副标题样式 */
.post-article .post-subtitle,
.page-article .page-subtitle {
    display: inline;
    font-size: inherit;
    font-weight: 400;
    margin-left: 0;
    line-height: inherit;
}

.post-article .post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 16px;
    color: #999;
    margin-bottom: 30px;
}

.post-featured-image,
.page-featured-image {
    margin-bottom: 40px;
}

.post-featured-image img,
.page-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-content,
.page-content {
    font-size: 1.5rem;
    line-height: 1.8;
    letter-spacing: 0.5px;
    color: #333;
}

.post-content h1,
.page-content h1 {
    font-size: 32px;
    margin: 40px 0 20px;
    font-weight: 700;
}

.post-content h2,
.page-content h2 {
    font-size: 28px;
    margin: 35px 0 18px;
    font-weight: 700;
}

.post-content h3,
.page-content h3 {
    font-size: 24px;
    margin: 30px 0 15px;
    font-weight: 600;
}

.post-content h4,
.page-content h4 {
    font-size: 20px;
    margin: 25px 0 12px;
    font-weight: 600;
}

.post-content p,
.page-content p {
    margin-bottom: 20px;
}

.post-content ul,
.post-content ol,
.page-content ul,
.page-content ol {
    margin: 20px 0;
    padding-left: 2em;
    line-height: 1.8;
}

.post-content li,
.page-content li {
    margin-bottom: 8px;
}

/* 嵌套列表 */
.post-content li > ul,
.post-content li > ol,
.page-content li > ul,
.page-content li > ol {
    margin: 8px 0;
    padding-left: 1.5em;
}

/* 列表项内的段落 */
.post-content li > p,
.page-content li > p {
    margin: 0;
}

.post-content li > p + p,
.page-content li > p + p {
    margin-top: 8px;
}

/* 无序列表样式优化 */
.post-content ul,
.page-content ul {
    list-style-type: disc;
}

.post-content ul ul,
.page-content ul ul {
    list-style-type: circle;
}

.post-content ul ul ul,
.page-content ul ul ul {
    list-style-type: square;
}

/* 有序列表样式优化 */
.post-content ol,
.page-content ol {
    list-style-type: decimal;
}

.post-content ol ol,
.page-content ol ol {
    list-style-type: lower-alpha;
}

.post-content ol ol ol,
.page-content ol ol ol {
    list-style-type: lower-roman;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .post-content ul,
    .post-content ol,
    .page-content ul,
    .page-content ol {
        padding-left: 1.5em;
    }
    
    .post-content li > ul,
    .post-content li > ol,
    .page-content li > ul,
    .page-content li > ol {
        padding-left: 1.2em;
    }
}

.post-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

/* 图库容器整体需要上下间距 */
.post-content .wp-block-gallery,
.post-content .gallery,
.page-content .wp-block-gallery,
.page-content .gallery {
    margin: 20px 0;
}

/* 图库内的单个图片不需要额外间距 */
.post-content .wp-block-gallery img,
.post-content .gallery img,
.page-content .wp-block-gallery img,
.page-content .gallery img {
    margin: 0;
}

.post-content blockquote,
.page-content blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    border-left: 3px solid rgba(136, 136, 136, 0.5);
    background: rgba(136, 136, 136, 0.05);
    font-style: normal;
    font-size: inherit;
    color: #666;
    border-radius: 0 4px 4px 0;
}

.post-content blockquote p,
.page-content blockquote p {
    margin: 0;
    line-height: 1.8;
}

.post-content blockquote p + p,
.page-content blockquote p + p {
    margin-top: 12px;
}

.post-content code,
.page-content code {
    background: #f5f5f5;
    padding: 3px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    vertical-align: middle;
    line-height: 1.6;
}

/* 内联标签样式 */
.post-content .inline-tag,
.page-content .inline-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    margin: 0 2px;
    background: rgba(41, 151, 247, 0.1);
    border-radius: 3px;
    color: #2997f7;
    font-size: 1.1rem;
    font-weight: 400;
    vertical-align: middle;
    line-height: 1.6;
}
.post-content .inline-tag a{
    color: #2997f7;
    text-decoration: none;
}

/* 在标签前添加 # 符号 */
.post-content .inline-tag::before,
.page-content .inline-tag::before {
    content: '#';
    margin-right: 2px;
}

/* 代码块内的代码不受影响 */
.post-content pre code,
.page-content pre code,
.code-content code {
    background: none;
    padding: 0;
}

.post-content pre,
.page-content pre {
    background: #f5f5f5;
    padding: 15px 20px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0;
}

.post-content pre code,
.page-content pre code {
    background: none;
    padding: 0;
}

.post-content a,
.page-content a {
    color: #000;
    text-decoration: underline;
}

.post-content a:hover,
.page-content a:hover {
    color: #666;
}

/* 表格样式 */
.post-content table,
.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 20px 0;
    border: none;
}

.post-content th,
.page-content th {
    padding: 18px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 18px;
    color: #000;
    border: none;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.post-content td,
.page-content td {
    padding: 12px 16px;
    font-size: 18px;
    color: #000;
    border: none;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

/* WordPress 区块表格样式 */
.post-content .wp-block-table thead,
.page-content .wp-block-table thead {
    border-bottom: 1px solid #eee;
}

.post-content .wp-block-table,
.page-content .wp-block-table {
    margin: 0 0 20px 0;
}

/* 文章标签 */
.post-tags {
    margin-top: 40px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.post-tags .tag-item {
    display: inline-block;
    font-size: 14px;
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.3px;
}

.post-tags .tag-item:hover {
    color: #000;
}

/* 文章版权声明 */
.post-copyright {
    margin-top: 50px;
    padding: 16px 20px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #f0f0f0;
}

.post-copyright p {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #888;
    letter-spacing: 0.3px;
}

.post-copyright a {
    color: #555;
    text-decoration: none;
    word-break: break-all;
    border-bottom: 1px dashed #ccc;
    transition: all 0.2s;
}

.post-copyright a:hover {
    color: #000;
    border-bottom-color: #000;
}

/* 页面链接分页 */
.page-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 响应式 - 手机 */
@media (max-width: 768px) {
    .post-article,
    .page-article {
        margin-top: 20px;
    }
    
    .post-article .post-title,
    .page-article .page-title {
        font-size: 26px;
    }
    
    /* 副标题移动端适配 */
    .post-article .post-subtitle,
    .page-article .page-subtitle {
        font-size: inherit;
        margin-left: 0;
    }
    
    .post-article .post-meta {
        font-size: 14px;
        gap: 15px;
    }
    
    .post-content,
    .page-content {
        font-size: 1.1rem;
    }
    
    .post-content h1,
    .page-content h1 {
        font-size: 26px;
        margin: 30px 0 15px;
    }
    
    .post-content h2,
    .page-content h2 {
        font-size: 22px;
        margin: 25px 0 12px;
    }
    
    .post-content h3,
    .page-content h3 {
        font-size: 20px;
        margin: 20px 0 10px;
    }
    
    .post-content h4,
    .page-content h4 {
        font-size: 18px;
        margin: 18px 0 8px;
    }
    
    .post-content pre,
    .page-content pre {
        padding: 10px 12px;
        font-size: 0.7rem;
    }
    
    .post-content code,
    .page-content code {
        font-size: 0.75em;
    }
    
    .post-copyright {
        margin-top: 40px;
        padding: 14px 16px;
    }
    
    .post-copyright p {
        font-size: 13px;
    }
    
    /* 移动端表格样式 */
    .post-content th,
    .page-content th {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .post-content td,
    .page-content td {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    /* 内联标签移动端适配 */
    .post-content .inline-tag,
    .page-content .inline-tag {
        font-size: 0.95rem;
        padding: 0px 6px;
    }
}

/* ==================== 密码保护表单样式 ==================== */

.post-password-form {
    margin: 60px 0;
}

.post-password-form p {
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    letter-spacing: 0.3px;
}

.post-password-form label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    margin-right: 12px;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.post-password-form input[type="password"] {
    width: 280px;
    padding: 12px 18px;
    font-size: 15px;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s;
    outline: none;
    letter-spacing: 0.5px;
}

.post-password-form input[type="password"]:focus {
    border-color: #ddd;
    box-shadow: none;
}

.post-password-form input[type="password"]::placeholder {
    color: #999;
}

.post-password-form input[type="submit"] {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    background: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.post-password-form input[type="submit"]:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-password-form input[type="submit"]:active {
    transform: translateY(0);
}

/* ==================== 评论区样式 ==================== */

.comments-area {
    margin-top: 10px;
    padding-top: 50px;
}

/* 评论排序 */
.comments-header {
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.comments-count {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.comments-count .count-number {
    color: #000;
}

.comments-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-sort .comments-sort-label {
    font-size: 14px;
    font-weight: 400;
    color: #888;
}

/* toggle buttons */
.comment-sort-toggle {
    display: inline-flex;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
    background: #fff;
}

.comment-sort-toggle .sort-btn {
    padding: 6px 14px;
    font-size: 14px;
    color: #666;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.comment-sort-toggle .sort-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.comment-sort-toggle .sort-btn.active {
    background: #111;
    color: #fff;
}

/* 评论列表 */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    transition: opacity 0.3s;
}

.comment-list.sorting {
    opacity: 0.6;
}

.comment-list .comment {
    margin-bottom: 40px;
}

.comment-body {
    display: flex;
    gap: 20px;
}

/* 评论头像 */
.comment-body .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* 评论主体内容 */
.comment-main {
    flex: 1;
    min-width: 0;
}

/* 评论作者 */
.comment-author {
    margin-bottom: 12px;
}

.comment-author .fn {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    font-style: normal;
}

.comment-author .fn a {
    color: #333;
    text-decoration: none;
}

.comment-author .fn a:hover {
    color: #007bff;
}

.comment-author .says {
    display: none;
}

.comment-author .reply-to {
    font-size: 15px;
    font-weight: 400;
    color: #999;
    margin-left: 8px;
}

/* 评论内容 */
.comment-content {
    font-size: 16px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 15px;
}

.comment-content p {
    margin: 0 0 10px 0;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* 评论时间和回复 */
.comment-meta {
    margin-top: 15px;
}

.comment-metadata {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #999;
}

.comment-metadata a {
    color: #999;
    text-decoration: none;
}

.comment-metadata a:hover {
    color: #666;
}

/* 让按钮靠右显示 */
.comment-metadata .comment-like-btn {
    margin-left: auto;
}

.comment-metadata .reply a {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #999;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    transition: all 0.2s ease;
    cursor: pointer;
}

.comment-metadata .reply a:hover {
    background: transparent;
    border-color: transparent;
    color: #333;
}

/* 评论点赞按钮 */
.comment-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    user-select: none;
}

.comment-like-btn:hover {
    background: transparent;
    border-color: transparent;
    color: #333;
}

.comment-like-btn.processing {
    opacity: 0.6;
    cursor: not-allowed;
}

.comment-like-btn .like-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: all 0.2s;
}

/* 已点赞状态 */
.comment-like-btn.liked {
    background: transparent;
    border-color: transparent;
    color: #ff4336;
}

.comment-like-btn.liked:hover {
    background: transparent;
    border-color: transparent;
    color: #ff6b6b;
}

.comment-like-btn.liked .like-icon {
    fill: currentColor;
}

/* 点赞动画 */
@keyframes likeHeart {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(0.9);
    }
    75% {
        transform: scale(1.15);
    }
}

.comment-like-btn.like-animation .like-icon {
    animation: likeHeart 0.6s ease;
}

.like-count {
    font-weight: 500;
    min-width: 12px;
    text-align: center;
}

/* 等待审核提示 */
.comment-awaiting-moderation {
    font-size: 14px;
    color: #ff9800;
    background: #fff8e1;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 8px 0 0 0;
}

/* 子评论 - 只缩进一层 */
.comment-list .children {
    list-style: none;
    margin: 30px 0 0 0;
    padding-left: 50px;
}

/* 所有子评论都只缩进一层 */
.comment-list .children .children {
    padding-left: 0;
}

/* 评论分页 */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    font-size: 15px;
}

.comment-navigation a {
    color: #007bff;
    text-decoration: none;
}

.comment-navigation a:hover {
    color: #0056b3;
}

/* 无评论提示 */
.no-comments {
    font-size: 15px;
    color: #999;
    text-align: center;
    padding: 30px 0;
}

/* ==================== 评论表单样式 ==================== */

#respond {
    transition: all 0.3s ease;
    margin-bottom: 50px;
}

/* 回复某条评论时的表单样式 */
.comment .comment-respond {
    margin-top: 20px;
    padding: 25px;
    background: #fafafa;
    border-left: 3px solid #000;
    border-radius: 10px;
}

.comment-reply-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 取消回复链接 */
.cancel-reply-link {
    font-size: 14px;
    font-weight: 400;
}

.cancel-reply-link a {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.cancel-reply-link a:hover {
    background: #f5f5f5;
    border-color: #000;
    color: #000;
}

.comment-form {
    max-width: 100%;
}

.comment-form p {
    margin-bottom: 0;
}

/* 登录信息 */
.comment-form .logged-in-as {
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: 14px;
    color: #666;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    line-height: 1.6;
}

.comment-form .logged-in-as a {
    color: #333;
    text-decoration: underline;
}

.comment-form .logged-in-as a:hover {
    color: #000;
}

/* 隐藏必填项提示 */
.comment-form .comment-notes,
.comment-form .required-field-message {
    display: none;
}

/* 隐藏默认标签 */
.comment-form label {
    display: none;
}

/* 新的表单分组样式 */
.comment-form-group {
    margin-bottom: 12px;
}

.comment-form-group textarea,
.comment-form-group input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.comment-form-group textarea::placeholder,
.comment-form-group input::placeholder {
    color: #999;
}

.comment-form-group textarea:focus,
.comment-form-group input:focus {
    outline: none;
}

/* 评论文本框特殊处理 */
.comment-form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

/* 用户信息行布局 */
.comment-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .comment-form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.comment-form-row .comment-form-group {
    margin-bottom: 0;
}

/* 提交按钮 */
.form-submit {
    margin-top: 16px;
    margin-bottom: 0;
    display: flex;
    gap: 12px;
}

.comment-form .submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 36px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.comment-form .submit-button:hover {
    background: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.comment-form .submit-button:active {
    background: #222;
}

/* ==================== 待办事项列表 ==================== */

.todo-list-container {
    margin: 20px 0;
    padding-left: 0;
}

.todo-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    line-height: 1.8;
}

.todo-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #000;
    font-weight: bold;
}

.todo-item.checked .todo-checkbox {
    background: #000;
    border-color: #000;
    color: #fff;
}

.todo-text {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #333;
    flex: 1;
    letter-spacing: 0.5px;
}

.todo-item.checked .todo-text {
    color: #999;
    text-decoration: line-through;
}

/* 移除古腾堡颜色样式的背景 */
.todo-list-container mark,
.todo-list-container .has-inline-color {
    background: none !important;
}

/* ==================== 时间线 ==================== */

.post-content .timeline-container,
.page-content .timeline-container {
    margin: 40px 0;
    padding-left: 0;
    position: relative;
    padding-bottom: 0;
}

.post-content .timeline-container::after,
.page-content .timeline-container::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
    background: #000;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e0e0e0;
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    padding-bottom: 30px;
}

.timeline-item:last-child {
    padding-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 6px;
    width: 20px;
    height: 20px;
    background: #000;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e0e0e0;
}

.timeline-content {
    padding-left: 10px;
}

.timeline-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
}

.timeline-text {
    font-size: 1.5rem;
    color: #555;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

/* 移除古腾堡颜色样式的背景 */
.post-content .timeline-container mark,
.page-content .timeline-container mark,
.post-content .timeline-container .has-inline-color,
.page-content .timeline-container .has-inline-color {
    background: none !important;
}

/* ==================== 进度条 ==================== */

.progress-container {
    margin: 40px 0;
}

.progress-item {
    margin-bottom: 25px;
}

.progress-item:last-child {
    margin-bottom: 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-label {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.5px;
}

.progress-percentage {
    font-size: 1.5rem;
    font-weight: 600;
    color: #666;
}

.progress-bar-wrapper {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #000;
    border-radius: 6px;
    transition: width 0.6s ease;
}

/* ==================== 标签页 ==================== */

.tabs-container {
    margin: 40px 0;
}

.tabs-header {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
    letter-spacing: 0.3px;
}

.tab-button:hover {
    color: #000;
    background: #f5f5f5;
}

.tab-button.active {
    color: #000;
    border-bottom-color: #000;
}

.tabs-content {
    padding: 30px 0 0 0;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel p {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.tab-panel p:last-child {
    margin-bottom: 0;
}

/* 移除古腾堡颜色样式的背景 */
.tabs-container mark,
.tabs-container .has-inline-color {
    background: none !important;
}

/* ==================== 折叠面板 ==================== */

.accordion-container {
    margin: 40px 0;
}

.accordion-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.accordion-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.accordion-summary {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.accordion-summary:hover {
    color: #000;
}

.accordion-content {
    margin-top: 15px;
}

.accordion-content p {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

/* 移除古腾堡颜色样式的背景 */
.accordion-container mark,
.accordion-container .has-inline-color {
    background: none !important;
}

/* ==================== 文章引用区块 ==================== */

.post-embed-card {
    margin: 40px 0;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
}

.post-embed-link {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    text-decoration: none !important;
    color: inherit;
    min-height: 140px;
}

.post-embed-link:hover {
    text-decoration: none !important;
}

.post-embed-link:hover .post-embed-title {
    text-decoration: none !important;
}

.post-embed-thumbnail {
    flex-shrink: 0;
    width: 180px;
    height: 140px;
    overflow: hidden;
    border-radius: 4px;
    background: #e5e5e5;
}

.post-embed-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 !important;
}

.post-embed-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 140px;
}

.post-embed-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0 !important;
    line-height: 1.4;
    letter-spacing: 0.3px;
    text-decoration: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-embed-excerpt {
    font-size: 1.3rem;
    color: #777;
    margin: 0 0 12px 0 !important;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-embed-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 !important;
}

.post-embed-date {
    font-size: 1.2rem;
    color: #999;
}

.post-embed-empty {
    margin: 40px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 6px;
    text-align: center;
    color: #999;
    font-size: 1.4rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .post-content blockquote,
    .page-content blockquote {
        margin: 15px 0;
        padding: 12px 16px;
    }
    
    .post-embed-link {
        gap: 10px;
        padding: 10px;
        min-height: 110px;
    }
    
    .post-embed-thumbnail {
        width: 110px;
        height: 110px;
    }
    
    .post-embed-content {
        min-height: 110px;
    }
    
    .post-embed-title {
        font-size: 1.1rem;
        margin: 0 0 6px 0 !important;
    }
    
    .post-embed-excerpt {
        font-size: 1.05rem;
        margin: 0 0 6px 0 !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .post-embed-date {
        font-size: 1.05rem;
    }
}

/* ==================== 代码高亮区块 ==================== */

/* Prism.js 语法高亮颜色 - 浅色主题 */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #708090;
    font-style: italic;
}

.token.punctuation {
    color: #999;
}

.token.namespace {
    opacity: 0.7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #905;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #690;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #9a6e3a;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #07a;
}

.token.function,
.token.class-name {
    color: #dd4a68;
}

.token.regex,
.token.important,
.token.variable {
    color: #e90;
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}

.code-highlight-container {
    position: relative;
    margin: 20px 0;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    font-family: Monaco, Consolas, "Courier New", monospace;
}

.code-filename {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.3rem;
    color: #666;
}

.code-filename-icon {
    font-size: 1.4rem;
}

.code-filename-text {
    font-weight: 500;
}

.code-wrapper {
    display: flex;
    overflow-x: auto;
}

.code-line-numbers {
    flex-shrink: 0;
    padding: 16px 0;
    background: #f0f0f0;
    border-right: 1px solid #e0e0e0;
    text-align: right;
    user-select: none;
    min-width: 50px;
}

.code-line-numbers span {
    display: block;
    padding: 0 16px;
    line-height: 1.6;
    font-size: 1.4rem;
    color: #999;
    height: auto;
}

.code-content {
    flex: 1;
    margin: 0;
    padding: 16px 20px;
    overflow-x: auto;
    background: #f9f9f9;
}

.code-content.has-line-numbers {
    padding-left: 20px;
}

.code-content code {
    display: block;
    font-family: inherit;
    font-size: 1.4rem;
    line-height: 1.6;
    color: #333;
    white-space: pre;
    background: none;
    padding: 0;
}

.code-copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

/* 没有文件名时，复制按钮默认隐藏 */
.code-highlight-container.no-filename .code-copy-btn {
    opacity: 0;
    pointer-events: none;
}

/* 悬停时显示复制按钮 */
.code-highlight-container.no-filename:hover .code-copy-btn {
    opacity: 1;
    pointer-events: auto;
}

.code-copy-btn:hover {
    background: #fff;
    border-color: #999;
    color: #333;
}

.code-copy-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.code-copy-btn.copied {
    background: #333;
    border-color: #333;
    color: #fff;
}

.code-highlight-empty {
    margin: 20px 0;
    padding: 30px;
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    color: #999;
    font-size: 1.4rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .code-highlight-container {
        margin: 15px 0;
        border-radius: 6px;
    }
    
    .code-filename {
        padding: 6px 10px;
        font-size: 1rem;
    }
    
    .code-line-numbers {
        min-width: 35px;
        padding: 10px 0;
    }
    
    .code-line-numbers span {
        padding: 0 10px;
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .code-content {
        padding: 10px 12px;
    }
    
    .code-content code {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .code-copy-btn {
        top: 10px;
        right: 8px;
        padding: 4px 8px;
        font-size: 0.9rem;
    }
    
    .code-copy-btn svg {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
    }
}

/* ==================== 隐藏内容区块 ==================== */

.hidden-content-box {
    margin: 20px 0;
}

/* 已解锁的内容 */
.hidden-content-visible {
    padding: 20px;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 8px;
    border-left: 3px solid #4CAF50;
}

/* 锁定状态 */
.hidden-content-locked {
    padding: 30px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    text-align: center;
}

.hidden-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.hidden-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
}

/* 口令输入表单 */
.hidden-password-form {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.hidden-password-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.hidden-password-input:focus {
    outline: none;
    border-color: #2196F3;
}

.hidden-password-submit {
    padding: 10px 20px;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.hidden-password-submit:hover {
    background: #1976D2;
}

.hidden-password-submit:active {
    transform: scale(0.98);
}

/* 按钮样式 */
.hidden-reply-btn,
.hidden-login-btn {
    display: inline-block;
    padding: 10px 30px;
    background: #2196F3;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.hidden-reply-btn:hover,
.hidden-login-btn:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

/* 临时提示消息 */
.hidden-temp-message {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    animation: fadeIn 0.3s;
}

.hidden-temp-success {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.hidden-temp-error {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.hidden-temp-fadeout {
    animation: fadeOut 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* 移动端适配 */
@media (max-width: 768px) {
    .hidden-content-locked {
        padding: 20px 15px;
    }
    
    .hidden-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .hidden-message {
        font-size: 14px;
    }
    
    .hidden-password-form {
        flex-direction: column;
        max-width: 100%;
    }
    
    .hidden-password-input,
    .hidden-password-submit {
        width: 100%;
    }
}

/* ==================== 提示框区块 ==================== */

.alert-box {
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    line-height: 1.8;
    position: relative;
}

.alert-icon {
    width: 1.2em;
    height: 1.2em;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
    top: -0.1em;
}

.alert-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.alert-content {
    display: inline;
}

.alert-content p {
    margin: 0;
}

.alert-content p + p {
    margin-top: 8px;
}

/* 提示（蓝色） */
.alert-info {
    background: rgba(33, 150, 243, 0.08);
}

.alert-info .alert-icon svg {
    color: #2196F3;
}

.alert-info .alert-content {
    color: #1976D2;
}

/* 成功（绿色） */
.alert-success {
    background: rgba(76, 175, 80, 0.08);
}

.alert-success .alert-icon svg {
    color: #4CAF50;
}

.alert-success .alert-content {
    color: #388E3C;
}

/* 警告（橙色） */
.alert-warning {
    background: rgba(255, 152, 0, 0.08);
}

.alert-warning .alert-icon svg {
    color: #FF9800;
}

.alert-warning .alert-content {
    color: #F57C00;
}

/* 错误（红色） */
.alert-error {
    background: rgba(244, 67, 54, 0.08);
}

.alert-error .alert-icon svg {
    color: #F44336;
}

.alert-error .alert-content {
    color: #D32F2F;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .alert-box {
        margin: 15px 0;
        padding: 16px;
    }
}

/* ==================== ECharts 图表区块 ==================== */

.echarts-container {
    margin: 20px 0 10px 0;
}

.echarts-chart {
    width: 100%;
    min-height: 400px;
    background: transparent;
    border-radius: 8px;
    padding: 20px;
}

.echarts-empty {
    margin: 20px 0;
    padding: 40px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    color: #999;
    font-size: 1.4rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .echarts-container {
        margin: 15px 0 8px 0;
    }
    
    .echarts-chart {
        padding: 10px;
        min-height: 280px;
        height: 280px !important;
    }
}

/* ==================== 图片灯箱 ==================== */

.post-content a[data-fancybox] {
    cursor: zoom-in;
    display: inline-block;
    border: none;
}

.post-content a[data-fancybox]:hover {
    opacity: 0.9;
}

.post-content a[data-fancybox] img {
    transition: opacity 0.2s;
}

/* 自定义 Fancybox 样式 */
.fancybox__backdrop {
    background: rgba(0, 0, 0, 0.95);
}

.fancybox__caption {
    background: rgba(0, 0, 0, 0.75);
    padding: 15px 20px;
    border-radius: 4px;
    color: #fff;
}

/* 防止 Fancybox 打开时页面晃动 */
html.with-fancybox {
    scrollbar-gutter: stable;
}

body.compensate-for-scrollbar {
    overflow: hidden;
}

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
    .comments-area {
        margin-top: 10px;
        padding-top: 40px;
    }
    
    /* 移动端排序 */
    .comments-header {
        margin-bottom: 25px;
        gap: 15px;
    }
    
    .comments-count {
        font-size: 18px;
    }
    
    .comments-sort {
        gap: 8px;
    }
    
    .comments-sort .comments-sort-label {
        font-size: 13px;
    }
    
    .comment-sort-toggle .sort-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .comment-body {
        gap: 15px;
    }
    
    .comment-body .avatar {
        width: 40px;
        height: 40px;
    }
    
    .comment-author .fn {
        font-size: 16px;
    }
    
    .comment-author .reply-to {
        font-size: 14px;
    }
    
    .comment-metadata {
        font-size: 13px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* 移动端回复按钮 */
    .comment-metadata .reply a {
        height: 26px;
        padding: 0 8px;
        font-size: 12px;
    }
    
    /* 移动端点赞按钮 */
    .comment-like-btn {
        height: 26px;
        padding: 0 8px;
        font-size: 12px;
        gap: 4px;
    }
    
    .comment-like-btn .like-icon {
        width: 14px;
        height: 14px;
    }
    
    .comment-list .children {
        padding-left: 30px;
    }
    
    .comment .comment-respond {
        padding: 20px;
    }
    
    /* 移动端待办事项 */
    .todo-text {
        font-size: 1.1rem;
    }
    
    .todo-checkbox {
        width: 22px;
        height: 22px;
        font-size: 14px;
    }
    
    /* 移动端时间线 */
    .post-content .timeline-container::after,
    .page-content .timeline-container::after {
        width: 16px;
        height: 16px;
    }
    
    .timeline-item {
        padding-left: 30px;
    }
    
    .timeline-item::before {
        left: 7px;
    }
    
    .timeline-marker {
        width: 16px;
        height: 16px;
        left: 0;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .timeline-text {
        font-size: 1.1rem;
    }
    
    /* 移动端进度条 */
    .progress-label {
        font-size: 1.1rem;
    }
    
    .progress-percentage {
        font-size: 1.1rem;
    }
    
    .progress-bar-wrapper {
        height: 10px;
    }
    
    /* 移动端标签页 */
    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .tabs-content {
        padding-top: 20px;
    }
    
    .tab-panel p {
        font-size: 1.1rem;
    }
    
    /* 移动端折叠面板 */
    .accordion-summary {
        font-size: 1.1rem;
    }
    
    .accordion-content p {
        font-size: 1.1rem;
    }
    
    .comment-reply-title {
        font-size: 18px;
        margin-bottom: 20px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        justify-content: space-between;
    }
    
    .cancel-reply-link {
        align-self: auto;
        flex-shrink: 0;
    }
    
    .cancel-reply-link a {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .comment .comment-respond {
        padding: 20px 16px;
        border-radius: 8px;
    }
    
    /* 移动端表单布局 */
    .comment-form-group {
        margin-bottom: 12px;
    }
    
    .comment-form-group textarea,
    .comment-form-group input {
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .comment-form-group textarea {
        min-height: 90px;
    }
    
    .comment-form-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .comment-form-row .comment-form-group {
        margin-bottom: 0;
    }
    
    .comment-form .submit-button {
        width: 100%;
        padding: 12px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    /* 移动端密码保护表单 */
    .post-password-form {
        margin: 40px 0;
    }
    
    .post-password-form p {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .post-password-form label {
        display: block;
        margin-bottom: 15px;
        margin-right: 0;
    }
    
    .post-password-form input[type="password"] {
        width: 100%;
        font-size: 16px;
        padding: 12px 16px;
    }
    
    .post-password-form input[type="submit"] {
        width: 100%;
        padding: 12px;
    }
}

