/*
Theme Name: Aituse TechBlog
Theme URI: https://techblog.com/
Author: Antigravity
Author URI: https://techblog.com/
Description: A premium, minimalist, and state-of-the-art dark-mode blog theme for developers.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: dark, two-columns, custom-menu, post-formats, translation-ready
Text Domain: aituse-theme
*/

/* 变量及基础样式保持原样 */
:root {
    --bg-color: #0d0d0d;
    --card-bg: #161616;
    --primary-color: #e0e0e0;
    --secondary-color: #999999;
    --accent-color: #ffffff;
    --hover-color: var(--hover-color);
    --hover-color-light: #cbf568;
    --hover-color-rgb: var(--hover-color-rgb);
    --border-color: #262626;
    --site-width: 1200px;
    --sidebar-width: 320px;
    --gap: 30px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0 !important;
}

body {
    background-color: var(--bg-color);
    color: var(--primary-color);
    font-family: "Microsoft YaHei", "微软雅黑", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.container {
    width: 100%;
    max-width: var(--site-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

@media (max-width: 1240px) {
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* --- Header & Navigation (保持原样) --- */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    width: auto;
}

.main-nav .nav-list {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.main-nav a:hover {
    color: var(--hover-color);
}

.nav-login {
    display: flex;
    align-items: center;
}

.nav-login a {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.nav-login a:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.nav-footer-mobile {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle .bar {
    height: 1px;
    width: 24px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: 0.4s ease;
}

.menu-toggle .bar:nth-child(2) {
    width: 16px;
}

/* --- 布局 (保持原样) --- */
.site-main {
    display: flex;
    gap: var(--gap);
    margin: var(--gap) auto;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.content-area > *:last-child {
    margin-bottom: 0 !important;
}

.sidebar {
    width: var(--sidebar-width);
}

.sidebar > *:last-child {
    margin-bottom: 0 !important;
}

/* 文章卡片 */
.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    margin-bottom: var(--gap);
    position: relative;
}

.post-title {
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 20px;
    line-height: 1.3;
}

.post-excerpt {
    color: var(--secondary-color);
    font-size: 15px;
    margin-bottom: 25px;
}

/* 置顶文章 */
.post-sticky {
    background: linear-gradient(135deg, rgba(26, 252, 229, 0.05) 0%, var(--card-bg) 60%);
}

.post-sticky .post-title a {
    color: var(--accent-color);
}

.post-card .post-title a:hover {
    color: var(--hover-color);
}

.sticky-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--hover-color);
    color: #000;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 16px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    user-select: none;
}

/* 修改点：更新 Meta 样式支持多项展示 */
.post-meta {
    font-size: 14px;
    color: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.meta-sep {
    color: var(--border-color);
}

.meta-cat a {
    opacity: 0.7;
}

.meta-tags a {
    color: var(--primary-color);
    font-weight: 600;
}

/* 列表页文章卡片 Tag 块状化设计（适配标签页精致风格） */
.post-card .meta-tags a {
    color: var(--primary-color);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    margin-top: 2px;
    margin-bottom: 2px;
    transition: all 0.3s ease;
    text-transform: none;
}

.post-card .meta-tags a:hover {
    border-color: var(--hover-color) !important;
    color: var(--hover-color) !important;
    background: rgba(var(--hover-color-rgb), 0.05) !important;
    transform: translateY(-1.5px);
    text-decoration: none;
}

.meta-item a:hover {
    color: var(--hover-color);
    opacity: 1;
}

/* 图片展示方案 (保持原样) */
.post-single-image {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    position: relative;
}

.post-single-image img {
    width: 50%;
    border: 1px solid var(--border-color);
}

.post-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 25px;
    position: relative;
}

.post-gallery:has(img:nth-child(3)) {
    grid-template-columns: repeat(3, 1fr);
}

.post-gallery:has(img:nth-child(4)) {
    grid-template-columns: repeat(2, 1fr);
}

.post-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border-color);
}

.img-count-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
    padding: 4px 8px;
    letter-spacing: 1px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-single-image .img-count-badge {
    left: auto;
    right: calc(25% + 10px);
}

/* 视频、侧边栏及响应式 (保持原样) */
.video-container {
    background: #000;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.v-16-9 {
    aspect-ratio: 16 / 9;
}

.v-9-16 {
    aspect-ratio: 9 / 16;
    max-width: 400px;
    margin: 0 auto;
}

.v-1-1 {
    aspect-ratio: 1 / 1;
    max-width: 500px;
    margin: 0 auto;
}

.widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: var(--gap);
}

.widget h3 {
    font-size: 16px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--hover-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.about-widget p {
    font-size: 14px;
    letter-spacing: 1.5px;
    line-height: 1.8;
}

.latest-comments-widget li {
    margin-bottom: 16px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 14px;
}

.latest-comments-widget li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.mini-comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mini-avatar-container {
    width: 24px;
    height: 24px;
    overflow: hidden;
}

.mini-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-comment-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-color);
}

.mini-comment-content {
    font-size: 13px;
    line-height: 1.5;
    color: var(--secondary-color);
}

.mini-post {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.mini-post:hover {
    color: var(--hover-color);
}

.latest-posts-widget li:last-child .mini-post {
    margin-bottom: 0;
}

.search-widget form {
    display: flex;
    width: 100%;
}

.search-widget input {
    flex: 1;
    background: #000;
    border: 1px solid var(--border-color);
    padding: 0 12px;
    height: 46px;
    color: #fff;
    outline: none;
    font-size: 14px;
    border-right: none;
}

.search-widget button {
    background: var(--primary-color);
    color: #000;
    border: 1px solid var(--border-color);
    border-left: none;
    width: 48px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s ease;
}

.search-widget button:hover {
    background: var(--hover-color);
    color: #fff;
    border-color: var(--hover-color);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.pagination a,
.pagination .current,
.pagination .dots {
    padding: 10px 18px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    font-size: 14px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination .current {
    background: var(--hover-color);
    border-color: var(--hover-color);
    color: #000;
}

.site-footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 14px;
    letter-spacing: 1px;
}

.footer-links {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--hover-color);
}

/* --- Breadcrumb --- */
.breadcrumb {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--hover-color);
    padding: 16px 24px;
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: var(--gap);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.breadcrumb a {
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--hover-color);
}

.breadcrumb-separator {
    color: var(--border-color);
    user-select: none;
}

.breadcrumb-current {
    font-size: inherit;
    font-weight: 500;
    color: var(--primary-color);
    margin: 0;
    display: inline;
}

