* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --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-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-menu a {
    display: block;
    padding: 8px 16px;
    color: var(--text-color);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary-color);
    color: white;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border-radius: 20px;
    padding: 6px 16px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
    font-size: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    gap: 6px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: white;
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 16px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    padding: 24px 0;
}

.content-area {
    min-width: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    display: flex;
    justify-content: space-between;
    color: var(--text-color);
}

.widget ul li a:hover {
    color: var(--primary-color);
}

.post-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-card.featured {
    border-left: 4px solid var(--primary-color);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-tag {
    background: var(--primary-color);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.5;
}

.post-title a {
    color: var(--text-color);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-summary {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.7;
}

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

.post-stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-light);
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.post-stats span:hover {
    color: var(--primary-color);
}

.post-stats .liked {
    color: var(--danger-color);
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.pagination-list {
    display: flex;
    gap: 4px;
    list-style: none;
}

.pagination-list li a,
.pagination-list li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.pagination-list li a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-list li.active span {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-list li.disabled span {
    color: var(--text-light);
    cursor: not-allowed;
}

.post-detail {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.post-detail .post-title {
    font-size: 20px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.post-detail .post-meta {
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 24px 0 16px;
    font-weight: 600;
}

.post-content h1 { font-size: 28px; }
.post-content h2 { font-size: 24px; }
.post-content h3 { font-size: 20px; }
.post-content h4 { font-size: 18px; }

.post-content p {
    margin-bottom: 16px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

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

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 12px 20px;
    margin: 20px 0;
    background: var(--bg-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-light);
}

.post-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 20px 0;
}

.post-content code {
    background: var(--bg-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', Consolas, monospace;
    font-size: 14px;
}

.post-content pre code {
    background: transparent;
    padding: 0;
}

.post-content img {
    border-radius: var(--radius-sm);
    margin: 16px 0;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 24px 0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.2s;
}

.action-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-btn.liked {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.author-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 4px;
}

.author-info p {
    font-size: 14px;
    color: var(--text-light);
}

.related-posts {
    margin-top: 32px;
}

.related-posts h3 {
    margin-bottom: 16px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.related-item {
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
}

.related-item a {
    font-size: 14px;
    color: var(--text-color);
    display: block;
    margin-bottom: 4px;
}

.related-item span {
    font-size: 12px;
    color: var(--text-light);
}

.comments-section {
    margin-top: 32px;
}

.comments-title {
    font-size: 20px;
    margin-bottom: 20px;
}

.comment-form {
    margin-bottom: 32px;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 12px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-list {
    list-style: none;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 500;
}

.comment-time {
    font-size: 12px;
    color: var(--text-light);
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
}

.auth-container {
    max-width: 420px;
    margin: 60px auto;
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-light);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-error {
    background: #fef2f2;
    color: var(--danger-color);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-light);
}

.page-header {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.page-title {
    font-size: 24px;
    margin-bottom: 8px;
}

.page-desc {
    color: var(--text-light);
}

.user-profile {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.profile-cover {
    height: 160px;
    background: linear-gradient(135deg, var(--primary-color), #7c3aed);
}

.profile-info {
    padding: 0 24px 24px;
    margin-top: -40px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--bg-white);
    object-fit: cover;
}

.profile-name {
    font-size: 24px;
    font-weight: 600;
    margin-top: 12px;
}

.profile-bio {
    color: var(--text-light);
    margin-top: 8px;
}

.profile-stats {
    display: flex;
    gap: 32px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.profile-stat {
    text-align: center;
}

.profile-stat .num {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.profile-stat .label {
    font-size: 13px;
    color: var(--text-light);
}

.about-content {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    line-height: 1.8;
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    padding: 32px 0;
}

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

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    color: var(--text-light);
    font-size: 14px;
}

.footer-copyright {
    color: var(--text-light);
    font-size: 14px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #ecfdf5;
    color: var(--success-color);
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: var(--danger-color);
    border: 1px solid #fecaca;
}

@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .search-box input {
        width: 140px;
    }

    /* 汉堡菜单：导航侧滑抽屉 */
    .nav-toggle {
        display: inline-flex;
    }
    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        max-width: 80vw;
        height: 100vh;
        height: 100dvh;
        background: #fff;
        z-index: 1001;
        padding-top: 72px;
        padding-bottom: 24px;
        padding-left: 24px;
        padding-right: 24px;
        transition: right 0.3s cubic-bezier(.4,0,.2,1);
        box-shadow: -4px 0 20px rgba(0,0,0,0.08);
        overflow-y: auto;
    }
    .nav-wrapper.active {
        right: 0;
    }
    .nav-wrapper .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .nav-wrapper .nav-menu li {
        width: 100%;
        margin: 0;
    }
    .nav-wrapper .nav-menu a {
        padding: 14px 16px;
        border-radius: 10px;
        display: block;
        font-size: 15px;
    }
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s;
        z-index: 1000;
    }
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    body.nav-open {
        overflow: hidden;
    }

    .header-clock {
        display: none;
    }
    .site-stats {
        gap: 10px;
    }
    .footer-beian {
        gap: 10px;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .post-card {
        padding: 16px;
    }

    .post-detail {
        padding: 20px;
    }

    .related-list {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    /* 手机端：紧凑头部布局 */
    .header-inner {
        gap: 10px;
    }
    .logo {
        font-size: 20px;
    }
    .search-box {
        order: 99;
        width: 100%;
    }
    .user-actions {
        gap: 8px;
    }
    .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    .stats-panel .stats-row {
        padding: 10px 0 !important;
    }
    .comment-actions {
        gap: 8px !important;
        flex-wrap: wrap;
    }
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }
    .pagination .page-info {
        order: 99;
        width: 100%;
        text-align: center;
        padding-top: 8px;
    }
    .comment-item .avatar {
        width: 36px;
        height: 36px;
    }
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px !important;
    }
    .comment-header time {
        font-size: 11px;
    }
    .post-title {
        font-size: 16px;
    }
    .post-detail .post-title {
        font-size: 20px;
    }
    .post-actions {
        gap: 12px;
        flex-wrap: wrap;
    }
    .action-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ========== UI增强样式 ========== */

/* 导航标签圆角增强 */
.nav-menu a {
    border-radius: 20px;
    padding: 8px 18px;
}

.nav-menu a:hover,
.nav-menu a.active {
    border-radius: 20px;
}

/* 美观空状态页面 */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.no-posts .empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-posts h3 {
    font-size: 20px;
    color: var(--text-color);
    margin-bottom: 12px;
    font-weight: 600;
}

.no-posts p {
    font-size: 15px;
    margin-bottom: 24px;
}

.no-posts .empty-action {
    display: inline-block;
}

/* 分类页面头部增强 */
.category-header {
    text-align: center;
    margin-bottom: 24px;
}

.category-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.category-header .post-count {
    color: var(--text-light);
    font-size: 15px;
}

/* 代码高亮增强 - 关键字配色 */
.post-content pre {
    position: relative;
    background: #0f172a;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.post-content pre::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 20px 0 0 #f59e0b, 40px 0 0 #10b981;
}

.post-content pre code {
    display: block;
    padding-top: 20px;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.7;
    color: #e2e8f0;
}

/* 代码关键字配色 - PHP/JS/Java等常见语言 */
.post-content code .keyword,
.post-content pre code .keyword {
    color: #c084fc;
    font-weight: 500;
}

.post-content code .string,
.post-content pre code .string {
    color: #86efac;
}

.post-content code .comment,
.post-content pre code .comment {
    color: #64748b;
    font-style: italic;
}

.post-content code .function,
.post-content pre code .function {
    color: #60a5fa;
}

.post-content code .number,
.post-content pre code .number {
    color: #fbbf24;
}

.post-content code .variable,
.post-content pre code .variable {
    color: #f87171;
}

/* 行内代码增强 */
.post-content :not(pre) > code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* 搜索关键词高亮 */
mark {
    background: #fef08a;
    color: #854d0e;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 隐私协议样式 */
.privacy-agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    margin: 16px 0;
    line-height: 1.6;
}

.privacy-agreement input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.privacy-agreement a {
    color: var(--primary-color);
    text-decoration: none;
}

.privacy-agreement a:hover {
    text-decoration: underline;
}

/* 时间展示优化 */
.time-tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed var(--border-color);
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 文章图片悬停效果 */
.post-content img {
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: zoom-in;
}

.post-content img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* 404/500页面增强 */
.error-page {
    text-align: center;
    padding: 100px 20px;
}

.error-page h1 {
    font-size: 120px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0.8;
}

.error-page h2 {
    font-size: 28px;
    margin-bottom: 12px;
}

.error-page p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-page .btn-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== 顶部导航横排 + 汉堡菜单 ========== */

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
    position: relative;
    white-space: nowrap;
}

/* 汉堡菜单按钮 (默认隐藏, 小屏显示) */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    transition: background 0.2s;
    z-index: 1002;
    flex-shrink: 0;
}
.nav-toggle:hover {
    background: var(--bg-color);
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.2s;
}
.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 顶部时钟 */
.header-clock {
    font-size: 13px;
    color: var(--text-light);
    white-space: nowrap;
    font-family: 'Courier New', Consolas, monospace;
    padding: 0 12px 0 14px;
    border-left: 1px solid var(--border-color);
    text-align: center;
    line-height: 1.35;
}
.header-clock .clock-time {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
    letter-spacing: 0.4px;
}
.header-clock .clock-date {
    font-size: 11px;
    opacity: 0.8;
}

/* 导航菜单默认横排 */
.nav-menu {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    white-space: nowrap;
}

/* 站点统计（页脚） */
.site-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
}
.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}
.stat-item span {
    color: #667eea;
    font-weight: 600;
}

/* 备案信息 */
.footer-beian {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 12px;
}
.footer-beian a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.footer-beian a:hover {
    color: #667eea;
}
.footer-copyright .footer-sep {
    margin: 0 10px;
    color: #bbb;
}
.footer-copyright .footer-owner {
    color: #999;
    font-size: 12px;
}
.beian-local {
    color: #ccc;
}

/* 侧栏统计面板 */
.stats-panel {
    padding: 4px 0;
}
.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px dashed #eee;
    gap: 10px;
}
.stats-row:last-child {
    border-bottom: 0;
}
.stats-label {
    color: #999;
    font-size: 13px;
}
.stats-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}
.stats-value-primary { color: #667eea; }
.stats-value-danger  { color: #f5576c; }
.stats-value-success { color: #48bb78; }

/* 评论区小修复 */
.comment-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}
.comment-actions {
    display: flex;
    align-items: center;
}

/* 分页信息居中 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 文章卡片内容自适应断行 */
.post-excerpt, .post-content, .post-summary, .comment-body {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* 表格响应式横滚（详情页内的表格） */
.post-content table,
.widget table,
.post-detail table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 评论表单按钮组防止横排溢出 */
.comment-actions button {
    flex-shrink: 0;
}

/* 详情页图片自适应宽度 */
.post-detail img,
.post-content img {
    max-width: 100%;
    height: auto;
}

/* ============ 首页标题缩小 + 简介缩短（显示10篇） ============ */
.post-card {
    padding: 14px 18px;
    margin-bottom: 12px;
}
.post-card .post-title {
    font-size: 15px !important;
    line-height: 1.35 !important;
    margin: 6px 0 8px 0 !important;
    font-weight: 600 !important;
}
.post-card .post-title a {
    font-size: inherit;
}
.post-card .post-summary {
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: var(--text-light);
    max-height: 2.9em;         /* 约 2 行 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin-bottom: 8px !important;
}
.post-card .post-meta {
    font-size: 12px !important;
    gap: 10px !important;
    margin-bottom: 2px;
}
.post-card .post-footer {
    padding-top: 4px !important;
    margin-top: 4px !important;
}
.post-card .post-stats {
    font-size: 12px !important;
    gap: 12px !important;
}
.post-card .read-more {
    font-size: 12px !important;
    padding: 2px 10px !important;
}
.post-card.featured {
    border-left: 3px solid var(--danger-color);
}

