/*
Theme Name: TechBox
Author: devboxs
Author URI: https://devboxs.com
Description: TechBox WordPress theme
Version: 1.1
*/

/* ==========================================================================
   1. Design Tokens (设计变量系统)
   ========================================================================== */
:root {
    /* --- 品牌色 (Brand Colors) --- */
    /* 核心蓝色：保持 Zenn 原色，活力且科技感强 */
    --color-primary: #3ea8ff;
    /* 悬停蓝色：比原色稍深，用于 hover 状态 */
    --color-primary-hover: #3390dd;
    /* 浅蓝背景：用于标签、选中态背景 (Opacity 10% of primary) */
    --color-primary-light: #eaf6ff;

    /* --- 功能色 (Semantic Colors) --- */
    /* 成功 (Green): 用于 "代码复制成功" 或 "解决了" */
    --color-success: #34c759;
    /* 警告 (Yellow/Orange): 用于 "注意" 提示框 */
    --color-warning: #ffcc00;
    /* 错误 (Red): 用于 "Bug" 或 "报错" */
    --color-danger: #ff3b30;
    /* 信息 (Gray/Blue): 用于引用块 */
    --color-info: #8e8e93;

    /* --- 亮色模式 (Light Mode - 默认) --- */

    /* 背景色 */
    --bg-body: #f4f6f8;
    /* 网页大背景 (你原来的 --zenn-bg) */
    --bg-card: #ffffff;
    /* 卡片/文章背景 */
    --bg-input: #f9fafb;
    /* 输入框背景 */
    --bg-code: #282c34;
    /* 代码块背景 (通常深色更好读) */
    --bg-selection: #b3d4fc;
    /* 鼠标选中文本的背景色 */

    /* 文字颜色 (Hierarchy) */
    --text-main: #333333;
    /* 正文/主要文字 */
    --text-title: #000000;
    /* 标题/强调文字 */
    --text-sub: #65717b;
    /* 次要文字/日期/作者 */
    --text-placeholder: #a1a1aa;
    /* 占位符/失效文字 */
    --text-white: #ffffff;
    /* 反白文字 (用于按钮/深色背景) */

    /* 边框与分割线 */
    --border-color: #e0e0e0;
    /* 常规边框 */
    --border-light: #f0f0f0;
    /* 浅分割线 */

    /* 阴影系统 (让卡片更有质感) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   2. Reset & Normalize (基础重置)
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
figure,
figcaption,
blockquote,
dl,
dd,
a {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    text-rendering: optimizeSpeed;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background-color: #f4f6f8;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

input,
button,
textarea,
select {
    font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
}

/* ==========================================================================
   3. Global Layout (全局布局)
   ========================================================================== */
.container,
.site-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.site-main {
    padding-bottom: 60px;
    display: flex;
    flex-direction: column;
}

/* 文章详情分栏布局 */
.special-article {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

/* 文章列表 Grid 布局 (首页) */
.post-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ==========================================================================
   4. Header & Navigation (头部与导航)
   ========================================================================== */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 30px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.site-branding .site-title {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    display: flex;
    align-items: center;
}

/* 头部右侧动作区 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.icon-button:hover {
    background-color: #f5f5f5;
}

.login-button {
    background-color: var(--color-primary-hover);
    color: #fff !important;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: bold;
    font-size: 14px;
    transition: opacity 0.2s;
}

.login-button:hover {
    opacity: 0.9;
}

/* 导航菜单 */
.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    display: block;
    padding: 0 0 12px 0;
    font-weight: 500;
    color: #666;
    font-size: 15px;
    border-bottom: 2px solid transparent;
}

.main-navigation .current-menu-item a,
.main-navigation a:hover {
    color: #000;
    border-bottom-color: var(--zenn-blue);
}

/* 菜单的子菜单
 */
.menu-item {
    position: relative;
}

.menu-item .sub-menu {
    /* display: none; */
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    padding: 10px 0;
    z-index: 1000;
}

.menu-item .sub-menu li {
    padding: 0 20px;
}

.menu-item .sub-menu li a {
    padding: 0;
}

/* ==========================================================================
   5. Components: Cards & Posts (卡片与文章)
   ========================================================================== */
.zenn-card {
    background: #fff;
    border-radius: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
    height: 100%;
}

.zenn-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-link-wrapper {
    display: flex;
    padding: 24px;
    align-items: flex-start;
    gap: 16px;
    height: 100%;
    box-sizing: border-box;
}

.card-icon-area {
    flex-shrink: 0;
}

.card-thumbnail,
.default-emoji {
    width: 135px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.card-content-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.entry-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.5;
    color: #222;
}

.entry-meta {
    font-size: 13px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar img {
    border-radius: 50%;
    vertical-align: middle;
}

.post-likes {
    margin-left: auto;
    font-size: 12px;
}

/* ==========================================================================
   6. Templates: Single Post & Page (详情页模板)
   ========================================================================== */
/* 通用内容排版 */
.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2 {
    font-size: 1.5em;
    margin: 1.1rem 0;
    padding-bottom: .3em;
    font-weight: bold;
    border-bottom: var(--bg-selection) 1px solid;
}

.entry-content h3 {
    font-size: 1.3em;
    margin: 1.1rem 0;
    font-weight: bold;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.entry-footer {
    margin: 0;
}

/* --- 文章详情 (Single) --- */
body.single .site-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* 大型标题 */
.article-title {
    text-align: center;
    margin: 3.5rem 0;
}

.article-title h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-title);
}

.article-title .article-meta {
    font-size: 0.875rem;
    color: var(--text-sub);
    letter-spacing: 0.07rem;
    margin-top: 0.5rem;
}

.entry-single {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
}

/* 页面标签 */
.entry-tags {
    margin-bottom: 20px;
}

.entry-tags ul {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.entry-tags ul li {
    background: var(--bg-body);
    color: var(--text-sub);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid transparent;
}

.entry-tags ul li:hover {
    background: var(--bg-body);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.entry-description {
    font-size: 16px;
    color: var(--text-sub) !important;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* --- 页面详情 (Page) --- */
.page-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    margin: 0 auto;
    max-width: 900px;
}

.page-header .entry-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    color: #222;
}

/**
page页面导航navigation post-navigation
**/


.navigation {
    /* width: 100%;
    margin-top: 40px;
    display: flex;
    justify-content: center; */
    margin: 40px 0;
    text-align: center;
    width: 100%;
}

.navigation .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    /* 按钮之间的间距 */
    flex-wrap: wrap;
}

.navigation.pagination h2.screen-reader-text {
    display: none;
}

.navigation .nav-links a,
.navigation .nav-links span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    /* 保证正方形或宽矩形 */
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    /* 圆角矩形 */
    background: #fff;
    border: 1px solid var(--border-color);
    /* 浅灰边框 */
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 4. 悬停效果 (Hover) */
.navigation .nav-links a:hover {
    color: var(--color-primary);
    /* 变蓝 */
    border-color: var(--color-primary);
    background-color: #f0f9ff;
    /* 极浅的蓝色背景 */
}

/* 5. 当前页码 (Current) */
.navigation .nav-links span.current {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    cursor: default;
    /* 当前页不可点击 */
    box-shadow: 0 2px 6px rgba(62, 168, 255, 0.3);
    /* 加一点发光阴影 */
}

/* 6. 省略号 (...) */
.navigation .nav-links span.dots {
    border: none;
    box-shadow: none;
    background: transparent;
    color: #999;
}

/* 7. 上一页/下一页 特殊处理 */
.navigation .nav-links a.prev,
.navigation .nav-links a.next {
    font-weight: bold;
    padding: 0 16px;
    /* 稍微宽一点 */
}

/* ==========================================================================
   7. Comments (评论区域)
   ========================================================================== */
.comments-area {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
}

.comments-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 24px;
    color: #222;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.comment-list {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.comment-list li.comment {
    position: relative;
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-body {
    position: relative;
    padding-left: 70px;
}

.comment-body .avatar {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}

.comment-meta {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.comment-author {
    font-weight: bold;
    font-size: 15px;
    color: #333;
    font-style: normal;
}

.comment-author .says {
    display: none;
}

.comment-metadata a {
    color: #999;
    font-size: 13px;
}

.comment-metadata a:hover {
    color: #3ea8ff;
}

.comment-content {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin-bottom: 12px;
}

.comment-content p {
    margin: 0 0 10px 0;
}

.reply {
    text-align: right;
}

.reply a.comment-reply-link {
    display: inline-block;
    font-size: 12px;
    color: #555;
    border: 1px solid #ddd;
    padding: 4px 12px;
    border-radius: 15px;
    transition: all 0.2s;
}

.reply a.comment-reply-link:hover {
    border-color: #3ea8ff;
    color: #3ea8ff;
    background: #fff;
}

.comment-list .children {
    list-style: none;
    margin: 20px 0 0 20px;
    padding-left: 20px;
    border-left: 2px solid #f0f0f0;
}


.comment-form-comment textarea,
.comment-form-author input,
.comment-form-email input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    background: #fff;
    margin-bottom: 15px;
}

.comment-form-comment textarea:focus,
.comment-form-author input:focus {
    border-color: #3ea8ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(62, 168, 255, 0.1);
}

.zenn-submit-btn {
    background-color: #3ea8ff;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    float: right;
}

.zenn-submit-btn:hover {
    background-color: #3390dd;
}

.form-submit::after {
    content: "";
    display: table;
    clear: both;
}

.logged-in-as,
.comment-notes {
    margin-bottom: 15px;
    font-size: 13px;
    color: #888;
}

.comment-notes {
    display: none;
}

/* search area */
/* Search Results Page (搜索结果页) */
.search-header {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.search-header .page-title {
    font-size: 1em;
    font-weight: 700;
    color: var(--text-title);
    margin-bottom: 10px;
}

.search-query-highlight {
    color: var(--color-primary);
    /* 关键词高亮显示蓝色 */
    font-style: italic;
}

.search-result-count {
    color: var(--text-sub);
    font-size: 14px;
}

/* ==========================================================================
   Universal Search Form (通用搜索框 searchform.php)
   * 用于 404 页面、无结果页面、侧边栏等所有 get_search_form() 的地方
   ========================================================================== */
.techbox-search-form {
    width: 100%;
    max-width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* 输入框样式 (复刻 Zenn 风格) */
.techbox-search-form .search-field {
    width: 100%;
    background-color: var(--bg-input);
    /* 浅灰背景 */
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 12px 12px 42px;
    /* 左侧留出图标位置 */
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s;
    height: 48px;
}

.techbox-search-form .search-field:focus {
    background-color: var(--bg-card);
    /* 聚焦变白 */
    border-color: var(--color-primary);
    /* 蓝框 */
    box-shadow: 0 0 0 3px rgba(62, 168, 255, 0.15);
}

/* 搜索图标定位 */
.techbox-search-form .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    /* 让鼠标穿透图标点到输入框 */
    display: flex;
}

/* 隐藏默认提交按钮 (很多现代设计只用回车搜索) */
.techbox-search-form .search-submit {
    display: none;
}

/*comments area*/

/* 1. 顶部插画与标题 */
.techbox-comment-area {
    background: #fff;
    /* 整体背景 */
    padding-bottom: 40px;
}

/* 评论输入表单 */
.comment-respond {
    background-color: #fff;
}

.techbox-comment-header {
    text-align: center;
    margin-bottom: 40px;
}

.techbox-comment-header .comment-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.techbox-comment-header .discussion-hero svg,
.techbox-comment-header .discussion-hero img {
    max-width: 100%;
    height: auto;
    /* 如果你有具体的插画图片，用 img 标签替换 svg 即可 */
}

.techbox-comments-count {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2em;
    color: var(--text-sub);
}

/* 2. 编辑器整体外壳 */
.techbox-editor-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    /* 上方圆角 */
    background: #fff;
    overflow: hidden;
}

/* 3. Tab 栏 (Markdown / Preview) */
.techbox-editor-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f4f6f8;
    /* 浅灰背景 */
    padding: 8px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.techbox-tab-left {
    display: flex;
    gap: 4px;
}

.techbox-tab {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: bold;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.techbox-tab.active {
    background-color: #eaf6ff;
    /* 激活态浅蓝背景 */
    color: #3ea8ff;
    /* 激活态蓝色文字 */
}

.techbox-tab:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.05);
}

