:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-color: #d97706;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-accent: #e2e8f0;
    --border-light: #d1d5db;
    --border-color: #e5e7eb;
    --accent: #2563eb;
    --header-bg: #f8fafccc;
    --theme-btn-hover-bg: #1118270f;
    --theme-btn-active-bg: #2563eb24;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.04);
    --shadow-md: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.04);
    --radius: 8px;
    --layout-container-max: 1000px;
    --layout-container-pad: 15px;
    --layout-column-gap: 10px;
    --layout-page-padding: 15px;
    --layout-post-padding: 32px;
    --layout-widget-padding: 16px;
}

:root[data-theme='light'] {
    color-scheme: light;
}

:root[data-theme='dark'] {
    color-scheme: dark;
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-accent: #334155;
    --border-light: #475569;
    --border-color: #334155;
    --accent: #60a5fa;
    --header-bg: #0f172ad6;
    --theme-btn-hover-bg: #94a3b81f;
    --theme-btn-active-bg: #60a5fa33;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 1px 3px 0 rgb(0 0 0 / 0.35);
}


body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    background-attachment: fixed;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    padding: 0 0 var(--layout-page-padding);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* 代码样式优化 — Catppuccin Mocha 风格 */
pre,
code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: .92857em;
    border-radius: var(--radius);
}

code {
    padding: 3px 6px;
    color: #e53e3e;
    font-weight: 500;
}

pre {
    padding: 16px;
    overflow: auto;
    max-height: 400px;
    border: 1px solid #313244;
    background: #1e1e2e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

pre code {
    padding: 0;
    color: #cdd6f4;
    background: transparent;
}

:root[data-theme='dark'] pre {
    background: #0d1117;
    border-color: #21262d;
}

blockquote {
    margin: 1.5em 0;
    padding: 16px 24px;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-accent);
    color: var(--text-secondary);
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* 表格美化 */
table {
    border: none;
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--bg-primary);
}

table th,
table td {
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid var(--border-light);
}

table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

table tbody tr:hover {
    background: var(--bg-accent);
}

h1,
h2,
h3 {
    color: var(--text-primary);
    font-weight: 700;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* 表单现代化 */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
    padding: 10px 14px;
    border: 2px solid var(--border-light);
    width: 100%;
    border-radius: var(--radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-primary);
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea {
    resize: vertical;
}

/* 特殊链接样式保持原有逻辑 */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
    border-bottom: 1px solid var(--border-light);
    transition: border-bottom-color 0.2s ease;
}

.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
    border-bottom-color: var(--primary-color);
}


/* ========== 品牌区 (logo + title + subtitle) ========== */
.site-brand {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.site-brand-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    border-bottom: none !important;
}

.site-logo {
    height: 38px;
    width: auto;
    display: block;
}