/* --- Single Post Typography & Content --- */
h1.post-title {
    font-size: 26px;
    margin-bottom: 20px;
}

.post-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--primary-color);
}

.post-body p {
    margin-bottom: 24px;
}

.post-body h2 {
    font-size: 22px;
    font-weight: normal;
    color: var(--accent-color);
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.post-body h3 {
    font-size: 18px;
    font-weight: normal;
    color: var(--accent-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-body blockquote {
    background: rgba(var(--hover-color-rgb), 0.03);
    border-left: 4px solid var(--hover-color);
    padding: 20px 25px;
    margin: 30px 0;
    color: var(--secondary-color);
}

.post-body blockquote p:last-child {
    margin-bottom: 0;
}

.post-body ul, .post-body ol {
    margin-bottom: 24px;
    padding-left: 20px;
}

.post-body ul {
    list-style: square;
}

.post-body ol {
    list-style: decimal;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body pre {
    background: #000000;
    border: 1px solid var(--border-color);
    padding: 20px;
    overflow-x: auto;
    margin: 30px 0;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.post-body code {
    background: rgba(255, 255, 255, 0.05);
    color: var(--hover-color);
    padding: 2px 6px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 14px;
}

.post-body pre code {
    background: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* --- Content Images & Captions --- */
.post-figure {
    margin: 30px 0;
    text-align: center;
}

.post-figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    margin: 0 auto 10px auto;
    display: block;
}

.post-figure figcaption {
    font-size: 13px;
    color: var(--secondary-color);
    letter-spacing: 0.5px;
}

/* --- Post Navigation (Prev/Next) --- */
.post-navigation {
    margin-top: var(--gap);
    margin-bottom: var(--gap);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: var(--gap);
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.3s ease;
    text-decoration: none;
}

.post-navigation .nav-previous:hover,
.post-navigation .nav-next:hover {
    border-color: var(--hover-color);
}

.post-navigation .nav-next {
    text-align: right;
    align-items: flex-end;
}

.post-navigation .nav-previous {
    text-align: left;
    align-items: flex-start;
}

.post-navigation .nav-label {
    font-size: 14px;
    color: var(--hover-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.post-navigation .nav-title {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: normal;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.post-navigation .nav-previous:hover .nav-title,
.post-navigation .nav-next:hover .nav-title {
    color: var(--hover-color);
}

/* --- Post Inner Pagination --- */
.post-inner-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 40px 0 20px 0;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.post-page-title {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.post-inner-pagination a,
.post-inner-pagination .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--primary-color);
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.post-inner-pagination a:hover {
    border-color: var(--hover-color);
    color: var(--hover-color);
}

.post-inner-pagination .current {
    background: var(--hover-color);
    border-color: var(--hover-color);
    color: #000;
    font-weight: 600;
}

/* --- Comments Area --- */
.comments-area {
    margin-top: var(--gap);
}

.comments-title,
.comment-reply-title {
    font-size: 18px;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.comment-list {
    margin-bottom: 40px;
}

.comment-list .comment {
    list-style: none;
    margin-bottom: 25px;
}

.comment-list .children {
    margin-left: 50px;
    margin-top: 20px;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
}

.comment-body {
    position: relative;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-container {
    width: 36px;
    height: 36px;
    overflow: hidden;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-author .fn {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
}

.author-badge {
    background: var(--hover-color);
    color: #000000;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.comment-metadata {
    font-size: 12px;
    color: var(--secondary-color);
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.reply a {
    font-size: 12px;
    color: var(--hover-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reply a:hover {
    opacity: 0.8;
}

/* Comment Form */
.comment-respond {
    margin-top: 40px;
}

.comment-notes {
    font-size: 13px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.required {
    color: var(--hover-color);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-form label {
    display: block;
    font-size: 13px;
    color: var(--secondary-color);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"] {
    width: 100%;
    background: #000000;
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus {
    border-color: var(--hover-color);
}

.comment-form-inputs {
    display: flex;
    gap: 20px;
}

.comment-form-inputs p {
    flex: 1;
}

.submit {
    background: var(--primary-color);
    color: #000000;
    border: 1px solid var(--border-color);
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit:hover {
    background: var(--hover-color);
    border-color: var(--hover-color);
}

@media (max-width: 992px) {
    .site-header {
        padding: 13px 0 !important;
    }

    .logo img {
        height: 34px !important;
    }

    .post-navigation .nav-links {
        flex-direction: column;
        gap: 15px;
    }

    .post-navigation .nav-links div[style*="flex: 1"] {
        display: none !important;
    }

    .post-navigation .nav-next {
        text-align: left;
        align-items: flex-start;
    }

    .site-main {
        flex-direction: column;
        padding: 0 15px;
    }

    .sidebar {
        display: none !important;
    }

    .post-single-image img {
        width: 100%;
    }

    .post-single-image .img-count-badge {
        left: auto;
        right: 10px;
    }

    .v-9-16,
    .v-1-1 {
        max-width: 100%;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(13, 13, 13, 0.98);
        backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        z-index: 1050;
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .main-nav a {
        font-size: 24px;
        font-weight: 300;
        letter-spacing: 4px;
    }

    .nav-login svg {
        width: 24px;
        height: 24px;
    }

    .nav-footer-mobile {
        display: block;
        position: absolute;
        bottom: 50px;
        color: var(--secondary-color);
        font-size: 14px;
        opacity: 0.5;
    }

    .menu-toggle.open .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    :root {
        --sticky-ad-height: 80px; /* 底部悬浮广告占位高度，设为 0px 即可瞬间关闭此布局预留 */
    }

    body {
        padding-bottom: var(--sticky-ad-height) !important;
    }

    #g-slot-top {
        margin-top: 15px !important;
        margin-bottom: 15px !important;
    }

    #g-slot-bottom {
        margin-top: 0 !important;
        margin-bottom: 15px !important;
    }

    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .site-main {
        padding: 0 !important;
        margin-top: 15px !important;
        margin-bottom: 15px !important;
    }

    .post-card {
        padding: 20px 15px !important;
        margin-bottom: 15px !important;
    }

    .post-sticky {
        padding-top: 52px !important;
    }

    .post-navigation {
        margin-top: 30px !important;
        margin-bottom: 30px !important;
    }

    .comments-area {
        margin-top: 30px !important;
        padding: 30px 24px !important;
    }

    /* 移动端紧凑型分页：展示最多3个数字页码 + 上一页/下一页 */
    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 100%;
        margin-top: 30px !important;
        margin-bottom: 0 !important;
    }

    .pagination .page-numbers {
        padding: 0 6px !important;
        font-size: 14px !important;
        height: 38px !important;
        min-width: 38px !important;
        background: var(--card-bg) !important;
        border: 1px solid var(--border-color) !important;
        color: var(--primary-color) !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        white-space: nowrap;
        box-sizing: border-box;
        transition: all 0.3s ease;
    }

    .pagination a:hover {
        border-color: var(--hover-color) !important;
        color: var(--hover-color) !important;
    }

    .pagination .current {
        background: var(--hover-color) !important;
        border-color: var(--hover-color) !important;
        color: #000 !important;
        font-weight: bold;
    }

    .pagination a.prev,
    .pagination a.next {
        padding: 0 12px !important;
        min-width: 75px !important;
    }

    .comment-form-inputs {
        flex-direction: column;
        gap: 20px;
    }
    
    .comment-list .children {
        margin-left: 20px;
        padding-left: 10px;
    }
}

/* --- 搜索结果页面 (Search Page) 专属样式 --- */
.search-header {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    margin-bottom: var(--gap);
}

.search-header h1 {
    font-size: 20px;
    font-weight: 500;
    color: var(--secondary-color);
    line-height: 1.4;
}

.search-header h1 .search-query {
    color: var(--hover-color);
    font-weight: 600;
}

.search-header h1 .search-count {
    color: var(--accent-color);
    font-weight: 600;
}

.search-page-bar {
    display: flex;
    margin-bottom: var(--gap);
    width: 100%;
}

.search-page-bar input {
    flex: 1;
    background: #000;
    border: 1px solid var(--border-color);
    padding: 0 20px;
    height: 56px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    border-right: none;
}

.search-page-bar input:focus {
    border-color: var(--hover-color);
    box-shadow: 0 0 12px rgba(var(--hover-color-rgb), 0.15);
}

.search-page-bar button {
    background: var(--hover-color);
    color: #000;
    border: 1px solid var(--hover-color);
    padding: 0 30px;
    height: 56px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-page-bar button:hover {
    background: var(--hover-color-light);
    box-shadow: 0 0 15px rgba(var(--hover-color-rgb), 0.3);
}

.no-results {
    padding: 60px 40px;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    margin-bottom: var(--gap);
}

.no-results-icon {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

.no-results-icon svg {
    width: 64px;
    height: 64px;
    stroke: var(--secondary-color);
}

.no-results-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-color);
}

.no-results-text {
    font-size: 15px;
    color: var(--secondary-color);
    margin-bottom: 30px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.suggested-tags-title {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.suggested-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.suggested-tags a {
    background: #000;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    font-size: 13px;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.suggested-tags a:hover {
    border-color: var(--hover-color);
    color: var(--hover-color);
    background: rgba(var(--hover-color-rgb), 0.05);
}

/* --- 404 页面专属样式 --- */
.error-404-container {
    padding: 80px 40px;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    margin-bottom: var(--gap);
}

.error-404-code {
    font-size: 120px;
    font-weight: 900;
    line-height: 1;
    color: var(--hover-color);
    letter-spacing: -2px;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(var(--hover-color-rgb), 0.2);
    animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.9;
        text-shadow: 0 0 20px rgba(var(--hover-color-rgb), 0.2);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 40px rgba(var(--hover-color-rgb), 0.5);
    }
}

.error-404-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.error-404-text {
    font-size: 15px;
    color: var(--secondary-color);
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.error-404-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.error-404-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.error-404-btn-primary {
    background: var(--hover-color);
    color: #000;
    border: 1px solid var(--hover-color);
}

.error-404-btn-primary:hover {
    background: var(--hover-color-light);
    box-shadow: 0 0 15px rgba(var(--hover-color-rgb), 0.3);
}

.error-404-btn-secondary {
    background: #000;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

.error-404-btn-secondary:hover {
    border-color: var(--hover-color);
    color: var(--hover-color);
    background: rgba(var(--hover-color-rgb), 0.05);
}

/* --- 标签云页面专属样式 --- */
.tags-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    margin-bottom: var(--gap);
}

.tags-tabs {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.tags-tab-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 0;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tags-tab-btn:hover {
    color: var(--hover-color);
}

.tags-tab-btn.active {
    color: var(--accent-color);
}

.tags-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--hover-color);
    box-shadow: 0 0 10px rgba(var(--hover-color-rgb), 0.5);
}

/* 标签云模式 */
.tag-cloud-view {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px 30px;
    padding: 20px 0;
}

.tag-cloud-item {
    display: inline-block;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tag-cloud-item:hover {
    color: var(--hover-color) !important;
    transform: scale(1.12);
    text-shadow: 0 0 15px rgba(var(--hover-color-rgb), 0.4);
}

/* 字母排序模式 */
.tags-alphabet-view {
    display: block;
}

.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 40px;
    justify-content: center;
    background: #000;
    padding: 15px;
    border: 1px solid var(--border-color);
}

.alphabet-filter-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--secondary-color);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.alphabet-filter-btn:hover {
    color: var(--hover-color);
    border-color: var(--hover-color);
}

.alphabet-filter-btn.active {
    background: var(--hover-color);
    color: #000;
    border-color: var(--hover-color);
    box-shadow: 0 0 10px rgba(var(--hover-color-rgb), 0.2);
}

.alphabet-filter-btn.disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.alphabet-groups-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.alphabet-group-block {
    display: flex;
    border: 1px solid var(--border-color);
    background: #000;
    transition: all 0.3s ease;
}

.alphabet-group-block:hover {
    border-color: rgba(var(--hover-color-rgb), 0.3);
}

.alphabet-group-letter {
    width: 80px;
    background: #0d0d0d;
    border-right: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: var(--hover-color);
    text-shadow: 0 0 10px rgba(var(--hover-color-rgb), 0.15);
}

.alphabet-group-tags {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
}

.alphabet-tag-item {
    font-size: 14px;
    color: var(--primary-color);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.alphabet-tag-item:hover {
    border-color: var(--hover-color);
    color: var(--hover-color);
    background: rgba(var(--hover-color-rgb), 0.05);
    transform: translateY(-2px);
}

.alphabet-tag-count {
    font-size: 11px;
    background: var(--border-color);
    color: var(--secondary-color);
    padding: 2px 6px;
    font-weight: 600;
}

.alphabet-tag-item:hover .alphabet-tag-count {
    background: var(--hover-color);
    color: #000;
}

/* --- 作者列表页面专属样式 --- */
.authors-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    margin-bottom: var(--gap);
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    margin-top: 20px;
}

.author-mini-card {
    background: #000;
    border: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.author-mini-card:hover {
    border-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(var(--hover-color-rgb), 0.1);
}

.author-card-avatar-wrap {
    width: 52px;
    height: 52px;
    overflow: hidden;
    flex-shrink: 0;
}

.author-card-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-card-info {
    flex: 1;
    min-width: 0;
}

.author-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author-card-name a {
    transition: color 0.2s ease;
}

.author-card-name a:hover {
    color: var(--hover-color);
}

.author-card-desc {
    font-size: 12px;
    color: var(--secondary-color);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.author-card-meta {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.author-card-post-count {
    color: var(--hover-color);
    font-weight: 600;
}

.author-card-link {
    color: var(--secondary-color);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.author-mini-card:hover .author-card-link {
    color: var(--hover-color);
}

/* --- 单页面 (Page) 专属样式 --- */
.page-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    margin-bottom: var(--gap);
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--secondary-color);
    margin-bottom: 25px;
    border: none !important; /* 彻底清除任何由外部插件或环境污染而来的四边白框 */
    border-bottom: 1px solid var(--border-color) !important; /* 仅保留底部极简金属细线暗边 */
    padding-bottom: 15px !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 友情链接网格 */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.link-card {
    background: #000;
    border: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.link-card:hover {
    border-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 0 12px rgba(var(--hover-color-rgb), 0.1);
}

.link-avatar {
    width: 40px;
    height: 40px;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--hover-color);
    flex-shrink: 0;
}

.link-info {
    flex: 1;
    min-width: 0;
}

.link-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-desc {
    font-size: 11px;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 联系我们表单 */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
    background: #000;
    border: 1px solid var(--border-color);
    padding: 20px;
}

.contact-info-item {
    font-size: 14px;
}

.contact-info-label {
    color: var(--hover-color);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.contact-info-value {
    color: var(--primary-color);
}

.contact-form-container {
    max-width: 600px;
    margin-top: 30px;
}

/* WordPress 默认小工具样式兼容 */
.widget_recent_entries ul,
.widget_recent_comments ul {
    padding: 0;
    list-style: none;
}

.widget_recent_entries li {
    margin-bottom: 15px;
}

.widget_recent_entries li:last-child {
    margin-bottom: 0;
}

.widget_recent_entries li a {
    display: block;
    font-size: 14px;
    line-height: 1.6;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.widget_recent_entries li a:hover {
    color: var(--hover-color);
}

.widget_recent_comments li {
    font-size: 13px;
    line-height: 1.5;
    color: var(--secondary-color);
    margin-bottom: 16px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 14px;
}

.widget_recent_comments li:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.widget_recent_comments .comment-author-link,
.widget_recent_comments .comment-author-link a {
    font-weight: 600;
    color: var(--accent-color);
}

.widget_recent_comments li a {
    color: var(--hover-color);
    transition: color 0.3s ease;
}

.widget_recent_comments li a:hover {
    color: var(--primary-color);
}

.widget_text p,
.widget_block p {
    font-size: 14px;
    color: var(--primary-color);
    line-height: 1.7;
}

/* Gutenberg Search Block styling compatibility */
div.wp-block-search {
    margin-bottom: var(--gap) !important;
}

form.wp-block-search,
.widget_search form {
    margin-bottom: 0 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: flex !important;
    width: 100% !important;
}

.wp-block-search__label {
    display: none !important; /* Hide the label to match static theme layout */
}

.wp-block-search__inside-wrapper,
.wp-block-search .wp-block-search__inside-wrapper {
    display: flex !important;
    width: 100% !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    gap: 0 !important; /* Reset Gutenberg flex gap */
}

.wp-block-search__input,
.wp-block-search input,
.widget_search input {
    flex: 1 !important;
    background: #000 !important;
    border: 1px solid var(--border-color) !important;
    border-right: none !important;
    padding: 0 12px !important;
    height: 46px !important;
    color: #fff !important;
    outline: none !important;
    font-size: 14px !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    width: auto !important;
}

.wp-block-search__button,
.wp-block-search button,
.widget_search button {
    background: var(--primary-color) !important;
    color: #000 !important;
    border: 1px solid var(--border-color) !important;
    border-left: none !important;
    width: 48px !important;
    height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: 0.3s ease !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    font-size: 0 !important; /* Hide any fallback text */
}

.wp-block-search__button svg,
.wp-block-search button svg,
.widget_search button svg {
    display: none !important; /* Hide default SVG to avoid double-rendering with pseudo-element */
}

/* Use our SVG icon for search button in Gutenberg block search */
.wp-block-search__button::before,
.wp-block-search button::before,
.widget_search button::before {
    content: "" !important;
    width: 16px !important;
    height: 16px !important;
    display: inline-block !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

.wp-block-search__button:hover::before,
.wp-block-search button:hover::before,
.widget_search button:hover::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>") !important;
}

.wp-block-search__button:hover,
.wp-block-search button:hover,
.widget_search button:hover {
    background: var(--hover-color) !important;
    color: #fff !important;
    border-color: var(--hover-color) !important;
}

/* Custom Aituse widgets styling compatibility and margins reset */
.widget_aituse_recent_posts ul,
.widget_aituse_recent_comments ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.widget_aituse_recent_posts li {
    margin-bottom: 15px !important;
    list-style: none !important;
}

.widget_aituse_recent_posts li:last-child {
    margin-bottom: 0 !important;
}

.widget_aituse_recent_posts li:last-child .mini-post {
    margin-bottom: 0 !important;
}

.widget_aituse_recent_comments li {
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: var(--secondary-color) !important;
    margin-bottom: 16px !important;
    border-bottom: 1px dashed var(--border-color) !important;
    padding-bottom: 14px !important;
    list-style: none !important;
}

.widget_aituse_recent_comments li:last-child {
    margin-bottom: 0 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

/* General widget text margin-bottom reset */
.widget p:last-child {
    margin-bottom: 0 !important;
}

/* ==========================================================================
   Gutenberg Blocks & Core Layout Restorations (High Specificity Overrides)
   ========================================================================== */

/* 1. Headings */
.post-body .wp-block-heading,
.post-body h2,
.post-body h3,
.post-body h4 {
    color: var(--accent-color) !important;
    font-weight: normal !important;
    letter-spacing: 0.5px !important;
}

.post-body .wp-block-heading:has(self::h2),
.post-body h2 {
    font-size: 22px !important;
    margin-top: 40px !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding-bottom: 8px !important;
}

.post-body .wp-block-heading:has(self::h3),
.post-body h3 {
    font-size: 18px !important;
    margin-top: 30px !important;
    margin-bottom: 15px !important;
}

.post-body .wp-block-heading:has(self::h4),
.post-body h4 {
    font-size: 16px !important;
    margin-top: 25px !important;
    margin-bottom: 10px !important;
}

/* 2. Gutenberg Paragraphs & Spacing */
.post-body p,
.post-body .wp-block-paragraph {
    margin-bottom: 24px !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: var(--primary-color) !important;
}

/* 3. Gutenberg Quotes */
.post-body blockquote,
.post-body .wp-block-quote {
    background: rgba(var(--hover-color-rgb), 0.03) !important;
    border: none !important;
    border-left: 4px solid var(--hover-color) !important;
    padding: 20px 25px !important;
    margin: 20px 0 !important;
    color: var(--secondary-color) !important;
}

.post-body blockquote p,
.post-body .wp-block-quote p {
    font-size: 15px !important;
    line-height: 1.7 !important;
    margin-bottom: 0 !important;
    color: var(--secondary-color) !important;
}

/* 4. Gutenberg Code blocks */
.post-body pre,
.post-body .wp-block-code {
    background: #000000 !important;
    border: 1px solid var(--border-color) !important;
    padding: 20px !important;
    overflow-x: auto !important;
    margin: 20px 0 !important;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

.post-body code,
.post-body .wp-block-code code,
.post-body :not(pre) > code {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--hover-color) !important;
    padding: 2px 6px !important;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace !important;
    font-size: 14px !important;
}

.post-body pre code,
.post-body .wp-block-code code {
    background: none !important;
    color: inherit !important;
    padding: 0 !important;
    font-size: inherit !important;
}

/* 5. Gutenberg Lists */
.post-body ul,
.post-body ol,
.post-body .wp-block-list {
    margin-bottom: 24px !important;
    padding-left: 20px !important;
}

.post-body ul,
.post-body ul.wp-block-list {
    list-style: square !important;
}

.post-body ol,
.post-body ol.wp-block-list {
    list-style: decimal !important;
}

.post-body li {
    margin-bottom: 8px !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
}

/* 6. Gutenberg Images, Videos, Embed Figures & Captions */
.post-body > figure:not(.wp-block-gallery),
.post-body > .wp-caption {
    margin: 10px auto !important;
    text-align: center !important;
    max-width: 100% !important; /* 彻底覆写 inline width，防止大图在移动端把屏幕撑破 */
    height: auto !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

.post-body > figure:not(.wp-block-gallery) img,
.post-body > .wp-caption img,
.post-body > img.size-full,
.post-body > img.size-large,
.post-body > img.size-medium,
.post-body > p > img {
    max-width: 100% !important;
    height: auto !important;
    border: 1px solid var(--border-color) !important;
    margin: 0 auto 10px auto !important;
    display: block !important;
}

/* 独立处理经典编辑器与古腾堡中被浮动的媒体元素，防止强制 block 居中导致浮动失效 */
.post-body img.alignleft,
img.alignleft {
    float: left !important;
    margin: 5px 20px 20px 0 !important;
    display: inline !important;
}

.post-body img.alignright,
img.alignright {
    float: right !important;
    margin: 5px 0 20px 20px !important;
    display: inline !important;
}

.post-body img.aligncenter,
img.aligncenter {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

.post-body .wp-block-video video,
.wp-block-video video,
.wp-video video,
.wp-video-shortcode {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 75vh !important; /* 防止竖屏视频在高度上被拉伸过长，限制在视口 75% 内 */
    border: 1px solid var(--border-color) !important;
    margin: 0 auto 10px auto !important;
    display: block !important;
    background: #000 !important;
}

.post-body .wp-block-image figcaption,
.post-body .wp-block-video figcaption,
.post-body .wp-block-embed figcaption,
.post-body figure figcaption,
.post-body .wp-caption-text,
.wp-caption-text {
    font-size: 13px !important;
    color: var(--secondary-color) !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    margin-top: 8px !important;
    line-height: 1.5 !important;
    border: none !important;
    background: none !important;
}

/* 7. Gutenberg Gallery Fixes */
.post-body .wp-block-gallery,
.wp-block-gallery,
.post-body .gallery,
.gallery,
.post-body .blocks-gallery-grid,
.blocks-gallery-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 15px 0 !important;
    padding: 0 !important;
    gap: 12px !important;
    list-style: none !important;
}

/* Clear margins/paddings on all immediate grid/flex cells and nested image/figure blocks inside any gallery */
.post-body .wp-block-gallery > *,
.wp-block-gallery > *,
.post-body .gallery > *,
.gallery > *,
.post-body .blocks-gallery-grid > *,
.blocks-gallery-grid > *,
.post-body .wp-block-gallery figure,
.wp-block-gallery figure,
.post-body .wp-block-gallery .wp-block-image,
.wp-block-gallery .wp-block-image,
.post-body .gallery figure,
.gallery figure,
.post-body .gallery .gallery-item,
.gallery .gallery-item,
.post-body .blocks-gallery-item,
.blocks-gallery-item {
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 calc(33.333% - 8px) !important;
    max-width: calc(33.333% - 8px) !important;
    min-width: 120px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* Ensure all images inside the gallery show their original sizes (no crop), have 1px borders matching classic editor style */
.post-body .wp-block-gallery img,
.wp-block-gallery img,
.post-body .gallery img,
.gallery img,
.post-body .blocks-gallery-grid img,
.blocks-gallery-grid img,
.post-body .blocks-gallery-item img,
.blocks-gallery-item img {
    margin: 0 !important;
    display: block !important;
    width: 100% !important;
    height: auto !important; /* 恢复图片原始比例高度，不压缩不裁剪 */
    border: 1px solid var(--border-color) !important; /* 直接应用于图片的金属细线边框，对齐经典编辑器 */
    box-sizing: border-box !important;
    transition: border-color 0.3s ease !important;
}

/* 悬停时仅高亮图片自身边框色 */
.post-body .wp-block-gallery img:hover,
.wp-block-gallery img:hover,
.post-body .gallery img:hover,
.gallery img:hover,
.post-body .blocks-gallery-grid img:hover,
.blocks-gallery-grid img:hover,
.post-body .blocks-gallery-item img:hover,
.blocks-gallery-item img:hover {
    border-color: var(--hover-color) !important;
}

/* Explicit columns class overrides for galleries */
.wp-block-gallery.columns-1 > *,
.gallery.columns-1 > * {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

.wp-block-gallery.columns-2 > *,
.gallery.columns-2 > * {
    flex: 0 0 calc(50% - 6px) !important;
    max-width: calc(50% - 6px) !important;
}

.wp-block-gallery.columns-3 > *,
.gallery.columns-3 > * {
    flex: 0 0 calc(33.333% - 8px) !important;
    max-width: calc(33.333% - 8px) !important;
}

.wp-block-gallery.columns-4 > *,
.gallery.columns-4 > * {
    flex: 0 0 calc(33.333% - 8px) !important; /* Cap at 3 columns maximum */
    max-width: calc(33.333% - 8px) !important;
}

.wp-block-gallery.columns-5 > *,
.gallery.columns-5 > * {
    flex: 0 0 calc(33.333% - 8px) !important; /* Cap at 3 columns maximum */
    max-width: calc(33.333% - 8px) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wp-block-gallery.columns-3 > *,
    .gallery.columns-3 > *,
    .wp-block-gallery.columns-4 > *,
    .gallery.columns-4 > *,
    .wp-block-gallery.columns-5 > *,
    .gallery.columns-5 > * {
        flex: 0 0 calc(50% - 6px) !important;
        max-width: calc(50% - 6px) !important;
    }
}

@media (max-width: 480px) {
    .post-body .wp-block-gallery,
    .wp-block-gallery {
        gap: 8px !important;
    }
    .wp-block-gallery > *,
    .gallery > * {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ==========================================================================
   Comments System & Forms Visual Polish
   ========================================================================== */

/* 1. Comment List Structure & Resets */
.comments-area ol.comment-list,
.comments-area ul.comment-list {
    padding-left: 0 !important;
    list-style: none !important;
}

.comment-list .comment {
    list-style: none !important;
    margin-bottom: 25px !important;
    padding-left: 0 !important;
}

.comment-list .children {
    margin-left: 50px !important;
    margin-top: 20px !important;
    border-left: 1px solid var(--border-color) !important;
    padding-left: 20px !important;
    list-style: none !important;
}

.comment-body {
    position: relative !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
}

.comment-meta {
    display: block !important;
    position: relative !important;
    margin-bottom: 12px !important;
}

.comment-author {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 4px !important;
}

.avatar-container {
    width: 36px !important;
    height: 36px !important;
    overflow: hidden !important;
    display: inline-block !important;
}

.avatar-container img.avatar,
img.avatar {
    width: 36px !important;
    height: 36px !important;
    object-fit: cover !important;
    border-radius: 0 !important;
}

.comment-author .fn {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
}

.comment-author .fn a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.comment-author .fn a:hover {
    color: var(--hover-color) !important;
}

.author-badge {
    background: var(--hover-color) !important;
    color: #000000 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 2px 6px !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    display: inline-block !important;
    margin-left: 4px !important;
}

.comment-metadata {
    font-size: 11px !important;
    color: var(--secondary-color) !important;
    margin-left: 48px !important;
    display: block !important;
}

.comment-metadata a {
    color: var(--secondary-color) !important;
    text-decoration: none !important;
}

.comment-metadata a:hover {
    color: var(--hover-color) !important;
}

.comment-content {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: var(--primary-color) !important;
    margin-bottom: 10px !important;
}

.comment-content p {
    margin-bottom: 10px !important;
}

.comment-content p:last-child {
    margin-bottom: 0 !important;
}

.reply {
    margin-top: 5px !important;
}

.reply a.comment-reply-link {
    font-size: 12px !important;
    color: var(--hover-color) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-decoration: none !important;
}

.reply a.comment-reply-link:hover {
    opacity: 0.8 !important;
}

/* 2. Comment Response & Form fields styling */
.comment-respond {
    margin-top: 40px !important;
}
.comments-area > .comment-respond:first-child {
    margin-top: 0 !important;
}

.comment-notes {
    font-size: 13px !important;
    color: var(--secondary-color) !important;
    margin-bottom: 20px !important;
}

.required {
    color: var(--hover-color) !important;
}

.comment-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

.comment-form label {
    display: block !important;
    font-size: 13px !important;
    color: var(--secondary-color) !important;
    margin-bottom: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"] {
    width: 100% !important;
    background: #000000 !important;
    border: 1px solid var(--border-color) !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    outline: none !important;
    transition: border-color 0.3s ease !important;
    box-sizing: border-box !important;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus {
    border-color: var(--hover-color) !important;
}

.comment-form-inputs {
    display: flex !important;
    gap: 20px !important;
}

.comment-form-inputs p {
    flex: 1 !important;
    margin: 0 !important;
}

/* 3. Cookies consent checkbox */
.comment-form-cookies-consent {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-top: 5px !important;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: auto !important;
    height: auto !important;
    margin: 4px 0 0 0 !important;
    cursor: pointer !important;
}

.comment-form-cookies-consent label {
    font-size: 13px !important;
    color: var(--secondary-color) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer !important;
    display: inline !important;
}

.form-submit {
    margin-top: 10px !important;
}

.submit {
    background: var(--primary-color) !important;
    color: #000000 !important;
    border: 1px solid var(--border-color) !important;
    padding: 12px 28px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.submit:hover {
    background: var(--hover-color) !important;
    border-color: var(--hover-color) !important;
    color: #000000 !important;
}

/* Comment Form Cancel Reply button */
#cancel-comment-reply-link {
    color: #ff5f5f !important;
    font-size: 13px !important;
    margin-left: 15px !important;
    text-transform: none !important;
    letter-spacing: 0px !important;
    text-decoration: underline !important;
}

#cancel-comment-reply-link:hover {
    color: #ff3f3f !important;
}

/* 4. Responsive adjustments for comments */
@media (max-width: 768px) {
    .comment-form-inputs {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .comment-list .children {
        margin-left: 20px !important;
        padding-left: 10px !important;
    }
}

/* ==========================================================================
   Page Cards & Page Title Layout Alignment
   ========================================================================== */
.page-card {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    padding: 40px !important;
    margin-bottom: var(--gap) !important;
    position: relative;
}

.page-title {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: var(--accent-color) !important;
    margin-bottom: 25px !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding-bottom: 15px !important;
}

/* ==========================================================================
   Premium Glassmorphism Image Lightbox
   ========================================================================== */
.aituse-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.aituse-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.lightbox-container {
    position: relative;
    z-index: 10;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: #0d0d0d;
}

.aituse-lightbox.active .lightbox-image {
    transform: scale(1);
}

.lightbox-close {
    position: fixed;
    top: 25px;
    right: 35px;
    color: var(--secondary-color);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.3s ease;
    user-select: none;
    z-index: 100;
}

.lightbox-close:hover {
    color: var(--hover-color);
    transform: scale(1.1);
}

.lightbox-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-size: 36px;
    padding: 20px;
    cursor: pointer;
    transition: 0.3s ease;
    user-select: none;
    z-index: 100;
}

.lightbox-arrow:hover {
    color: var(--hover-color);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-caption {
    margin-top: 15px;
    color: var(--primary-color);
    font-size: 14px;
    letter-spacing: 0.5px;
    text-align: center;
    background: rgba(22, 22, 22, 0.9);
    padding: 8px 16px;
    border-radius: 0;
    border: 1px solid var(--border-color);
    max-width: 80%;
    word-break: break-all;
}

.lightbox-counter {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--secondary-color);
    background: rgba(22, 22, 22, 0.9);
    padding: 6px 12px;
    font-size: 12px;
    letter-spacing: 1px;
    border: 1px solid var(--border-color);
    z-index: 100;
}

@media (max-width: 768px) {
    .lightbox-arrow {
        font-size: 28px;
        padding: 10px;
    }
    .lightbox-prev {
        left: 5px;
    }
    .lightbox-next {
        right: 5px;
    }
    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 32px;
    }
}

/* ==========================================================================
   Custom Plyr HTML5 Player Skinning (Zero-Radius & Neon Theme)
   ========================================================================== */
:root {
    --plyr-color-main: var(--hover-color) !important;
    --plyr-video-control-color-hover: #000000 !important;
    --plyr-video-control-background-hover: var(--hover-color) !important;
    --plyr-control-radius: 0px !important;
    --plyr-menu-background: #161616 !important;
    --plyr-menu-color: var(--primary-color) !important;
    --plyr-menu-item-color-hover: #000000 !important;
    --plyr-menu-item-background-hover: var(--hover-color) !important;
    --plyr-tooltip-background: #161616 !important;
    --plyr-tooltip-color: var(--primary-color) !important;
    --plyr-tooltip-radius: 0px !important;
    --plyr-range-thumb-height: 12px !important;
    --plyr-range-track-height: 4px !important;
    --plyr-range-selected-bg: var(--hover-color) !important;
    
    /* 进度条轨道（未播放区域）透明度调整 */
    --plyr-range-track-background: rgba(255, 255, 255, 0.1) !important;
    /* 进度条已缓冲区域透明度调整 */
    --plyr-video-progress-buffered-background: rgba(255, 255, 255, 0.2) !important;
}

/* Ensure no rounded corners anywhere inside Plyr */
.plyr,
.plyr * {
    border-radius: 0px !important;
}

/* Overlaid play button (large play button in the middle) */
.plyr--video .plyr__control--overlaid {
    background: rgba(0, 0, 0, 0.7) !important;
    color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0px !important;
    padding: 16px !important; /* 调整为中等舒适尺寸，精致大气 */
    transform: translate(-50%, -50%) scale(1) !important; /* 严格居中 */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* 调整大播放按钮内部图标的大小 */
.plyr--video .plyr__control--overlaid svg {
    width: 24px !important;
    height: 24px !important;
}

.plyr--video .plyr__control--overlaid:hover {
    background: var(--hover-color) !important;
    color: #000000 !important;
    border-color: var(--hover-color) !important;
    transform: translate(-50%, -50%) scale(1.1) !important; /* 悬浮时微动放大 1.1 倍，高级感拉满 */
}

/* Integrations with theme's Gutenberg & Custom Video layout */
.plyr {
    max-width: 100% !important;
    margin: 0 auto !important;
    aspect-ratio: var(--plyr-video-aspect-ratio, 16/9) !important;
    height: auto !important;
}

/* Ensure the video element inside Plyr scales correctly to fill the player container */
.post-body .wp-block-video .plyr video,
.post-body .wp-video .plyr video,
.plyr video {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    border: none !important;
    margin: 0 !important;
    background: #000 !important;
}

/* Custom Video preview containers (which have explicit ratios e.g. .v-16-9 in post list) */
.video-container .plyr {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
}

/* Gutenberg & Classic Editor page video blocks */
.post-body .wp-block-video,
.wp-block-video,
.wp-video,
.post-body .wp-video {
    margin: 30px auto !important;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    max-height: 75vh !important; /* 限制外盒容器高度与内层播放器完全一致，防溢出留白 */
    min-height: 0 !important;
    background: #000000 !important;
    box-sizing: border-box !important;
}

.post-body .wp-block-video .plyr,
.wp-block-video .plyr,
.wp-video .plyr,
.post-body .wp-video .plyr {
    border: 1px solid var(--border-color) !important;
    max-height: 75vh !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
    background: #000000 !important;
}

.plyr__video-wrapper {
    background: #000 !important;
    padding-bottom: 0 !important;
    aspect-ratio: var(--plyr-video-aspect-ratio, 16/9) !important;
    width: 100% !important;
    height: 100% !important;
}

/* Plyr control bar styling */
.plyr__controls {
    background: rgba(10, 10, 10, 0.25) !important; /* 调至超透 0.25，只保留微弱且清爽的磨砂影迹 */
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important; /* 弱化边框线，减少横线视觉阻断 */
    backdrop-filter: blur(15px) !important; /* 维持 15px 高端毛玻璃模糊度 */
    -webkit-backdrop-filter: blur(15px) !important;
    padding: 8.5px 12px !important; /* 上下各增加 2.5px（共 5px），提供更开阔、舒适的操作空间 */
}

/* 压缩播放器底部控制条内部所有功能按钮的点击内边距，保护中央大播放键不被缩小 */
.plyr__controls .plyr__control {
    padding: 5px !important; 
}

/* 适当放大底部控制按钮内部的 SVG 图标尺寸，保证其虽然紧凑但极易辨认 */
.plyr__controls .plyr__control svg {
    width: 15px !important;
    height: 15px !important;
}

/* 压缩进度条容器的边距，避免上下空隙过大产生笨重感 */
.plyr__progress {
    margin-bottom: 3px !important;
}

/* Text style for current-time and duration */
.plyr__time {
    font-size: 12px !important; /* 微调时间字体大小，显得更精致 */
    font-family: Consolas, Monaco, monospace !important;
    letter-spacing: 0.5px !important;
}

/* Volume range and progress range styling */
.plyr__volume input[type=range],
.plyr__progress input[type=range] {
    color: var(--hover-color) !important;
}

/* Settings menu styling */
.plyr__menu__container {
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
}

/* ==========================================================================
   Media Preservation Protection (Prevents direct downloading & context menu)
   ========================================================================== */
img, video {
    -webkit-touch-callout: none !important; /* 禁用 iOS 系统长按弹出保存图片菜单 */
    -webkit-user-select: none !important;    /* 禁用系统选区保护 */
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}


/* ==========================================================================
   广告位通用安全伪装框 (g-frame) 核心样式体系
   ========================================================================== */
.g-frame {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    padding: 18px 20px !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

#g-slot-top {
    margin-top: 25px !important;
    margin-bottom: 25px !important;
}

#g-slot-bottom {
    margin-top: 0 !important;
    margin-bottom: var(--gap) !important;
}

.g-frame-top {
    background: linear-gradient(135deg, #1f1f1f, #111) !important;
}

/* 自动净化隐藏由于在后台编辑器反复按回车/编辑失误而产生的冗余空段落，保障正文紧凑精美 */
.post-body p:empty,
.post-body p:has(br:only-child) {
    display: none !important;
}

/* ==========================================================================
   广告小工具及内嵌元素底层样式自适应适配 (.g-widget)
   ========================================================================== */
.g-widget {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
}

.g-widget a,
.g-widget img,
.g-widget iframe,
.g-widget ins {
    max-width: 100% !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 0 !important; /* 严格执行全局直角质感，禁止圆角 */
}

/* ==========================================================================
   移动端输入框聚焦防缩放适配 (iOS Safari input focus zoom fix)
   ========================================================================== */
@media (max-width: 768px) {
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="url"],
    textarea,
    select,
    .comment-form textarea,
    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .search-widget input {
        font-size: 16px !important;
    }
}

/* ==========================================================================
   Plyr Mobile Control Layout Customization (Force Duration Display)
   ========================================================================== */
@media (max-width: 768px) {
    /* 强制在移动端也显示视频总时长与时间分隔符，彻底解决移动端误以为是 00:00 无法播放的问题 */
    .plyr__controls .plyr__time--duration {
        display: inline-block !important;
    }
}

/* ==========================================================================
   文章正文内链接美化与科技感按钮样式
   ========================================================================== */

/* 1. 文本普通内嵌链接 (自动生效，排除了图片包裹的链接) */
.post-body a:not(:has(img)) {
    color: var(--hover-color, #cbf568) !important;
    border-bottom: 1px dashed rgba(203, 245, 104, 0.4);
    padding-bottom: 1px;
    font-weight: 500;
    transition: all 0.25s ease;
    margin: 0 4px; /* 增加左右间距，使行内链接在中文文本中更有呼吸感 */
}

.post-body a:not(:has(img)):hover {
    color: #ffffff !important;
    border-bottom: 1px solid var(--hover-color, #cbf568);
    background: rgba(203, 245, 104, 0.08); /* 悬浮时微弱的霓虹背景微光 */
    padding-left: 4px;
    padding-right: 4px;
    margin-left: 0; /* 悬浮时利用 padding 撑开，margin 设为 0，保持总占位 4px 不变，防止文字抖动 */
    margin-right: 0;
}

/* 2. 科技感高亮按钮链接样式 (手动添加 class="post-btn" 使用，如“点击下载”等按钮) */
.post-body a.post-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    color: var(--hover-color, #cbf568) !important;
    border: 1px solid var(--hover-color, #cbf568) !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    margin: 6px 12px 6px 0 !important; /* 优化间距：右边保留 12px 间距，左边对齐，防止多个按钮挤在一起 */
    cursor: pointer;
    border-bottom: 1px solid var(--hover-color, #cbf568) !important; /* 覆盖常规链接的 border-bottom */
}

.post-body a.post-btn:hover {
    background: var(--hover-color, #cbf568) !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(203, 245, 104, 0.4) !important; /* 霓虹发光效果 */
    transform: translateY(-2px) !important; /* 轻微上浮 */
    padding-left: 24px !important; /* 覆盖常规链接的 hover 干扰 */
    padding-right: 24px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 3. 滑线动画链接 (在文章编辑器中手动添加 class="post-link-slide" 使用) */
.post-body a.post-link-slide {
    position: relative;
    color: var(--hover-color, #cbf568) !important;
    text-decoration: none !important;
    font-weight: 500;
    border-bottom: none !important; /* 取消常规虚线下划线 */
    padding-bottom: 2px;
    display: inline-block;
    transition: color 0.25s ease;
    margin: 0 4px; /* 增加左右间距，使行内链接在中文文本中更有呼吸感 */
}

.post-body a.post-link-slide::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1.5px;
    bottom: 0;
    left: 0;
    background-color: var(--hover-color, #cbf568);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}

.post-body a.post-link-slide:hover {
    color: #ffffff !important;
}

.post-body a.post-link-slide:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* 4. 卡片式下载/链接面板 (在文章编辑器中手动创建结构或添加 class="post-link-card" 使用，非常适合单页面中的重要资源推荐) */
.post-body .post-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid var(--border-color, #262626) !important;
    padding: 18px 24px !important;
    margin: 25px 0 !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
    color: inherit !important;
}

.post-body .post-link-card:hover {
    border-color: var(--hover-color, #cbf568) !important;
    box-shadow: 0 0 20px rgba(203, 245, 104, 0.1) !important;
    transform: translateY(-2px);
    background: rgba(203, 245, 104, 0.02) !important;
}

.post-link-card .card-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.post-link-card .card-icon {
    width: 42px;
    height: 42px;
    background: rgba(203, 245, 104, 0.08);
    color: var(--hover-color, #cbf568);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.post-link-card .card-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.post-link-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-link-card .card-desc {
    font-size: 13px;
    color: var(--secondary-color, #999999);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-link-card .card-btn {
    background: var(--hover-color, #cbf568) !important;
    color: #000000 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 8px 18px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    border: none !important;
    flex-shrink: 0;
    margin-left: 15px;
}

.post-link-card:hover .card-btn {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
}

@media (max-width: 576px) {
    .post-body .post-link-card {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 16px !important;
    }
    .post-link-card .card-btn {
        margin-left: 0;
        text-align: center;
    }
}

/* 5. 科技感按钮修饰类 (配合 .post-btn 使用，使用 CSS 遮罩自动生成图标，彻底避免编辑器过滤 SVG) */
.post-body a.post-btn.btn-download::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: middle;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3'/></svg>") no-repeat center / contain;
}

.post-body a.post-btn.btn-link::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: middle;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14L21 3'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14L21 3'/></svg>") no-repeat center / contain;
}

.post-body a.post-btn.btn-play::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: middle;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='5 3 19 12 5 21 5 3'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='5 3 19 12 5 21 5 3'/></svg>") no-repeat center / contain;
}









