/* ==========================================================
   默认主题 (Default Theme)
   风格: 简洁 / 蓝色调 / 内容-侧栏双列
   ========================================================== */

:root {
    --theme-primary: #4a90e2;
    --theme-primary-dark: #357abd;
    --theme-text: #2c3e50;
    --theme-text-soft: #6c757d;
    --theme-border: #e9ecef;
    --theme-bg: #f5f7fa;
    --theme-card-bg: #ffffff;
    --theme-accent: #ff7f50;
    --theme-radius: 10px;
    --theme-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    --theme-shadow-hover: 0 6px 22px rgba(0, 0, 0, 0.1);
}

/* ------ 顶部导航 ------ */
.site-header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}
.site-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-primary);
    letter-spacing: 0.5px;
}
.nav-list {
    list-style: none;
    display: flex;
    gap: 28px;
    align-items: center;
    margin: 0;
    padding: 0;
}
.nav-list a {
    color: var(--theme-text);
    font-weight: 500;
    font-size: 15px;
    padding: 6px 2px;
    position: relative;
    transition: color 0.25s;
}
.nav-list a:hover,
.nav-list a.active {
    color: var(--theme-primary);
}
.nav-list a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--theme-primary);
    transition: width 0.25s;
}
.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--theme-text);
}

/* ------ 主体 ------ */
.site-main {
    padding: 36px 0 20px;
    background: var(--theme-bg);
    min-height: calc(100vh - 200px);
}
.page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}
.page-layout.single-column {
    grid-template-columns: 1fr;
}
.search-title {
    font-size: 22px;
    margin-bottom: 24px;
    color: var(--theme-text);
}

/* ------ 文章卡片 ------ */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.article-list.compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.article-card {
    background: var(--theme-card-bg);
    border-radius: var(--theme-radius);
    padding: 28px 30px;
    box-shadow: var(--theme-shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--theme-shadow-hover);
}
.article-card.is-top {
    border-left: 4px solid var(--theme-primary);
}
.article-card.small {
    padding: 18px 20px;
}
.article-card-cover {
    margin: -28px -30px 16px -30px;
    max-height: 260px;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: var(--theme-radius) var(--theme-radius) 0 0;
}
.article-card-cover a { display: block; }
.article-card-cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: cover;
}
.article-card-title {
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 600;
}
.article-card-title a {
    color: var(--theme-text);
    transition: color 0.2s;
}
.article-card-title a:hover {
    color: var(--theme-primary);
}
.article-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--theme-text-soft);
    font-size: 13px;
    margin-bottom: 14px;
}
.article-card-meta a {
    color: var(--theme-text-soft);
}
.article-card-meta a:hover {
    color: var(--theme-primary);
}
.article-card-summary {
    color: #555;
    line-height: 1.75;
    margin-bottom: 12px;
    font-size: 15px;
}
.article-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-link {
    display: inline-block;
    padding: 3px 11px;
    background: var(--theme-bg);
    color: var(--theme-text-soft);
    border-radius: 999px;
    font-size: 12px;
    transition: all 0.2s;
}
.tag-link:hover {
    background: var(--theme-primary);
    color: #fff;
}

/* ------ 侧栏 ------ */
.side-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.widget-box {
    background: var(--theme-card-bg);
    border-radius: var(--theme-radius);
    padding: 22px;
    box-shadow: var(--theme-shadow);
}
.widget-title {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--theme-primary);
    color: var(--theme-text);
    font-weight: 600;
}
.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--theme-border);
    font-size: 14px;
    color: var(--theme-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.widget-list li:last-child {
    border-bottom: none;
}
.widget-list a {
    color: var(--theme-text);
    transition: color 0.2s;
    word-break: break-all;
}
.widget-list a:hover {
    color: var(--theme-primary);
}
.widget-list small {
    color: var(--theme-text-soft);
    font-size: 12px;
    flex-shrink: 0;
}
.widget-meta {
    color: var(--theme-text-soft);
    font-size: 12px;
    flex-shrink: 0;
}
.widget-form {
    display: flex;
    gap: 6px;
}
.widget-form input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.widget-form input:focus {
    border-color: var(--theme-primary);
}
.widget-form button {
    padding: 9px 16px;
    background: var(--theme-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.widget-form button:hover {
    background: var(--theme-primary-dark);
}

/* ------ 空状态 ------ */
.empty-state {
    background: var(--theme-card-bg);
    border-radius: var(--theme-radius);
    padding: 60px 20px;
    text-align: center;
    box-shadow: var(--theme-shadow);
    color: var(--theme-text-soft);
}
.empty-state.small {
    padding: 30px 20px;
}
.empty-icon {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ------ 文章详情 ------ */
.post-detail {
    background: var(--theme-card-bg);
    border-radius: var(--theme-radius);
    padding: 40px 48px;
    box-shadow: var(--theme-shadow);
}
.post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--theme-border);
}
.post-title {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--theme-text);
    line-height: 1.35;
}
.post-cover {
    margin-bottom: 18px;
    max-height: 360px;
    overflow: hidden;
    background: #f0f0f0;
    border-radius: 8px;
}
.post-cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: cover;
}
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--theme-text-soft);
    font-size: 14px;
    margin-bottom: 14px;
}
.post-meta a {
    color: var(--theme-text-soft);
}
.post-meta a:hover {
    color: var(--theme-primary);
}
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.post-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 28px 0 14px;
    color: var(--theme-text);
    font-weight: 600;
}
.post-content h2 {
    font-size: 22px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--theme-primary);
}
.post-content p {
    margin-bottom: 16px;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.post-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 18px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 18px 0;
    font-size: 14px;
    line-height: 1.6;
}
.post-content code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e11d48;
}
.post-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}
.post-content blockquote {
    border-left: 4px solid var(--theme-primary);
    padding: 10px 20px;
    margin: 20px 0;
    color: var(--theme-text-soft);
    background: var(--theme-bg);
    border-radius: 0 8px 8px 0;
}
.post-content ul,
.post-content ol {
    margin: 14px 0 14px 24px;
}
.post-content li {
    margin-bottom: 6px;
}
.post-content a {
    color: var(--theme-primary);
    border-bottom: 1px solid var(--theme-primary);
}
.post-content a:hover {
    opacity: 0.8;
}
.post-admin-bar {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--theme-border);
}
.mini-btn {
    display: inline-block;
    padding: 8px 18px;
    background: var(--theme-primary);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s;
}
.mini-btn:hover {
    background: var(--theme-primary-dark);
}