.markdown-guide-link {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

.markdown-guide-link:hover {
    color: #3ea8ff;
}

/* 4. 主体区域 (头像 + 文本框) */
.techbox-editor-body {
    display: flex;
    padding: 20px;
    gap: 16px;
}

.techbox-editor-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #eee;
}

.techbox-editor-textarea {
    flex-grow: 1;
}

.techbox-editor-textarea textarea {
    width: 100%;
    border: none;
    resize: vertical;
    outline: none;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    padding: 0;
    min-height: 120px;
    background: transparent;
    box-shadow: none !important;
    /* 去掉之前全局定义的输入框阴影 */
}

.techbox-editor-textarea textarea::placeholder {
    color: #a1a1aa;
}

/* 5. 底部工具栏 (Footer) */
.techbox-editor-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 0;
    background-color: #fff;
}

.techbox-footer-tools .tool-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.2s;
}

.techbox-footer-tools .tool-btn:hover {
    color: #3ea8ff;
    background-color: #f4f6f8;
}

/* 提交按钮 */
.techbox-submit-btn {
    background-color: #3ea8ff;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 24px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.techbox-submit-btn:hover {
    background-color: #3390dd;
}

.guest-comment-area {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(3, 33.33%);
    grid-row-gap: 30px;
    grid-column-gap: 30px;
}

