/* =====================================================
   微笑如歌 · 主题样式
   暖色 · 音乐 · 简约，兼容移动端（WAP）
   ===================================================== */

:root {
    --bg: #faf6ef;
    --bg-card: #ffffff;
    --ink: #3d332b;
    --ink-light: #8a7d70;
    --accent: #e8613c;
    --accent-soft: #fbe9e2;
    --accent-deep: #c9471f;
    --gold: #d9a441;
    --line: #ece3d6;
    --radius: 14px;
    --shadow: 0 4px 18px rgba(120, 90, 60, 0.08);
    --font-serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;
    --font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.75;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); }

/* ---------- 顶部 ---------- */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
}

.site-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.site-brand:hover { color: var(--ink); }

.brand-notes {
    font-size: 30px;
    color: var(--accent);
    animation: sway 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes sway {
    0%, 100% { transform: rotate(-8deg) translateY(0); }
    50% { transform: rotate(8deg) translateY(-3px); }
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-serif); font-size: 24px; font-weight: 700; letter-spacing: 4px; }
.brand-tagline { font-size: 12px; color: var(--ink-light); letter-spacing: 2px; }

.site-nav { display: flex; gap: 26px; align-items: center; }
.site-nav a {
    color: var(--ink-light);
    font-size: 15px;
    letter-spacing: 2px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-nav a.nav-admin { color: #b3a99c; font-size: 13px; letter-spacing: 0; line-height: 1; }
.site-nav a.nav-admin:hover { color: var(--accent); border-bottom-color: var(--accent); }

.site-main { padding: 40px 20px 30px; min-height: 60vh; }

/* ---------- 首页 hero ---------- */
.hero {
    text-align: center;
    padding: 46px 20px 50px;
    margin-bottom: 20px;
    background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg) 100%);
    border-radius: var(--radius);
}

.hero-notes { color: var(--gold); font-size: 20px; letter-spacing: 14px; margin-bottom: 6px; }

.hero-title {
    font-family: var(--font-serif);
    font-size: 40px;
    margin: 0 0 10px;
    letter-spacing: 10px;
    color: var(--ink);
}

.hero-sub { color: var(--ink-light); margin: 0; letter-spacing: 3px; }

.hero-desc {
    max-width: 560px;
    margin: 16px auto 0;
    color: #6b5d50;
    font-size: 15px;
    line-height: 1.9;
    letter-spacing: 0.5px;
}

.hero-cta { display: flex; justify-content: center; gap: 14px; margin-top: 24px; flex-wrap: wrap; }

.btn {
    display: inline-block;
    padding: 10px 26px;
    border-radius: 999px;
    font-size: 15px;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(232, 97, 60, 0.28); }
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
.btn-ghost { background: var(--bg-card); color: var(--accent-deep); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-deep); }

/* ---------- 文章列表卡片 ---------- */
.post-list { display: flex; flex-direction: column; gap: 24px; }

.post-card {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 26px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 26px rgba(120, 90, 60, 0.14);
}