.site-title-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    letter-spacing: -0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.site-title-name a {
    color: var(--text-primary, #0f172a);
    text-decoration: none;
    border-bottom: none !important;
}

.site-title-name a:hover {
    color: var(--accent, #2563eb);
}

.site-subtitle {
    font-size: 14px;
    color: var(--text-muted, #8a94a6);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* ========== 导航栏 ========== */
#header.site-nav-wrap {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    margin-bottom: var(--layout-page-padding);
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
}

.site-nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-nav {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    white-space: nowrap;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 44px;
    font-size: 15px;
    color: var(--text-secondary, #64748b);
    text-decoration: none;
    border-bottom: none !important;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.site-nav a:hover {
    color: var(--accent, #2563eb);
}

.site-nav a.active {
    color: var(--accent, #2563eb);
    font-weight: 600;
}

.site-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--accent, #2563eb);
}

.nav-theme {
    margin-left: 12px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.theme-mode-cycle {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted, #64748b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    opacity: 0.78;
}

.theme-mode-cycle:hover {
    background: var(--theme-btn-hover-bg);
    color: var(--text-secondary);
    opacity: 1;
}

.theme-mode-cycle[data-theme-mode='light'],
.theme-mode-cycle[data-theme-mode='dark'],
.theme-mode-cycle[data-theme-mode='auto'] {
    color: var(--text-secondary);
    background: transparent;
}

.theme-mode-cycle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

#logo {
    color: var(--text-primary);
    font-size: 2.5em;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#logo img {
    max-height: 64px;
    border-radius: var(--radius);
}

.description {
    margin: .5em 0 0;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.1em;
}

/* 移动端菜单按钮基础样式 */
.mobile-menu-toggle {
    display: none !important;
    background: transparent !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    padding: 8px !important;
    margin: 0 !important;
    cursor: pointer !important;
    position: relative !important;
    border-radius: 50% !important;
    transition: background-color 0.3s !important;
}

.mobile-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.mobile-menu-toggle .hamburger,
.mobile-menu-toggle .hamburger:before,
.mobile-menu-toggle .hamburger:after {
    display: block !important;
    width: 20px !important;
    height: 2px !important;
    background: #666 !important;
    position: absolute !important;
    left: 10px !important;
    transition: all 0.3s ease-in-out !important;
    border-radius: 2px !important;
}

.mobile-menu-toggle .hamburger {
    top: 19px !important;
}

.mobile-menu-toggle .hamburger:before {
    content: '' !important;
    top: -6px !important;
}

.mobile-menu-toggle .hamburger:after {
    content: '' !important;
    bottom: -6px !important;
}

/* 导航菜单 */
/* Search 现代化 */
#search {
    position: relative;
    margin-top: 15px;
}

#search input {
    padding-right: 60px;
    background: var(--bg-primary);
}

#search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    padding: 8px 12px;
    width: auto;
    min-width: 44px;
    height: 32px;
    background: var(--primary-color);
    border-radius: var(--radius);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 12px;
    white-space: nowrap;
    line-height: 1;
}

#search button:hover {
    background: var(--primary-hover);
}


.post {
    padding: 18px 0 22px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-primary);
    margin: 8px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 22px 24px;
    border-bottom: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.post-title {
    margin: 0 0 10px;
    font-size: 1.2em;
    font-weight: 700;
}

.post-title a {
    color: var(--text-primary);
}

.post-meta {
    margin-top: 0;
    padding: 0;
    color: var(--text-muted);
    font-size: .92857em;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-meta li {
    display: inline-block;
    margin: 0;
    padding: 3px 9px;
    background: var(--bg-accent);
    border-radius: 20px;
    border: none;
    font-size: 0.82em;
    color: var(--text-primary);
}

.post-meta li:first-child {
    margin-left: 0;
    padding-left: 9px;
}

.post-content {
    line-height: 1.62;
    margin-top: 0.85em;
}

.post .tags {
    clear: both;
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags a {
    background: var(--bg-accent);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85em;
    border-bottom: none !important;
    transition: all 0.2s ease;
}

.tags a:hover {
    background: var(--primary-color);
    color: white;
}

/* 归档标题 */
.archive-title {
    margin: 1em 0 -1em;
    padding: 20px 24px;
    color: var(--text-secondary);
    font-size: 1em;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-weight: 600;
}

.more {
    text-align: center;
    margin: 12px 0 0;
}

.more a {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.more a:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Page nav 现代化 */
.page-navigator {
    list-style: none;
    margin: 30px 0;
    padding: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    font-size: 12px;
}

.page-navigator li {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.page-navigator a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    transition: all 0.2s ease;
    border-bottom: none !important;
    color: var(--text-secondary);
    font-weight: 500;
}

.page-navigator a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-navigator .current a {
    color: white;
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.page-navigator .disabled span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: not-allowed;
}

.page-navigator .ellipsis span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.page-navigator .goto-box {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 0 8px;
    height: 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
}

.page-navigator .goto-box input {
    width: 36px;
    height: 18px;
    padding: 0 4px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
    outline: none;
    background: var(--bg-secondary);
}

.page-navigator .goto-box input:focus {
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}


#comments {
    padding-top: 15px;
}

.comment-list,
.comment-list ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list li {
    padding: 20px;
    margin-top: 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.comment-list li:hover {
    box-shadow: var(--shadow-md);
}

.comment-list li.comment-level-odd {
    background: var(--bg-primary);
}

.comment-list li.comment-level-even {
    background: var(--bg-secondary);
}

.comment-list li.comment-by-author {
    background: #e0f2fe;
    border-color: var(--primary-color);
}

.comment-author {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.comment-author .avatar {
    float: left;
    margin-right: 12px;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}


#secondary {
    padding-top: 15px;
    word-wrap: break-word;
}

.widget {
    margin-bottom: 12px;
    background: var(--bg-primary);
    padding: var(--layout-widget-padding);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.widget h3 {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.1em;
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li {
    margin: 4px 0;
    line-height: 1.4;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.92em;
}

.widget-list li:hover {
    background: var(--bg-accent);
    color: var(--text-primary);
    border-radius: 6px;
    margin: 4px 0;
    box-shadow: var(--shadow-sm);
}

.widget-list li:hover a {
    color: var(--primary-color);
}

.widget-list li:last-child {
    border-bottom: none;
}

.home-latest-collapsed .widget-title {
    margin-bottom: 8px;
}

.latest-summary {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.latest-collapsed-list {
    max-height: 0;
    overflow: hidden;
    margin-top: 0;
    opacity: 0;
}

.home-latest-collapsed:hover .latest-collapsed-list,
.home-latest-collapsed:focus-within .latest-collapsed-list {
    max-height: 220px;
    margin-top: 8px;
    opacity: 1;
    transition: max-height 0.2s ease, opacity 0.2s ease;
}

.comment-icon {
    display: inline-block;
    font-size: 0.95em;
    line-height: 1;
    margin-right: 2px;
}

.widget-list li ul {
    margin-left: 15px;
}

.widget-random-posts .widget-list a {
    color: var(--text-primary);
    border-bottom: none;
}

.widget-random-posts .widget-list a:hover {
    color: var(--primary-color);
    border-bottom: none;
}

#footer {
    padding: 3em 0;
    line-height: 1.5;
    text-align: center;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    margin-top: 40px;
}


.post-content {
    line-height: 1.7;
    word-wrap: break-word;
}

.comment-content {
    line-height: 1.7;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.post-content h1,
.comment-content h1 {
    font-size: 1.3em;
}

.post-content h2,
.comment-content h2 {
    font-size: 1.15em;
}

.post-content h3,
.comment-content h3 {
    font-size: 1em;
}

.post-content p {
    font-size: 14px;
    line-height: 1.7;
}

.post-content img,
.comment-content img,
.post-content video,
.comment-content video {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.post-content hr,
.comment-content hr {
    margin: 2em auto;
    width: 100px;
    border: 2px solid var(--border-light);
    border-width: 2px 0 0 0;
    border-radius: 2px;
}


.container {
    width: calc(100% - 64px);
    max-width: 1680px !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
}

.row {
    margin-right: calc(var(--layout-column-gap) / -2);
    margin-left: calc(var(--layout-column-gap) / -2);
}

.row>[class*="col-"] {
    padding-right: calc(var(--layout-column-gap) / 2);
    padding-left: calc(var(--layout-column-gap) / 2);
}

/* 主内容区和侧边栏间距优化 */
#main {
    padding-right: calc(var(--layout-column-gap) / 2);
}

#secondary {
    padding-left: calc(var(--layout-column-gap) / 2);
}


@media (max-width: 767px) {
    body {
        font-size: 14px;
        padding: 8px;
    }

    /* 手机端品牌区 */
    .site-brand-inner {
        padding: 10px 16px;
        gap: 10px;
    }

    .site-logo {
        height: 30px;
    }

    .site-title-name {
        font-size: 18px;
    }

    .site-subtitle {
        font-size: 12px;
        max-width: 140px;
    }

    .mobile-menu-toggle {
        order: 10 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        margin: 0 0 0 auto !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        position: relative !important;
    }

    .mobile-menu-toggle .hamburger,
    .mobile-menu-toggle .hamburger:before,
    .mobile-menu-toggle .hamburger:after {
        content: '' !important;
        display: block !important;
        position: absolute !important;
        width: 18px !important;
        height: 1.5px !important;
        background: #555 !important;
        transition: transform 0.2s ease-out, opacity 0.2s ease-out !important;
    }

    .mobile-menu-toggle .hamburger {
        top: 50% !important;
        transform: translateY(-50%) !important;
    }

    .mobile-menu-toggle .hamburger:before {
        top: -5px !important;
    }

    .mobile-menu-toggle .hamburger:after {
        bottom: -5px !important;
    }

    /* 手机端导航栏 */
    #header.site-nav-wrap {
        padding: 0 !important;
        margin: 0 0 10px !important;
    }

    .site-nav-inner {
        padding: 0 16px;
    }

    .site-nav {
        gap: 16px;
    }

    .site-nav a {
        height: 40px;
        font-size: 14px;
    }

    .theme-mode-cycle {
        width: 24px;
        height: 24px;
    }

    .nav-theme {
        display: flex !important;
        margin-left: 0 !important;
    }

    /* 汉堡按钮动画 */
    .mobile-menu-toggle.active .hamburger {
        background: transparent !important;
    }

    .mobile-menu-toggle.active .hamburger:before {
        top: 0 !important;
        transform: rotate(45deg) !important;
    }

    .mobile-menu-toggle.active .hamburger:after {
        bottom: 0 !important;
        transform: rotate(-45deg) !important;
    }

    /* 搜索框样式优化 */
    #search {
        margin: 0 !important;
        display: flex !important;
    }

    #search input {
        height: 36px !important;
        padding: 0 12px !important;
        font-size: 14px !important;
        border: 1px solid var(--border-light) !important;
        border-right: none !important;
        border-radius: 4px 0 0 4px !important;
        flex: 1 !important;
    }

    #search button {
        height: 36px !important;
        padding: 0 15px !important;
        font-size: 14px !important;
        border: 1px solid var(--border-light) !important;
        border-left: none !important;
        border-radius: 0 4px 4px 0 !important;
        background: var(--bg-secondary) !important;
        color: var(--text-secondary) !important;
    }

    /* 文章卡片优化 - 减少内边距 */
    .post {
        padding: 16px;
        margin: 8px 0;
    }

    /* 文章元信息优化 - 改为水平排列，更紧凑 */
    .post-meta {
        flex-direction: row;
        gap: 8px;
        margin-top: -0.3em;
        flex-wrap: wrap;
        justify-content: center;
        /* Since parent is text-align: center */
    }

    /* 文章元信息优化 - 移除灰色背景，让文字更清晰 */
    .post-meta li {
        background: none;
        padding: 2px 0;
        font-size: 0.8em;
        margin: 0;
        color: var(--text-secondary);
        border: none;
    }

    /* 隐藏手机版不重要的信息 */
    .post-meta li:not(:first-child):not(:nth-child(2)) {
        display: none;
        /* 只显示作者和时间，隐藏分类等 */
    }

    /* 文章标题优化 */
    .post-title {
        font-size: 1.4em;
        margin: 0.5em 0;
    }

    /* 文章内容优化 */
    .post-content {
        margin-top: 1em;
        font-size: 14px;
        line-height: 1.6;
    }

    /* 侧边栏优化 */
    .widget {
        padding: 12px;
        margin-bottom: 12px;
    }

    .widget h3 {
        font-size: 1.1em;
        margin-bottom: 12px;
    }

    /* 布局间距优化 */
    #main,
    #secondary {
        padding-right: 0;
        padding-left: 0;
    }

    /* 页面导航优化 */
    .page-navigator {
        gap: 4px;
        margin: 20px 0;
        font-size: 13px;
    }

    .page-navigator a,
    .page-navigator .disabled span {
        min-width: 28px;
        height: 28px;
        padding: 0 8px;
        font-size: 13px;
    }

    .page-navigator .ellipsis span {
        min-width: 28px;
        height: 28px;
        font-size: 13px;
    }

    /* 隐藏前往输入框，手机上不实用 */
    .page-navigator .goto-box {
        display: none;
    }

    /* 标签优化 */
    .tags {
        margin-top: 12px;
    }

    .tags a {
        padding: 3px 8px;
        font-size: 0.8em;
    }

    /* 评论优化 */
    .comment-list li {
        padding: 12px;
        margin-top: 12px;
    }
}

@media (max-width: 768px) {
    .post-title,
    .post-meta {
        text-align: center;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1680px !important;
    }
}


.hidden {
    display: none !important;
    visibility: hidden;
}

.sr-only {
    border: 0;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.sr-only.focusable:active,
.sr-only.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

.invisible {
    visibility: hidden;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
}

.alignright {
    float: right;
}

img.alignleft {
    margin: 0 15px 0 0;
}

img.alignright {
    margin: 0 0 0 15px;
}


.post {
    max-width: none;
    /* 移除限制，让布局系统控制 */
}

.post-content p {
    font-size: 15px;
    line-height: 1.7;
}

#secondary input[type="text"] {
    padding: 8px 12px;
}


.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    margin: 10px 0;
}

.mobile-menu-toggle .hamburger {
    width: 24px;
    height: 2px;
    background: currentColor;
    position: relative;
    transition: all 0.3s ease;
}

.mobile-menu-toggle .hamburger::before,
.mobile-menu-toggle .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: all 0.3s ease;
}