.guest-comment-area input {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    background: #fff;
    margin-bottom: 15px;
}

/* 响应式适配 */
@media (max-width: 600px) {
    .zenn-editor-body {
        padding: 15px;
    }

    .zenn-editor-avatar {
        display: none;
        /* 手机端为了节省空间，通常隐藏左侧头像 */
    }
}

/* ==========================================================================
   8. Sidebar & Widgets (侧边栏与小工具)
   ========================================================================== */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 通用小工具卡片 */
.widget {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5f5f5;
    letter-spacing: 0.05em;
}

/* 通用列表 */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    border-bottom: 1px dashed #eee;
    font-size: 14px;
    line-height: 2rem;
    color: #666;
}

.widget ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget a {
    color: #555;
    transition: color 0.2s;
}

.widget a:hover {
    color: #3ea8ff;
}

/* --- 搜索框美化 --- */
.widget_block.widget_search {
    overflow: hidden;
    position: -webkit-sticky;
    position: sticky;
    z-index: 10;
    transition: top 0.2s ease;
}

.wp-block-search__inside-wrapper,
.widget_search .search-form {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
}

.wp-block-search__label,
.screen-reader-text {
    display: none;
}

.wp-block-search__input,
.widget_search .search-field {
    flex-grow: 1;
    width: 100%;
    height: 42px;
    padding: 0 15px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    outline: none;
    margin-right: 0 !important;
    transition: all 0.2s ease;
}