.post-card-date {
    flex: 0 0 64px;
    text-align: center;
    border-right: 1px dashed var(--line);
    padding-right: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pcd-day { font-family: var(--font-serif); font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.pcd-rest { font-size: 12px; color: var(--ink-light); letter-spacing: 1px; }

.post-card-body { flex: 1; min-width: 0; }

.post-card-title {
    margin: 0 0 8px;
    font-family: var(--font-serif);
    font-size: 21px;
    line-height: 1.4;
}
.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt {
    margin: 0 0 14px;
    color: var(--ink-light);
    font-size: 14.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.read-more { font-size: 14px; margin-left: auto; white-space: nowrap; }

/* ---------- 标签 ---------- */
.tag-chip {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-size: 12.5px;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}
.tag-chip:hover { background: var(--accent); color: #fff; }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.tag-cloud-item {
    padding: 6px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--ink);
    font-size: 14px;
    transition: all 0.2s ease;
}
.tag-cloud-item:hover,
.tag-cloud-item.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag-count {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    opacity: 0.65;
}

/* ---------- 页头（标签/关于页共用） ---------- */
.page-head { text-align: center; margin: 10px 0 34px; }
.page-title { font-family: var(--font-serif); font-size: 32px; margin: 0 0 6px; letter-spacing: 6px; }
.page-sub { color: var(--ink-light); margin: 0; letter-spacing: 2px; }
.title-notes { color: var(--accent); font-size: 22px; }
.filter-heading {
    font-family: var(--font-serif);
    font-size: 20px;
    margin: 6px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

/* ---------- 文章详情 ---------- */
.post-single {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px 48px;
    box-shadow: var(--shadow);
    max-width: 677px;
    margin: 0 auto;
}

.post-single-header { text-align: center; margin-bottom: 30px; }

.post-single-title {
    font-family: var(--font-serif);
    font-size: 30px;
    line-height: 1.45;
    margin: 0 0 14px;
}

.post-single-meta { color: var(--ink-light); font-size: 14px; }
.meta-divider { margin: 0 8px; }

.post-single-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px dashed var(--line);
    text-align: center;
}
.psf-note { color: var(--ink-light); font-size: 14px; }

/* ---------- Markdown 正文排版 ---------- */
.markdown-body { font-size: 16.5px; line-height: 1.9; }

.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
    font-family: var(--font-serif);
    color: var(--ink);
    line-height: 1.5;
    margin-top: 1.6em;
    margin-bottom: 0.7em;
}

.markdown-body h1 { font-size: 26px; border-bottom: 2px solid var(--accent-soft); padding-bottom: 8px; }
.markdown-body h2 { font-size: 22px; }
.markdown-body h3 { font-size: 19px; }

.markdown-body p { margin: 0.9em 0; }

.markdown-body a { border-bottom: 1px dashed var(--accent); }

.markdown-body blockquote {
    margin: 1.4em 0;
    padding: 10px 20px;
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 10px 10px 0;
    color: #7a5c4c;
}
.markdown-body blockquote p { margin: 0.4em 0; }

.markdown-body code {
    background: #f3ece1;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.88em;
    color: var(--accent-deep);
    font-family: Consolas, "Courier New", monospace;
}

.markdown-body pre {
    background: #3a322b;
    color: #f0e7da;
    padding: 18px 20px;
    border-radius: 10px;
    overflow-x: auto;
    line-height: 1.6;
}
.markdown-body pre code { background: none; color: inherit; padding: 0; }

.markdown-body img { max-width: 100%; border-radius: 10px; }

.markdown-body ul, .markdown-body ol { padding-left: 1.6em; }
.markdown-body li { margin: 0.35em 0; }

.markdown-body hr { border: none; border-top: 1px dashed var(--line); margin: 2.2em 0; }

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 15px;
}
.markdown-body th, .markdown-body td {
    border: 1px solid var(--line);
    padding: 8px 12px;
    text-align: left;
}
.markdown-body th { background: var(--accent-soft); font-family: var(--font-serif); }

/* ---------- 空提示 ---------- */
.empty-tip {
    text-align: center;
    color: var(--ink-light);
    background: var(--bg-card);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 50px 20px;
}

/* ---------- 页脚 ---------- */
.site-footer {
    margin-top: 30px;
    border-top: 1px solid var(--line);
    background: var(--bg-card);
    padding: 26px 0;
}
.footer-inner { text-align: center; }
.footer-quote { font-family: var(--font-serif); color: var(--ink-light); margin: 0 0 6px; }
.footer-copy { color: var(--ink-light); font-size: 13px; margin: 0; }

/* ---------- 移动端（WAP）适配 ---------- */
@media (max-width: 640px) {
    .site-main { padding: 24px 16px; }

    .header-inner { justify-content: center; text-align: center; }
    .site-nav { width: 100%; justify-content: center; gap: 20px; }

    .hero { padding: 32px 16px; }
    .hero-title { font-size: 30px; letter-spacing: 6px; }

    .post-card { flex-direction: column; gap: 12px; padding: 20px; }
    .post-card-date {
        flex-direction: row;
        gap: 8px;
        border-right: none;
        border-bottom: 1px dashed var(--line);
        padding: 0 0 10px;
        text-align: left;
    }
    .pcd-day { font-size: 22px; }

    .post-card-title { font-size: 19px; }
    .post-card-meta { justify-content: flex-start; }
    .read-more { margin-left: 0; }

    .post-single { padding: 26px 20px; }
    .post-single-title { font-size: 24px; }
    .markdown-body { font-size: 15.5px; }
}