.mobile-menu-toggle .hamburger::before {
    top: -6px;
}

.mobile-menu-toggle .hamburger::after {
    bottom: -6px;
}

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* 移动端导航菜单容器 */
.mobile-nav-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-container.active {
    opacity: 1;
}

.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-primary);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    padding: 60px 20px 20px;
    overflow-y: auto;
}

.mobile-nav-container.active .mobile-nav-menu {
    right: 0;
}

.mobile-nav-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a.current {
    background: var(--primary-color);
    color: white;
    padding-left: 20px;
}

/* 关闭按钮 */
.mobile-nav-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

/* 移动端导航样式 */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.mobile-nav li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav a {
    display: block;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    padding: 15px 0;
    transition: color 0.2s;
}

.mobile-nav a:hover {
    color: #4a9eff;
}

/* 汉堡按钮动画 */
.mobile-menu-toggle.active .hamburger {
    background: transparent !important;
}

.mobile-menu-toggle.active .hamburger:before {
    transform: rotate(45deg) !important;
    top: 0 !important;
}

.mobile-menu-toggle.active .hamburger:after {
    transform: rotate(-45deg) !important;
    bottom: 0 !important;
}

/* 保持其他样式不变 */

.widget-random-posts .widget-list a:hover {
    color: var(--primary-color);
    border-bottom: none;
}

