/* ==========================================================================
   墨言笔记 - 公共样式表 style.css
   主色调: #1E9FFF (Layui 蓝)
   辅色:  #393D49 (深灰) / #f2f2f2 (背景灰)
   ========================================================================== */

/* ===== 基础变量与重置 ===== */
:root {
    --primary: #1E9FFF;
    --primary-dark: #1890e8;
    --dark: #393D49;
    --bg: #f2f2f2;
    --text: #333;
    --text-light: #888;
    --border: #e8e8e8;
    --radius: 4px;
    --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 6px 18px 0 rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

code, pre {
    font-family: Consolas, Monaco, "Courier New", monospace;
}

/* ===== 顶部导航栏 ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.site-nav {
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* logo 区域 */
.nav-logo {
    display: inline-flex;
    align-items: center;
    height: 60px;
    color: var(--dark);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-logo i {
    font-size: 24px;
    color: var(--primary);
    margin-right: 8px;
}

/* 导航菜单 */
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    height: 60px;
}

.nav-menu > li {
    height: 60px;
    line-height: 60px;
}

.nav-menu > li > a {
    display: block;
    height: 60px;
    line-height: 60px;
    color: var(--dark);
    font-size: 15px;
    padding: 0 22px;
    transition: color .2s;
}

.nav-menu > li > a:hover { color: var(--primary); }

.nav-menu > li.layui-this > a { color: var(--primary); position: relative; }
.nav-menu > li.layui-this > a::after {
    content: '';
    position: absolute;
    left: 22px; right: 22px; bottom: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

/* 搜索框 */
.nav-search {
    display: inline-flex;
    align-items: center;
    height: 60px;
    margin-left: 10px;
}

.nav-search .layui-input {
    height: 36px;
    width: 180px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #f7f7f7;
    padding-left: 16px;
}

.nav-search .layui-input:focus {
    border-color: var(--primary);
    background: #fff;
}

/* 移动端汉堡按钮(默认隐藏) */
.nav-toggle {
    display: none;
    width: 40px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    color: var(--dark);
    font-size: 22px;
    cursor: pointer;
    background: none;
    border: none;
}

/* ===== 主容器 ===== */
.main-container {
    max-width: 1200px;
    margin: 80px auto 40px;
    padding: 0 20px;
}

/* ===== 文章卡片 ===== */
.article-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}

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

.article-card .layui-card-body { padding: 20px; }

.article-card-inner {
    display: flex;
    align-items: stretch;
}

.article-cover {
    width: 30%;
    min-width: 180px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius) 0 0 var(--radius);
}

.article-cover img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
    transition: transform .4s;
}

.article-card:hover .article-cover img { transform: scale(1.05); }

.article-content {
    flex: 1;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.article-content h3 {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark);
    margin: 0 0 10px;
    line-height: 1.4;
}

.article-content h3 a { color: var(--dark); }
.article-content h3 a:hover { color: var(--primary); }