/* =====================================================
   微信公众号文章版式（article.php）
   ===================================================== */

.wx-article {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 677px;
    margin: 0 auto;
    padding: 36px 32px 40px;
}

/* --- 文章头部：标题 + 作者 + 公众号条 --- */
.wx-article-header { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 26px; }

.wx-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.5;
    color: #333;
    margin: 0 0 14px;
}

.wx-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: #b2b2b2;
    font-size: 14px;
    margin-bottom: 16px;
}
.wx-author { color: #576b95; }
.wx-date { color: #b2b2b2; }
.wx-meta .tag-chip { font-size: 11.5px; padding: 1px 10px; }

.wx-account {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    border-radius: 10px;
    padding: 10px 14px;
}
.wx-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--gold));
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.wx-account-info { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.wx-account-name { font-weight: 700; font-size: 15px; color: #333; }
.wx-account-sub { font-size: 12px; color: var(--ink-light); }

/* --- 正文：公众号阅读体验 --- */
.wx-content { font-size: 17px; color: #333; line-height: 1.8; letter-spacing: 0.3px; }
.wx-content p { margin: 1em 0; text-align: justify; }
.wx-content strong { color: #333; }
.wx-content a { color: #576b95; border-bottom: none; }
.wx-content h1, .wx-content h2, .wx-content h3,
.wx-content h4, .wx-content h5, .wx-content h6 { color: #333; }
.wx-content h2 {
    font-size: 20px;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    border-bottom: none;
}
.wx-content h3 { font-size: 18px; }
.wx-content blockquote {
    background: #f7f7f7;
    border-left: 3px solid #ddd;
    color: #888;
    border-radius: 0 8px 8px 0;
}
.wx-content blockquote p { text-align: left; }

/* --- 底部操作条：点赞 / 转发 --- */
.wx-actions {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.wx-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--ink);
    border-radius: 999px;
    padding: 9px 26px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}
.wx-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.wx-btn:disabled { cursor: default; }
.wx-btn-icon { font-size: 17px; line-height: 1; }
.wx-btn-count { font-size: 13px; color: var(--ink-light); min-width: 14px; }
.wx-btn-like.liked { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.wx-btn-like.liked .wx-btn-count { color: var(--accent-deep); }

/* --- 留言区 --- */
.wx-comments { margin-top: 34px; }

.wx-comments-title {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.wx-comments-count {
    font-size: 13px;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
    padding: 0 9px;
    line-height: 20px;
    font-family: var(--font-sans);
}

.wx-comments-empty { color: var(--ink-light); font-size: 14px; text-align: center; padding: 18px 0; }

.comment-flash { border-radius: 8px; padding: 10px 14px; font-size: 14px; margin: 12px 0; }
.comment-flash.ok { background: #e8f6e9; color: #2c6e31; }
.comment-flash.warn { background: #fdf3e0; color: #9c6b1e; }

.wx-comments-list { list-style: none; margin: 0; padding: 0; }

.wx-comment { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.wx-comment:last-child { border-bottom: none; }

.wx-comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.wx-comment-name { color: #576b95; font-weight: 700; font-size: 14px; }
.wx-comment-time { color: #b2b2b2; font-size: 12px; }

.wx-comment-text { font-size: 15px; color: var(--ink); }

/* --- 留言表单 --- */
.wx-comment-form { margin-top: 18px; }

.honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0;
}

.wx-comment-form-row { margin-bottom: 10px; }

.wx-comment-form input[type="text"],
.wx-comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line);
    background: var(--bg);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s ease;
}
.wx-comment-form input[type="text"]:focus,
.wx-comment-form textarea:focus { border-color: var(--accent); }
.wx-comment-form textarea { resize: vertical; min-height: 76px; }

.wx-comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 0; }
.wx-comment-hint { font-size: 12.5px; color: var(--ink-light); }

.wx-comment-submit {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 24px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
}
.wx-comment-submit:hover { background: var(--accent-deep); }

/* --- 公众号版式 · 移动端 --- */
@media (max-width: 640px) {
    .wx-article { padding: 24px 18px 30px; }
    .wx-title { font-size: 20px; }
    .wx-content { font-size: 16px; }
    .wx-actions { gap: 12px; }
    .wx-btn { padding: 8px 20px; font-size: 14px; }
    .wx-comment-form-foot { flex-direction: column; align-items: stretch; text-align: center; }
    .wx-comment-submit { width: 100%; }
}

/* =====================================================
   视频播放（文章内嵌 MP4 / 腾讯视频 iframe）
   ===================================================== */

.markdown-body video {
    display: block;
    width: 100%;
    max-height: 480px;
    background: #000;
    border-radius: 10px;
    margin: 1.2em 0;
}

.markdown-body iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: none;
    border-radius: 10px;
    margin: 1.2em 0;
}

/* =====================================================
   媒体关注栏目
   ===================================================== */

.media-card { border-left: 3px solid var(--gold); }

.media-source {
    font-size: 13px;
    color: var(--ink);
    background: var(--accent-soft);
    border-radius: 6px;
    padding: 2px 10px;
}

.media-report-time { font-size: 13px; color: var(--ink-light); }

.hint-line { font-size: 13px; color: var(--ink-light); line-height: 1.9; }

.wx-source { color: #576b95; font-size: 14px; }

/* =====================================================
   关于页（孟凡正简介）
   ===================================================== */

.about-hero {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.about-banner {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.about-hero-body { padding: 0 28px 30px; text-align: center; }

.about-avatar {
    width: 78px;
    height: 78px;
    margin: -39px auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--gold));
    color: #fff;
    font-family: var(--font-serif);
    font-size: 34px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--bg-card);
    box-shadow: 0 4px 14px rgba(120, 90, 60, 0.2);
}

.about-name { font-family: var(--font-serif); font-size: 34px; margin: 0 0 6px; letter-spacing: 4px; }

.about-role { color: var(--accent-deep); font-size: 16px; letter-spacing: 1px; margin: 0 0 8px; }

.about-tagline { color: var(--ink-light); font-size: 14px; letter-spacing: 1px; margin: 0; }

.about-intro {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 32px;
    margin-bottom: 28px;
}

/* 数字成就 */
.about-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 34px;
}

.stat {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
    padding: 22px 10px;
    box-shadow: var(--shadow);
}
.stat-num { font-family: var(--font-serif); font-size: 30px; font-weight: 700; color: var(--accent); display: block; line-height: 1.1; }
.stat-unit { font-size: 15px; color: var(--ink-light); font-weight: 400; margin-left: 2px; }
.stat-label { font-size: 13px; color: var(--ink-light); display: block; margin-top: 6px; letter-spacing: 1px; }

/* 擅长领域 */
.about-section-title {
    font-family: var(--font-serif);
    font-size: 22px;
    letter-spacing: 3px;
    margin: 34px 0 16px;
    padding-left: 14px;
    border-left: 4px solid var(--accent);
}

.about-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.field {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow);
}
.field h3 { font-family: var(--font-serif); font-size: 18px; margin: 0 0 8px; color: var(--ink); }
.field p { margin: 0; color: var(--ink-light); font-size: 14.5px; line-height: 1.85; }

/* 荣誉 */
.about-honors { margin-bottom: 8px; }
.about-honor-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.about-honor-list li {
    position: relative;
    padding: 12px 16px 12px 34px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 15px;
    color: #4a4038;
}
.about-honor-list li::before {
    content: "♪";
    position: absolute;
    left: 14px;
    top: 11px;
    color: var(--gold);
}
.about-honor-list li strong { color: var(--accent-deep); }

/* 理念引语 */
.about-quote { text-align: center; margin: 34px 0; }
.about-quote blockquote {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 22px;
    letter-spacing: 2px;
    color: var(--ink);
}
.about-quote-by { color: var(--ink-light); font-size: 14px; margin-top: 8px; }

/* 联系 */
.about-contact { text-align: center; margin-bottom: 10px; }
.about-contact p { color: #4a4038; font-size: 16px; }
.about-contact-cta { display: flex; justify-content: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }

/* 关于页移动端 */
@media (max-width: 640px) {
    .about-hero-body { padding: 0 18px 24px; }
    .about-banner { height: 140px; }
    .about-name { font-size: 28px; }
    .about-intro { padding: 22px 20px; }
    .about-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .about-fields { grid-template-columns: 1fr; }
    .about-quote blockquote { font-size: 18px; }
}