.refresh-btn {
    float: right;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: sans-serif;
    font-weight: bold;
}

.refresh-btn:hover {
    color: var(--primary-color);
}

.refresh-btn.loading {
    transform: rotate(360deg);
}

#footer {
    padding: 3em 0;
    line-height: 1.5;
}

/* ========== 三栏布局 ========== */
.home-layout {
    display: grid;
    grid-template-columns: 1.5fr 2.5fr 6fr;
    gap: 24px;
    align-items: start;
}

.home-right {
    display: none;
}

.home-left,
.home-middle,
.home-main,
.home-right {
    min-width: 0;
}

.home-left-inner,
.home-middle,
.home-right-inner {
    position: sticky;
    top: var(--layout-page-padding);
}

.home-main .post,
.home-main .post-content {
    width: 100%;
    max-width: none;
}

.home-profile {
    text-align: center;
}

.home-search {
    position: relative;
    margin: 0;
}

.home-search input {
    padding-right: 54px;
    background: var(--bg-primary);
}

.home-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    padding: 7px 10px;
    width: auto;
    min-width: 42px;
    height: 30px;
    background: var(--primary-color);
    border-radius: var(--radius);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 12px;
    white-space: nowrap;
    line-height: 1;
}

.home-search button:hover {
    background: var(--primary-hover);
}

