/* --- 1. 变量与全局基础 --- */
:root {
    --primary: #78a5a3;
    --primary-dark: #5f8d8b;
    --bg-body: #f8fafc;
    --text-main: #2d3748;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --white: #ffffff;
    --radius: 12px;
}
* { box-sizing: border-box; }
body { background: var(--bg-body); color: var(--text-main); font-family: -apple-system, sans-serif; line-height: 1.8; margin: 0; }
a { color: var(--primary); text-decoration: none; transition: 0.3s; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* --- 2. 头部 Banner (限宽 1100px 且带圆角) --- */
.site-header { margin-bottom: 50px; padding-top: 20px; } 

.header-container { 
    position: relative; 
    min-height: 480px; 
    border-radius: var(--radius); 
    background-color: #cbd5e0;
    background-size: cover; 
    background-position: center; 
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.header-mask { position: absolute; inset: 0; background: rgba(255,255,255,0.25); z-index: 1; backdrop-filter: blur(2px); }
.header-content { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; padding: 0 40px; }

/* 导航：Logo 靠左，菜单靠右 */
.nav-flex { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 50px 0 40px; width: 100%; }
.logo a { font-size: 28px; font-weight: 700; color: #2d3748; letter-spacing: 1px; }

.site-nav { display: flex; gap: 40px; }
.site-nav a { font-size: 16px; font-weight: 600; color: #2d3748; }
.site-nav a:hover { color: var(--primary); }

/* Banner 居中搜索 */
.banner-content { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; padding-bottom: 80px; }
.banner-inner { width: 100%; max-width: 600px; }
.banner-title { font-size: 38px; color: #2d3748; letter-spacing: 8px; margin: 0 0 35px 0; text-shadow: 0 2px 15px rgba(255,255,255,0.6); }

.banner-search form { position: relative; width: 100%; max-width: 480px; margin: 0 auto; }
.banner-search input {
    width: 100%; padding: 14px 30px; border-radius: 40px; border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(10px); outline: none; font-size: 16px; transition: 0.4s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.banner-search input:focus { background: #fff; box-shadow: 0 15px 35px rgba(0,0,0,0.12); }
.banner-search button { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 20px; opacity: 0.6; }
/* --- 3. 正文布局与卡片 --- */
.row { display: flex; gap: 45px; width: 100%; }
.col-left { flex: 2.5; min-width: 0; }
.col-right { flex: 1; }

.post-card, .post-content-card, .widget { 
    background: #fff; padding: 40px; border-radius: var(--radius); 
    margin-bottom: 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); 
}

/* 文章标题与元信息 */
.post-title { font-size: 26px; margin: 0 0 15px 0; }
.post-title a { color: #2d3748; }

.post-meta, .post-meta-detail { 
    display: flex !important; flex-direction: row !important; flex-wrap: wrap !important;
    gap: 20px !important; list-style: none !important; padding: 0 0 15px 0 !important;
    margin-bottom: 25px !important; border-bottom: 1px solid #f1f5f9 !important;
    font-size: 13px !important; color: var(--text-light) !important;
}

.post-excerpt { color: var(--text-muted); font-size: 16px; }

/* 详情页相邻文章导航 (左右分布) */
.post-near { 
    display: flex !important; justify-content: space-between; 
    list-style: none; padding: 20px 0 0; border-top: 1px solid #f1f5f9; margin-top: 30px; 
}
.post-near li { flex: 1; font-size: 14px; }
.post-near li:last-child { text-align: right; }

/* 侧边栏小工具样式 (卡片化) */
.widget { padding: 25px; }
.widget h3 { font-size: 15px; font-weight: 700; margin-bottom: 20px; padding-left: 10px; border-left: 4px solid var(--primary); position: relative; }
.widget li { list-style: none; padding: 8px 0; border-bottom: 1px dashed #f1f5f9; font-size: 14px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item { background: #f1f5f9; padding: 4px 10px; border-radius: 4px; font-size: 12px; }
.side-search input { width: 100%; padding: 10px; border: 1px solid #eee; border-radius: 8px; outline: none; }
/* --- 4. 核心：页码强制横向 --- */
.page-navigator { 
    display: flex !important; flex-direction: row !important; 
    justify-content: center !important; list-style: none !important; 
    padding: 40px 0 !important; margin: 0 auto !important; gap: 10px !important; 
}
.page-navigator li { display: inline-block !important; margin: 0 !important; }
.page-navigator a, .page-navigator span { 
    display: inline-block !important; padding: 10px 18px; background: #fff; 
    border: 1px solid #edf2f7; border-radius: 10px; font-weight: 500; 
}
.page-navigator .current a, .page-navigator .current span { 
    background: var(--primary) !important; color: #fff !important; border-color: var(--primary) !important; 
}

/* --- 5. 评论系统与防变形 --- */
.comments-container { background: #fff; padding: 45px; border-radius: var(--radius); margin-top: 40px; box-shadow: 0 5px 25px rgba(0,0,0,0.02); }
.comment-item { display: flex; gap: 20px; margin-bottom: 25px; }
.comment-avatar img { border-radius: 50%; width: 50px; height: 50px; }
.comment-children { margin-left: 55px; border-left: 2px solid #edf2f7; padding-left: 20px; }
.comment-inputs { display: flex; gap: 15px; margin-bottom: 15px; }
.comment-inputs input { flex: 1; padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; outline: none; }
.comment-textarea textarea { 
    width: 100%; max-width: 100%; min-height: 120px; padding: 15px; 
    border: 1px solid #e2e8f0; border-radius: 8px; outline: none; resize: vertical; 
}
.submit-btn { background: var(--primary); color: #fff; border: none; padding: 12px 30px; border-radius: 30px; cursor: pointer; font-weight: 600; transition: 0.3s; }

/* --- 6. 手机端适配 --- */
.menu-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; }
.menu-toggle span { width: 26px; height: 2px; background: #2d3748; }

@media (max-width: 768px) {
    .site-header { padding-top: 0; }
    .header-container { border-radius: 0; min-height: 300px; }
    .header-content { padding: 0 20px; }
    .menu-toggle { display: flex; }
    .site-nav { 
        display: none; position: absolute; top: 85px; left: 20px; right: 20px; 
        background: #fff; flex-direction: column; padding: 15px; border-radius: 15px; 
        box-shadow: 0 15px 40px rgba(0,0,0,0.1); z-index: 100;
    }
    .nav-active { display: flex !important; }
    .site-nav a { padding: 15px; border-bottom: 1px solid #f1f5f9; width: 100%; margin: 0; }
    .col-right { display: none !important; } /* 侧栏隐藏 */
    .row { flex-direction: column; }
    .banner-title { font-size: 24px; }
    .post-card { border-radius: 0; margin-left: -20px; margin-right: -20px; padding: 25px; }
}
footer { text-align: center; padding: 60px 0; background: #fff; border-top: 1px solid #eee; margin-top: 50px; color: #bbb; }