.article-excerpt {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.7;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.article-meta .tag-group { display: inline-flex; gap: 6px; }

.article-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-meta .like-btn,
.article-meta-row .like-btn {
    cursor: pointer;
    user-select: none;
    transition: color .2s;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 12px;
    padding: 0;
}

.article-meta .like-btn:hover,
.article-meta-row .like-btn:hover { color: #ff5722; }
.article-meta .like-btn.liked,
.article-meta-row .like-btn.liked { color: #ff5722; }

/* ===== 侧边栏 ===== */
.sidebar-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.sidebar-card .layui-card-header {
    border-bottom: 1px solid var(--border);
    height: 46px;
    line-height: 46px;
    padding: 0 18px;
    font-size: 15px;
    font-weight: bold;
    color: var(--dark);
}

.sidebar-card .layui-card-body { padding: 18px; }

/* 热门文章列表 */
.hot-list { list-style: none; margin: 0; padding: 0; }

.hot-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.hot-list li:last-child { border-bottom: none; }

.hot-list .rank {
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 4px;
    background: #d2d2d2;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

.hot-list li:nth-child(1) .rank { background: #ff5722; }
.hot-list li:nth-child(2) .rank { background: #ffb800; }
.hot-list li:nth-child(3) .rank { background: #1E9FFF; }

.hot-list .hot-title {
    color: var(--text);
    font-size: 13px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .2s;
}

.hot-list .hot-title:hover { color: var(--primary); }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-cloud .tag-item {
    display: inline-block;
    height: 28px;
    line-height: 28px;
    padding: 0 12px;
    background: #f2f2f2;
    color: var(--text);
    border-radius: 14px;
    font-size: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
}

.tag-cloud .tag-item:hover {
    background: var(--primary);
    color: #fff;
}

/* 归档折叠面板 */
.archive-collapse .layui-colla-item { border: none; border-bottom: 1px solid var(--border); }
.archive-collapse .layui-colla-item:last-child { border-bottom: none; }
.archive-collapse .layui-colla-title {
    height: 42px;
    line-height: 42px;
    padding: 0 15px 0 38px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    background: #fafafa;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.archive-collapse .layui-colla-title:hover {
    background: #f0f0f0;
    color: var(--primary);
}
.archive-collapse .layui-colla-title .layui-colla-icon {
    color: var(--text-light);
    transition: color .2s;
}
.archive-collapse .layui-colla-title:hover .layui-colla-icon {
    color: var(--primary);
}
.archive-collapse .layui-colla-content { padding: 10px 16px; }
.archive-collapse .archive-item {
    display: block;
    padding: 4px 0;
    color: var(--text-light);
    font-size: 13px;
}
.archive-collapse .archive-item:hover { color: var(--primary); }

/* ===== 分页 (纯 CSS 自写样式, 不依赖 layui laypage) ===== */
.pagination-wrap {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.pager {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.pager a,
.pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: all .2s;
    box-shadow: var(--shadow);
}

.pager a:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* 当前页 */
.pager .pager-num.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    cursor: default;
    box-shadow: 0 2px 6px rgba(30, 159, 255, .35);
}

.pager .pager-num.active:hover {
    transform: none;
}

/* 省略号 */
.pager .pager-ellipsis {
    border: none;
    background: transparent;
    box-shadow: none;
    color: var(--text-light);
    cursor: default;
    min-width: auto;
    padding: 0 2px;
    letter-spacing: 2px;
}

.pager .pager-ellipsis:hover {
    transform: none;
    color: var(--text-light);
}

/* 上一页 / 下一页 */
.pager .pager-prev,
.pager .pager-next {
    padding: 0 16px;
    font-weight: 500;
}

/* 禁用态 (上一页在第 1 页时) */
.pager .disabled {
    color: #c2c2c2;
    background: #fafafa;
    cursor: not-allowed;
    box-shadow: none;
}

.pager .disabled:hover {
    color: #c2c2c2;
    border-color: var(--border);
    transform: none;
}

/* ===== 页脚 ===== */
.site-footer {
    background: var(--dark);
    color: #c2c2c2;
    padding: 30px 20px;
    text-align: center;
    font-size: 13px;
    line-height: 2;
    margin-top: 40px;
}

.site-footer a { color: #c2c2c2; }
.site-footer a:hover { color: #fff; }

.site-footer .footer-links {
    margin-bottom: 8px;
}

.site-footer .footer-links a { margin: 0 10px; }

/* ===== 回到顶部按钮 ===== */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 40px;
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    background: var(--primary);
    color: #fff;
    border-radius: 4px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(30, 159, 255, .4);
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover { background: var(--primary-dark); }

/* ===== 面包屑 ===== */
.breadcrumb-wrap {
    padding: 14px 0;
    color: var(--text-light);
    font-size: 13px;
}

.breadcrumb-wrap a { color: var(--text-light); }
.breadcrumb-wrap a:hover { color: var(--primary); }
.breadcrumb-wrap .sep { margin: 0 8px; }

/* ===== 文章详情页 ===== */
.article-header {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 26px;
    color: var(--dark);
    margin: 0 0 16px;
    line-height: 1.4;
}

.article-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--text-light);
    font-size: 13px;
}

.article-meta-row .author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta-row .author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E9FFF, #667eea);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.article-meta-row .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-detail {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    line-height: 1.8;
    color: #444;
    font-size: 15px;
}

.article-detail h2 {
    font-size: 22px;
    color: var(--dark);
    margin: 28px 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

.article-detail h3 {
    font-size: 18px;
    color: var(--dark);
    margin: 22px 0 12px;
}

.article-detail p { margin: 14px 0; }

.article-detail blockquote {
    margin: 18px 0;
    padding: 12px 20px;
    background: #f7f9fc;
    border-left: 4px solid var(--primary);
    color: #555;
    border-radius: 0 4px 4px 0;
}

.article-detail blockquote p { margin: 6px 0; }

.article-detail pre {
    background: #f6f8fa;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    margin: 18px 0;
    font-size: 13px;
    line-height: 1.6;
}

.article-detail pre code {
    background: transparent;
    padding: 0;
    color: #333;
}

.article-detail code {
    background: #f2f2f2;
    padding: 2px 6px;
    border-radius: 3px;
    color: #c7254e;
    font-size: 90%;
}

.article-detail ul, .article-detail ol {
    padding-left: 24px;
    margin: 14px 0;
}

.article-detail li { margin: 6px 0; }

.article-detail img {
    border-radius: var(--radius);
    margin: 18px auto;
    box-shadow: var(--shadow);
}

/* 文章末尾标签与分享 */
.article-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.article-footer .tag-list { display: inline-flex; gap: 8px; flex-wrap: wrap; }

.share-btns .layui-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 14px;
    font-size: 13px;
}

/* 上一篇/下一篇 */
.prev-next-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.prev-next-nav .nav-card {
    flex: 1;
    background: #fff;
    padding: 18px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all .2s;
    border-left: 3px solid var(--primary);
}

.prev-next-nav .nav-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.prev-next-nav .nav-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.prev-next-nav .nav-title {
    color: var(--dark);
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prev-next-nav .nav-card.next { border-left: none; border-right: 3px solid var(--primary); text-align: right; }

/* ===== 评论区 ===== */
.comment-section {
    background: #fff;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.comment-section h3 {
    font-size: 18px;
    color: var(--dark);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

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

.comment-form .layui-textarea { min-height: 90px; border-radius: var(--radius); }

.comment-list { list-style: none; margin: 0; padding: 0; }

.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.comment-item:last-child { border-bottom: none; }

.comment-item .comment-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

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

.comment-body .comment-author {
    font-size: 14px;
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 2px;
}

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

.comment-body .comment-text {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 8px;
}

.comment-body .reply-btn {
    color: var(--text-light);
    font-size: 12px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.comment-body .reply-btn:hover { color: var(--primary); }

.comment-reply {
    margin-top: 14px;
    padding-left: 52px;
}

.comment-reply .comment-item { padding: 10px 0 10px 14px; border-bottom: none; border-left: 2px solid var(--border); }

/* ===== 关于我页面 ===== */
.page-title-area {
    background: linear-gradient(135deg, #1E9FFF 0%, #667eea 100%);
    color: #fff;
    padding: 50px 30px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.page-title-area h1 {
    font-size: 32px;
    margin: 0 0 12px;
    font-weight: bold;
}

.page-title-area p {
    font-size: 15px;
    opacity: .92;
    margin: 0;
}

.about-card {
    background: #fff;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.about-profile { text-align: center; padding: 10px 0 20px; }

.about-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 0 0 3px var(--primary), 0 4px 16px rgba(0, 0, 0, .12);
    background: linear-gradient(135deg, #1E9FFF, #667eea);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 56px;
    font-weight: bold;
}

.about-name {
    font-size: 24px;
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 6px;
}

.about-job {
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.about-location {
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 18px;
}

.about-intro {
    text-align: left;
    color: #555;
    line-height: 1.9;
    padding: 0 20px;
    font-size: 14px;
}

.section-title {
    font-size: 18px;
    color: var(--dark);
    margin: 0 0 20px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
}

/* 技能条 */
.skill-item { margin-bottom: 18px; }

.skill-item .skill-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--dark);
}

.skill-item .layui-progress { height: 14px; border-radius: 7px; }
.skill-item .layui-progress-bar { border-radius: 7px; }

/* 时间线 */
.about-timeline .layui-timeline-item { padding-bottom: 28px; }
.about-timeline .layui-timeline-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 4px;
}
.about-timeline .timeline-time { color: var(--primary); font-size: 13px; margin-bottom: 6px; display: block; }
.about-timeline .timeline-desc { color: #666; font-size: 14px; line-height: 1.7; }

/* 联系方式卡片 */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}
.contact-list li:last-child { border-bottom: none; }
.contact-list .contact-icon {
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background: #f2f2f2;
    color: var(--primary);
    border-radius: 50%;
    margin-right: 12px;
    font-size: 16px;
    flex-shrink: 0;
}
.contact-list .contact-label { color: var(--text-light); width: 60px; }
.contact-list .contact-value { color: var(--text); flex: 1; word-break: break-all; }

.qrcode-area {
    text-align: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.qrcode-area .qrcode-box {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
    background: #f2f2f2;
    background-image:
        linear-gradient(45deg, #333 25%, transparent 25%),
        linear-gradient(-45deg, #333 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #333 75%),
        linear-gradient(-45deg, transparent 75%, #333 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    border: 6px solid #fff;
    box-shadow: 0 0 0 1px var(--border);
    border-radius: 4px;
}

.qrcode-area .qrcode-tip { font-size: 12px; color: var(--text-light); }

/* ===== 留言板 ===== */
.guestbook-form-card {
    background: #fff;
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.guestbook-form-card h3 {
    font-size: 18px;
    color: var(--dark);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.guestbook-list .message-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
    transition: all .2s;
    border-left: 4px solid transparent;
}

.guestbook-list .message-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.guestbook-list .message-card.is-owner {
    border-left-color: var(--primary);
    background: linear-gradient(to right, #f0f8ff, #fff 60%);
}

.message-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.message-info { flex: 1; }
.message-info .message-name {
    font-size: 15px;
    font-weight: bold;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-info .message-name .owner-tag {
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: normal;
}

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

.message-content { color: #555; font-size: 14px; line-height: 1.8; padding-left: 62px; }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .site-nav { padding: 0 12px; }
    .main-container { padding: 0 12px; }

    /* 平板: 侧边栏下移 */
    .layui-col-md8, .layui-col-md4 { width: 100%; }
    .sidebar-column { margin-top: 0; }

    .article-cover { width: 40%; }
}

@media (max-width: 768px) {
    .nav-search { display: none; }

    /* 移动端汉堡菜单 */
    .nav-toggle { display: block; }

    .nav-menu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        height: auto;
        background: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        padding: 6px 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
        z-index: 999;
    }

    .site-nav.nav-open .nav-menu { max-height: 360px; }

    .nav-menu > li,
    .nav-menu > li > a {
        height: 46px;
        line-height: 46px;
    }

    .nav-menu > li.layui-this > a::after { display: none; }

    /* 手机: 卡片封面图全宽 */
    .article-card-inner { flex-direction: column; }
    .article-cover { width: 100%; min-width: 0; }
    .article-cover img { min-height: 180px; }
    .article-content { padding-left: 0; padding-top: 14px; }

    .article-header, .article-detail, .comment-section,
    .about-card, .guestbook-form-card { padding: 18px; }

    .article-header h1 { font-size: 20px; }

    .prev-next-nav { flex-direction: column; }
    .prev-next-nav .nav-card.next { text-align: left; border-right: none; border-left: 3px solid var(--primary); }

    .message-content { padding-left: 0; }

    .back-to-top { right: 16px; bottom: 24px; }

    .about-intro { padding: 0; }

    .article-footer { flex-direction: column; align-items: flex-start; }
}