.wp-block-search__input:focus,
.widget_search .search-field:focus {
    background: #fff;
    border-color: #3ea8ff;
    box-shadow: 0 0 0 3px rgba(62, 168, 255, 0.15);
}

.wp-block-search__button,
.widget_search .search-submit {
    height: 42px;
    padding: 0 20px;
    background-color: #3ea8ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 0 !important;
    transition: background-color 0.2s ease;
}

.wp-block-search__button:hover,
.widget_search .search-submit:hover {
    background-color: #3390dd;
}

.wp-block-search__button svg {
    fill: #fff;
    width: 20px;
    height: 20px;
}


/* --- 自定义小工具: Zenn Recent Posts --- */
.widget_techbox_zenn_recent_posts {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    position: -webkit-sticky;
    position: sticky;
    z-index: 9;
}

.widget_zenn_recent_posts_widget .widget-title {
    font-size: 14px;
    color: #6c757d;
    border: none;
    margin-bottom: 15px;
    padding-left: 5px;
}

.zenn-widget-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.zenn-widget-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: opacity 0.2s;
}

.zenn-widget-item:hover {
    opacity: 0.8;
}

.zenn-widget-icon {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.zenn-widget-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zenn-widget-icon svg {
    width: 32px;
    height: 32px;
}

.zenn-widget-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 4px;
}