/* ------ 评论区 ------ */
.comments-area,
.related-area {
    background: var(--theme-card-bg);
    border-radius: var(--theme-radius);
    padding: 30px 36px;
    box-shadow: var(--theme-shadow);
    margin-top: 28px;
}
.comments-area > h3,
.related-area > h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--theme-text);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-primary);
}
.comment-form-box {
    margin-bottom: 30px;
    padding: 22px;
    background: var(--theme-bg);
    border-radius: 8px;
}
.form-row {
    margin-bottom: 14px;
}
.form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--theme-text);
    font-size: 14px;
}
.form-row input,
.form-row textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--theme-primary);
}
.form-row textarea {
    resize: vertical;
    min-height: 100px;
}
.submit-btn {
    padding: 10px 28px;
    background: var(--theme-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.2s;
}
.submit-btn:hover {
    background: var(--theme-primary-dark);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.comment-item {
    padding: 16px 18px;
    background: var(--theme-bg);
    border-radius: 8px;
}
.comment-item.small {
    padding: 12px 14px;
    margin-top: 8px;
    background: #fff;
    border: 1px solid var(--theme-border);
}
.comment-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}
.comment-user {
    font-weight: 600;
    color: var(--theme-primary);
}
.comment-time {
    color: var(--theme-text-soft);
}
.comment-body {
    color: var(--theme-text);
    font-size: 14px;
    line-height: 1.7;
}
.comment-children {
    margin-left: 20px;
    margin-top: 10px;
}

/* ------ 分页 ------ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
    flex-wrap: wrap;
}
.pagination a {
    padding: 9px 15px;
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-border);
    border-radius: 6px;
    color: var(--theme-text);
    font-size: 14px;
    transition: all 0.2s;
}
.pagination a:hover,
.pagination a.active {
    background: var(--theme-primary);
    color: #fff;
    border-color: var(--theme-primary);
}

/* ------ 页脚 ------ */
.site-footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 40px 0 20px;
    margin-top: 50px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h4 {
    color: var(--theme-primary);
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 600;
}
.footer-col p {
    color: #94a3b8;
    line-height: 1.7;
    font-size: 14px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col li {
    margin-bottom: 8px;
}
.footer-col a {
    color: #94a3b8;
    font-size: 14px;
    transition: color 0.2s;
}
.footer-col a:hover {
    color: #fff;
}
.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #334155;
    color: #64748b;
    font-size: 13px;
}

/* ------ 响应式 ------ */
@media (max-width: 768px) {
    .page-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .site-nav {
        padding: 14px 0;
    }
    .site-logo {
        font-size: 20px;
    }
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px 24px;
        gap: 4px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    .nav-list.active {
        display: flex;
    }
    .nav-list a {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid var(--theme-border);
    }
    .mobile-toggle {
        display: block;
    }
    .post-detail {
        padding: 24px 20px;
    }
    .post-title {
        font-size: 24px;
    }
    .article-card {
        padding: 20px;
    }
    .article-card-title {
        font-size: 18px;
    }
    .article-list.compact {
        grid-template-columns: 1fr;
    }
    .comments-area,
    .related-area {
        padding: 22px;
    }
}
