/*
 Theme Name: 星辰茶话
 Theme URI: https://xinsenz.com
 Author: Custom Dev
 Author URI: https://xinsenz.com
 Description: 导航独立卡片，#6BB458主色；底部增加标签+评论数元信息
 Version: 2.4
 License: GNU General Public License v2 or later
 License URI: http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain: xingchen-chahua
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background-color: #f4f9f3;
    font-family: "Microsoft Yahei", system-ui, sans-serif;
    color: #333;
    line-height: 1.65;
    font-size: 14px;
    max-width: 880px;
    margin: 0 auto;
    padding: 12px 16px;
}
/* ========== 头部Banner ========== */
.site-header {
    background-color: #6BB458;
    background-image: linear-gradient(rgba(0,0,0,0.05), rgba(0,0,0,0.05)), url("./bg.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 20px 24px;
    border-radius: 8px;
    margin-bottom: 12px;
}
.header-left h1 {
    font-size: 26px;
    font-weight: bold;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 6px;
}
.header-left .desc {
    font-size: 15px;
    color: #ffffff;
    opacity: 0.92;
}
/* ========== 独立卡片导航栏 ========== */
.nav-card {
    background:#ffffff;
    border-radius:6px;
    padding:10px 14px;
    margin-bottom:12px;
    box-shadow: 0 2px 8px rgba(107, 180, 88, 0.12);
}
.nav-card > ul {
    list-style:none;
    padding:0;
    margin:0;
    display:flex;
    gap:20px;
    flex-wrap:wrap;
}
.nav-card > ul > li {
    list-style:none;
    padding:0;
    margin:0;
}
.nav-card > ul > li > a {
    color:#6BB458;
    text-decoration:none;
    font-size:14px;
    transition: color 0.2s ease;
}
.nav-card > ul > li > a:hover {
    color:#4a8c3a;
    text-decoration:underline;
}
/* ========== 文章列表卡片 ========== */
.post-item {
    background: #ffffff;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: all 0.22s ease;
    transform: translateY(0);
    box-shadow: 0 1px 6px rgba(107, 180, 88, 0.10);
}
.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(107, 180, 88, 0.20);
}
/* 第一行头部：分类标签 和 标题‑时间同一行并排 */
.post-item-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 6px;
}
.post-cat-tag {
    background: #6BB458;
    color: #ffffff;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.post-cat-tag a {
    color: #ffffff;
    text-decoration: none;
}
.post-cat-tag a:hover {
    color: #ffffff;
    text-decoration: none;
}
.post-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}
.post-title a {
    color: #6BB458;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.post-title a:hover {
    color:#4a8c3a;
}
.post-time {
    color: #777;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
/* 摘要：兄弟级，横跨卡片整宽度，文字顶最左侧 */
.post-excerpt {
    color: #666;
    font-size: 13px;
    margin-top: 0;
    padding-left:0;
    margin-left:0;
    text-indent:0;
}
.post-excerpt p {
    margin:0 !important;
    padding:0 !important;
    text-indent:0 !important;
}
/* ==========卡片底部元信息：标签 + 评论数========== */
.post-item-meta{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-top:8px;
    padding-top:6px;
    border-top:1px solid #f0f0f0;
    font-size:12px;
}
.post-tags a{
    display:inline-block;
    background:#f4f9f3;
    color:#6BB458;
    padding:1px 6px;
    border-radius:3px;
    text-decoration:none;
    margin-right:4px;
    transition:color 0.2s ease;
}
.post-tags a:hover{
    color:#4a8c3a;
}
.post-comment-num a{
    color:#777;
    text-decoration:none;
    transition:color 0.2s ease;
}
.post-comment-num a:hover{
    color:#6BB458;
}

/* ========== 单文章页 ========== */
.single-post-wrap {
    background: #ffffff;
    padding: 24px 28px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(107, 180, 88, 0.10);
}
.single-post-header {
    margin-bottom: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}
.single-post-title {
    font-size: 20px;
    color: #222;
    margin-bottom: 8px;
}
.single-meta {
    color: #777;
    font-size: 13px;
}
.single-meta a {
    color: #6BB458;
    text-decoration: none;
    transition: color 0.2s ease;
}
.single-meta a:hover {
    color:#4a8c3a;
    text-decoration: none;
}
.single-content {
    font-size: 15px;
    line-height: 1.8;
}
.single-content p {
    margin-bottom: 14px;
}
.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
/* ========== 页脚【改为卡片式，与主题统一】 ========== */
.site-footer {
    background:#ffffff;
    border-radius:6px;
    padding:12px 14px;
    margin-top:24px;
    text-align: center;
    font-size: 12px;
    color:#666;
    box-shadow: 0 1px 6px rgba(107, 180, 88, 0.10);
    border-top:none;
}
.site-footer a{
    color:#6BB458;
    text-decoration:none;
    transition:color 0.2s ease;
}
.site-footer a:hover{
    color:#4a8c3a;
}
/* ========== 分页 ========== */
.pagination {
    text-align: center;
    margin: 16px 0;
}
.pagination a,
.pagination span {
    padding: 4px 8px;
    margin: 0 3px;
    background: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    color: #6BB458;
    transition: color 0.2s ease;
}
.pagination a:hover{
    color:#4a8c3a;
}
.pagination .current {
    background: #6BB458;
    color: #ffffff;
    padding: 4px 8px;
    margin: 0 3px;
    border-radius: 4px;
}
/* ========== 响应式手机 ========== */
@media (max-width: 640px) {
    .nav-card > ul {
        gap:12px;
    }
    /* 手机端头部改为上下堆叠 */
    .post-item-head {
        flex-direction: column;
        gap:6px;
    }
    .post-title-row {
        flex-direction: column;
    }
    .post-item:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(107, 180, 88, 0.14);
    }
    /*手机底部元信息改为上下堆叠*/
    .post-item-meta{
        flex-direction:column;
        align-items:flex-start;
        gap:4px;
    }
}
/* ========== 评论区 ========== */
.comments-area {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.comments-title {
    font-size: 16px;
    margin-bottom: 12px;
    color: #6BB458;
}
.comment-list {
    list-style: none;
    padding: 0;
}
.comment {
    background: #f4f9f3;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.comment-meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}
.comment-form p {
    margin-bottom: 8px;
}
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}
.comment-form input[type="submit"] {
    width: auto;
    background: #6BB458;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    transition: background-color 0.22s ease;
}
.comment-form input[type="submit"]:hover{
    background-color:#4a8c3a;
}