.zenn-widget-post-title {
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    margin: 0;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 标签云 (Tag Cloud) --- */
.tagcloud a {
    display: inline-block;
    background: #f4f6f8;
    color: #666;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px !important;
    margin: 0 6px 8px 0;
    border: 1px solid transparent;
}

.tagcloud a:hover {
    background: #fff;
    border-color: #3ea8ff;
    color: #3ea8ff;
}


/* ==========================================================================
   9. Footer (页脚)
   ========================================================================== */
.site-footer {
    background-color: #f9f9f9;
    padding: 40px 0;
    text-align: center;
    color: #888;
    font-size: 13px;
    border-top: 1px solid #eaeaea;
}

/* 搜索无内容样式 */
.no-results .page-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-main);
}

.not-found-hero svg {
    margin: 0 auto;
    /* 让 SVG 居中 */
}

/* 搜索框 */
.no-results .search-form-container {
    text-align: center;
}

.no-results .search-form-container .search-form {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
    line-height: 1.5;
}

.no-results .search-form-container .search-form .search-field,
.no-results .search-form-container .search-form .search-submit {
    height: 40px;
    padding: 0 1em;
    border: var(--border-color) 1px solid;
    border-radius: 5px;
    font-size: 1em;
}

.no-results .search-form-container .search-form .search-field {
    width: 400px;
}

.no-results .search-form-container .search-form .search-field:hover,
.no-results .search-form-container .search-form .search-field:focus {
    border: var(--color-primary-hover) 1px solid;
}

.no-results .search-form-container .search-form .search-submit {
    max-width: 120px;
    width: 100px;
    border: none;
    color: var(--text-white);
    background: var(--color-primary);
    border-radius: 5px;
}

.no-results .search-form-container .search-form .search-submit:hover {
    background: var(--color-primary-hover);
    cursor: pointer;
}

/* ==========================================================================
   10. Responsive Media Queries (响应式整合)
   * 所有的屏幕适配代码都集中在这里，方便维护
   ========================================================================== */

/* --- 桌面端大屏适配 (Min Width: 960px) --- */
@media (min-width: 960px) {

    /* 文章详情页：开启双栏布局 (内容 + 侧边栏) */
    body.single .site-main {
        gap: 40px;
        /* 注意：由于使用了JS做侧边栏吸附，这里 grid-template-columns 可能由JS或具体页面结构接管 */
    }
}

@media(max-width:960px) {
    .special-article {
        display: block;
        /* 取消 grid */
    }

    /* 侧边栏位置不显示 */
    .widget-area {
        display: none;
    }
}