.home-side-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.home-side-nav a {
    display: block;
    padding: 8px 10px;
    color: var(--text-secondary);
    border-bottom: none;
    border-radius: 6px;
}

.home-side-nav a:hover,
.home-side-nav a.current {
    background: var(--bg-accent);
    color: var(--primary-color);
}

.category-group.current > a {
    background: var(--bg-accent);
    color: var(--primary-color);
}

.category-posts {
    display: none;
    margin: 8px 0 12px 16px;
    padding-left: 12px;
    border-left: 2px solid var(--border-light);
}

.category-group.current .category-posts {
    display: block;
}

.category-posts a {
    display: block;
    padding: 6px 8px;
    font-size: 14px;
    line-height: 1.25;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: none !important;
    border-radius: 6px;
}

.category-posts a:hover,
.category-posts a.active {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.12);
}

.article-index-widget {
    max-height: calc(100vh - 32px);
    overflow: auto;
}

.article-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-index-list li {
    margin: 0;
    border-bottom: 1px solid var(--border-light);
}

.article-index-list li:last-child {
    border-bottom: none;
}

.article-index-list a,
.article-index-list .empty {
    display: block;
    padding: 8px 10px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.35;
    border-bottom: none !important;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-index-list a:hover,
.article-index-list a.active {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.12);
}

@media (min-width: 1100px) {
    .container {
        max-width: 1680px !important;
    }
}

@media (min-width: 768px) and (max-width: 1099px) {
    .home-layout {
        grid-template-columns: clamp(240px, 30vw, 300px) minmax(0, 1fr);
    }

    .home-left {
        display: block;
    }

    .home-left-inner {
        position: static;
    }
}

@media (max-width: 767px) {
    .container {
        width: calc(100% - 16px);
    }

    .home-layout {
        display: block;
    }

    .home-left {
        display: block;
    }

    .home-right {
        padding-top: 0;
    }

    .home-left-inner,
    .home-middle,
    .home-right-inner {
        position: static;
    }
}