/* --- 平板/手机端适配 (Max Width: 768px) --- */
@media (max-width: 768px) {

    /* 1. 首页列表变单列 */
    .post-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* 4. 首页卡片微调 */
    .card-link-wrapper {
        padding: 16px;
    }

    .card-thumbnail,
    .default-emoji {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .entry-title {
        font-size: 16px;
    }

    /* 5. 文章/页面详情页内边距减小 */
    .entry-single,
    .page-wrapper {
        padding: 20px;
    }

    .entry-single .entry-title,
    .page-header .entry-title {
        font-size: 24px;
    }
}

/* --- 小屏手机适配 (Max Width: 600px) --- */
@media (max-width: 600px) {

    /* 1. 头部元素缩小 */
    .site-branding .site-title {
        font-size: 20px;
    }

    .header-actions {
        gap: 8px;
    }

    .login-button {
        padding: 6px 14px;
        font-size: 13px;
    }

    /* 2. 导航横向滚动 */
    .main-navigation ul {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .main-navigation ul::-webkit-scrollbar {
        display: none;
    }

    /* 3. 评论区微调 */
    .comments-area {
        padding: 20px;
    }

    .comment-body .avatar {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================================================
   Code Highlighting (Zenn Style Override)
   ========================================================================== */

/* 1. 代码块容器 */
/* 古腾堡默认的类是 .wp-block-code，Prism 会加 class="language-xxx" */
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
    background-color: #1e252b;
    /* Zenn 深色背景 */
    color: #adbac7;
    /* 浅灰文字 */
    border-radius: 8px;
    /* 圆角 */
    border: none;
    /* 去掉默认边框 */
    margin: 1.5em 0;
    /* 上下间距 */
    padding: 1.5em;
    /* 内边距 */
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
    /* 字体稍小 */
    line-height: 1.6;
    text-shadow: none;
    /* 去掉文字阴影，看起来更扁平 */
}

/* 2. 行号样式优化 */
pre[class*="language-"].line-numbers {
    padding-left: 3.8em;
    /* 给行号留位置 */
}

.line-numbers .line-numbers-rows {
    border-right: 1px solid #364050;
    /* 行号分割线 */
}

/* 3. 复制按钮美化 */
div.code-toolbar>.toolbar {
    opacity: 1;
    /* 始终显示，或者设为 0 hover 时显示 */
    top: 10px;
    right: 10px;
}

div.code-toolbar>.toolbar>.toolbar-item>button {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    transition: background 0.2s;
    box-shadow: none;
}

div.code-toolbar>.toolbar>.toolbar-item>button:hover {
    background: var(--color-primary);
    /* 悬停变蓝 */
    color: #fff;
}

/* 4. 滚动条美化 (Webkit) */
pre[class*="language-"]::-webkit-scrollbar {
    height: 8px;
}

pre[class*="language-"]::-webkit-scrollbar-thumb {
    background-color: #444c56;
    border-radius: 4px;
}

/* ==========================================================================
   Code Block Pro - 布局修复 (滚动条模式)
   ========================================================================== */

/* 1. 限制容器宽度并允许滚动 */
.entry-content pre code {
    white-space: pre-line !important;
    /* 保持空格和换行 */
}

/* ==========================================================================
   About Page Template (关于页专属样式)
   ========================================================================== */

.about-wrapper {
    /* 复用之前的 page-wrapper 样式，但做一些微调 */
    max-width: 800px;
    /* 稍微窄一点，利于阅读 */
    margin: 40px auto;
    padding: 60px 40px;
    text-align: left;
    /* 默认左对齐，但在 Hero 区域居中 */
}

/* 1. Hero 区域 (头像+简介) */
.about-hero {
    text-align: center;
    margin-bottom: 40px;
}

.about-avatar img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border: 4px solid #fff;
    /* 白边 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    /* 浮起投影 */
}

.about-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-title);
}

.about-subtitle {
    font-size: 16px;
    color: var(--text-sub);
    margin-bottom: 25px;
}

/* 社交按钮 */
.about-social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.social-btn.github {
    background: #24292e;
    color: #fff;
}

.social-btn.email {
    background: #f0f5fa;
    color: var(--color-primary);
}

.social-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* 分割线 */
.zenn-divider {
    border: 0;
    height: 1px;
    background: var(--border-light);
    margin: 40px 0;
}

/* 2. 技术栈胶囊 */
.about-tech-stack h3 {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    margin-top: 40px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tech-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    background: #f4f6f8;
    color: #555;
    border: 1px solid transparent;
}

/* 给不同技术加点微弱的品牌色背景 */
.tech-tag.php {
    background: #efeaf4;
    color: #777bb4;
}

.tech-tag.wp {
    background: #ecf6fb;
    color: #21759b;
}

.tech-tag.js {
    background: #fbf5e1;
    color: #bda026;
}

.tech-tag.react {
    background: #eaf8fc;
    color: #00d8ff;
}

/* 手机适配 */
@media (max-width: 600px) {
    .about-wrapper {
        padding: 30px 20px;
    }

    .about-title {
        font-size: 24px;
    }
}