/* ==========
   公共前台样式（简洁大气）
   PC / 手机端自适应
   ========== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #222;
    background: #f3f5f7;
    min-width: 320px;
}

a {
    color: #1890ff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 页面主体容器 */
.container {
    max-width: 1120px;
    margin: 24px auto 32px;
    padding: 24px 28px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

/* 主内容 + 右侧栏布局（分类页 / 文章页） */
.main-with-sidebar {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.main-with-sidebar .content-main {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
}

.main-with-sidebar .sidebar-right {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #222;
    padding-bottom: 8px;
    border-bottom: 2px solid #1890ff;
}

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

.hot-rank-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    line-height: 1.4;
}

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

.hot-rank-list a {
    color: #333;
}

.hot-rank-list a:hover {
    color: #1890ff;
}

.hot-rank-list .rank-num {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    margin-right: 8px;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

.hot-rank-list li:nth-child(1) .rank-num { background: #ff4d4f; color: #fff; }
.hot-rank-list li:nth-child(2) .rank-num { background: #ff7a45; color: #fff; }
.hot-rank-list li:nth-child(3) .rank-num { background: #ffa940; color: #fff; }

/* 首页列表 / 分类列表 */
.article {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.article:last-child {
    border-bottom: none;
}

.article h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.article h2 a {
    color: #222;
}

.article h2 a:hover {
    color: #1890ff;
}

.article .info {
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}

.article .summary {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: #555;
}

/* 列表项带封面图：左侧缩略图 + 右侧标题/摘要 */
.article-with-cover {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.article-with-cover .article-cover {
    flex-shrink: 0;
    width: 160px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 6px;
    background: #f0f0f0;
}

.article-with-cover .article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    vertical-align: middle;
}

.article-with-cover .article-body {
    flex: 1;
    min-width: 0;
}

@media (max-width: 640px) {
    .article-with-cover {
        flex-direction: column;
    }
    .article-with-cover .article-cover {
        width: 100%;
        height: 140px;
    }
}

/* 正文内配图（第二段前插入）：容器居中 */
.article-cover-inline {
    width: fit-content;
    max-width: 100%;
    margin: 16px auto 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    box-sizing: border-box;
}

.article-cover-inline img {
    display: block;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* 友情链接 */
.links a {
    display: inline-block;
    margin: 4px 10px 4px 0;
    font-size: 13px;
}

.links-container {
    margin-top: -16px;
}

/* 页脚 */
footer {
    max-width: 1120px;
    margin: 40px auto 28px;
    padding: 32px 40px 36px;
    background: linear-gradient(165deg, #f8f9fb 0%, #eef1f5 50%, #e8ecf2 100%);
    border-radius: 12px;
    border-top: 4px solid #1890ff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
    font-size: 13px;
    color: #444;
    line-height: 1.85;
}

footer div {
    margin-bottom: 10px;
}

footer div:last-child {
    margin-bottom: 0;
}

footer .footer-links {
    padding: 6px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin: 12px 0 10px;
}

footer .footer-sep {
    margin: 0 10px;
    color: #bbb;
    font-weight: 300;
}

footer a {
    color: #1890ff;
    opacity: 0.94;
    transition: opacity 0.2s ease;
}

footer a:hover {
    opacity: 1;
}

/* 公共头部导航 */
.site-header {
    background: #1890ff;
    color: #fff;
    padding: 14px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.site-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

/* Logo 与 登录/注册 同一容器：Logo 左，登录注册 右 */
.site-header-logo-auth {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.site-header-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.site-header .logo {
    font-size: 22px;
    font-weight: 600;
}

.site-header .logo a {
    color: #fff;
}

.site-nav {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.site-header-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-header-auth > a {
    padding: 4px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
}

.site-header-auth > a:hover {
    background: rgba(255, 255, 255, 0.28);
    text-decoration: none;
}

.site-header-user-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.site-header-user-trigger {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.site-header-user-trigger:hover {
    background: rgba(255, 255, 255, 0.28);
}

.site-header-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 100px;
    padding: 6px 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
}

.site-header-user-dropdown-wrap.is-open .site-header-user-dropdown {
    display: block;
}

.site-header-user-dropdown a {
    display: block;
    padding: 8px 16px;
    color: #333;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.site-header-user-dropdown a:hover {
    background: #f5f5f5;
    color: #1890ff;
    text-decoration: none;
}

.site-nav a {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.96);
    font-size: 13px;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.18);
    text-decoration: none;
}

/* 文章详情页 */
.article-title {
    font-size: 26px;
    line-height: 1.4;
    margin: 0 0 12px;
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: center;
}

.article-info {
    font-size: 12px;
    color: #999;
    margin-bottom: 18px;
    text-align: center;
}

.article-content {
    font-size: 14px;
    line-height: 1.9;
    color: #333;
    word-break: break-word;
    overflow-wrap: break-word;
}

.article-content p {
    text-indent: 2em;
}

.article-content img {
    max-width: 100%;
    height: auto;
}

.article-content .article-cover-inline {
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.article-content .article-cover-inline img {
    display: block;
    max-width: 100%;
}

/* 上一篇下一篇（上下排列，避免标题过长不美观） */
.article-prev-next {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 14px;
}
.article-prev-next .prev-next-prev,
.article-prev-next .prev-next-next {
    width: 100%;
    line-height: 1.5;
    word-break: break-all;
}
.article-prev-next .prev-next-prev a,
.article-prev-next .prev-next-next a {
    color: #1890ff;
}
.article-prev-next .prev-next-next {
    padding-top: 4px;
    border-top: 1px dashed #eee;
}

/* 评论区（仿今日头条样式：简洁、留白、灰阶为主） */
.article-comments {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #ebebeb;
}
.article-comments .comment-title {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 600;
    color: #222;
}
.article-comments .comment-form-wrap {
    margin-bottom: 24px;
}
.article-comments .comment-form-wrap-inline {
    margin-left: 50px;
    margin-top: 8px;
    margin-bottom: 16px;
}
.article-comments .comment-reply-hint {
    margin: 0 0 8px;
    font-size: 13px;
    color: #666;
}
.article-comments .comment-reply-hint a {
    color: #f85959;
    margin-left: 6px;
}
.article-comments .comment-textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    resize: vertical;
    min-height: 72px;
    background: #fff;
    transition: border-color 0.15s;
}
.article-comments .comment-textarea:focus {
    outline: none;
    border-color: #c8c8c8;
}
.article-comments .comment-textarea::placeholder {
    color: #999;
}
.article-comments .comment-len-tip {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}
.article-comments .comment-submit {
    margin-top: 10px;
    padding: 7px 18px;
    font-size: 14px;
    color: #fff;
    background: #f85959;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.article-comments .comment-submit:hover {
    background: #e04a4a;
}
.article-comments .comment-msg {
    margin: 8px 0 0;
    font-size: 13px;
    color: #666;
}
.article-comments .comment-login-tip {
    margin: 0 0 20px;
    font-size: 14px;
    color: #666;
}
.article-comments .comment-login-tip a {
    color: #f85959;
}

/* 弹窗登录（评论/点赞未登录时） */
.login-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 20px;
}
.login-modal-box {
    position: relative;
    width: 100%;
    max-width: 360px;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
.login-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
}
.login-modal-close:hover {
    color: #333;
}
.login-modal-tip {
    margin: 0 0 20px;
    font-size: 16px;
    color: #333;
    text-align: center;
}
.login-modal-row {
    margin-bottom: 14px;
}
.login-modal-row label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: #555;
}
.login-modal-row input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
.login-modal-row input:focus {
    border-color: #1890ff;
    outline: none;
}
.login-modal-error {
    margin: 0 0 10px;
    font-size: 13px;
    color: #c00;
}
.login-modal-submit {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    color: #fff;
    background: #1890ff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.login-modal-submit:hover {
    background: #40a9ff;
}
.login-modal-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.login-modal-reg {
    margin: 16px 0 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}
.login-modal-reg a {
    color: #1890ff;
}

/* 举报弹窗 */
.report-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    padding: 20px;
}
.report-modal-box {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
.report-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
}
.report-modal-close:hover {
    color: #333;
}
.report-modal-tip {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333;
}
.report-reasons-list {
    margin-bottom: 12px;
}
.report-reason-item,
.report-reason-other {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}
.report-reason-item input,
.report-reason-other input {
    margin-right: 8px;
}
.report-other-wrap {
    margin: 12px 0 16px;
}
.report-other-wrap textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    resize: vertical;
}
.report-modal-error {
    margin: 0 0 10px;
    font-size: 13px;
    color: #c00;
}
.report-modal-submit {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    color: #fff;
    background: #1890ff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.report-modal-submit:hover {
    background: #40a9ff;
}
.report-modal-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.report-loading {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* 页面内轻提示（无需点击确认，自动消失） */
.toast-tips {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 15px;
    border-radius: 8px;
    z-index: 10001;
    pointer-events: none;
    animation: toast-tips-in 0.2s ease;
}
@keyframes toast-tips-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.article-comments .comment-list {
    margin-top: 16px;
}
.article-comments .comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
}
.article-comments .comment-item:last-child {
    border-bottom: none;
}
.article-comments .comment-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #1890ff;
    border-radius: 50%;
}
.article-comments .comment-body {
    flex: 1;
    min-width: 0;
}
.article-comments .comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.article-comments .comment-user {
    font-weight: 600;
    font-size: 16px;
    color: #222;
}
.article-comments .comment-time {
    font-size: 16px;
    color: #999;
}
/* 点赞数紧贴点赞图标，间距 10px；整块右对齐 */
.article-comments .comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.article-comments .comment-like-count {
    font-size: 16px;
    color: #999;
}
.article-comments .comment-like-btn {
    display: inline-block;
    flex-shrink: 0;
    color: #999;
    text-decoration: none;
}
/* 图标容器随内容宽度：未点赞 20px，已点赞 120px，点赞数始终与图标间距 10px */
.article-comments .comment-like-icon-wrap {
    display: block;
    width: auto;
    height: 20px;
}
.article-comments .comment-like-icon {
    pointer-events: none;
    display: block;
    flex-shrink: 0;
}
.article-comments .comment-like-icon-default {
    width: 20px;
    height: 20px;
}
.article-comments .comment-like-icon-liked {
    display: none;
    width: 120px;
    height: 20px;
}
.article-comments .comment-like-icon .comment-like-thumb,
.article-comments .comment-like-icon .comment-like-wrist {
    stroke: currentColor;
    fill: none;
}
.article-comments .comment-like-btn:hover .comment-like-icon-default .comment-like-thumb,
.article-comments .comment-like-btn:hover .comment-like-icon-default .comment-like-wrist {
    stroke: #f85959;
}
/* 未点赞：原始样式，灰色轮廓，高度 19px */
/* 已点赞：图示样式，整体红色填充，外围连续白边 */
.article-comments .comment-like-btn.liked {
    margin-right: 0;
    padding-right: 0;
}
.article-comments .comment-like-btn.liked .comment-like-icon-wrap {
    margin-right: 0;
    padding-right: 0;
}
.article-comments .comment-like-btn.liked .comment-like-icon-default {
    display: none;
}
.article-comments .comment-like-btn.liked .comment-like-icon-liked {
    display: block;
}
.article-comments .comment-like-btn.liked .comment-like-icon-liked .comment-like-thumb,
.article-comments .comment-like-btn.liked .comment-like-icon-liked .comment-like-wrist {
    stroke: none;
    fill: #f85959;
}
/* 点赞数>0 但非本人：与本人同布局，图标为灰描边+透明底 */
.article-comments .comment-like-btn.liked-others {
    margin-right: 0;
    padding-right: 0;
}
.article-comments .comment-like-btn.liked-others .comment-like-icon-wrap {
    margin-right: 0;
    padding-right: 0;
    overflow: visible;
}
.article-comments .comment-like-btn.liked-others .comment-like-icon-default {
    display: none;
}
.article-comments .comment-like-btn.liked-others .comment-like-icon-liked {
    display: block;
    overflow: visible;
}
.article-comments .comment-like-btn.liked-others .comment-like-icon-liked .comment-like-thumb,
.article-comments .comment-like-btn.liked-others .comment-like-icon-liked .comment-like-wrist {
    stroke: currentColor;
    fill: none;
}
.article-comments .comment-reply-btn {
    font-size: 16px;
    color: #999;
    text-decoration: none;
}
.article-comments .comment-reply-btn:hover {
    color: #f85959;
}
.article-comments .comment-reply-row {
    margin-top: 14px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.article-comments .comment-reply-row .comment-reply-btn {
    margin-left: 0;
}
.article-comments .comment-reply-row .comment-delete-btn,
.article-comments .comment-reply-row .comment-report-btn {
    margin-left: auto;
}
.article-comments .comment-delete-btn {
    font-size: 14px;
    color: #999;
    text-decoration: none;
}
.article-comments .comment-delete-btn:hover {
    color: #f85959;
}
.article-comments .comment-report-btn {
    font-size: 8px;
    color: #999;
    line-height: 1;
}
.article-comments .comment-report-btn:hover {
    color: #666;
}
.article-comments .comment-content {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
}
.article-comments .comment-content .comment-at {
    color: #f85959;
    font-weight: 500;
}
.article-comments .comment-replies-wrap {
    margin-top: 4px;
    margin-left: 50px;
    padding-left: 0;
}
.article-comments .comment-replies-toggle {
    display: inline-block;
    margin-left: 1em;
    font-size: 16px;
    color: #999;
    text-decoration: none;
}
.article-comments .comment-replies-toggle:hover {
    color: #f85959;
}
.article-comments .comment-replies {
    margin-top: 8px;
    padding-top: 4px;
    border-left: none;
}
.article-comments .comment-replies .comment-item {
    padding: 10px 0;
}
.article-comments .comment-replies .comment-avatar {
    width: 32px;
    height: 32px;
    line-height: 32px;
    font-size: 14px;
    background: #1890ff;
    color: #fff;
}
.article-comments .comment-load-more-wrap {
    margin: 20px 0;
    padding: 12px 0;
    text-align: center;
}
.article-comments .comment-load-more-btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 14px;
    color: #1890ff;
    text-decoration: none;
    border: 1px solid #1890ff;
    border-radius: 4px;
}
.article-comments .comment-load-more-btn:hover {
    color: #fff;
    background: #1890ff;
    text-decoration: none;
}
.article-comments .comment-empty {
    margin: 0;
    padding: 32px 0;
    color: #999;
    font-size: 14px;
    text-align: center;
}

/* 标签区域 */
.tags {
    margin-top: 20px;
    font-size: 13px;
}

.tags a {
    display: inline-block;
    margin: 4px 8px 4px 0;
    padding: 2px 10px;
    border-radius: 999px;
    background: #f0f5ff;
    color: #1890ff;
}

/* 标签列表页 */
.tag-page h1 {
    margin-bottom: 18px;
}


/* 搜索表单 */
form[method='get'] input[type='text'] {
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
}

form[method='get'] button {
    margin-left: 6px;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid #1890ff;
    background: #1890ff;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

form[method='get'] button:hover {
    background: #40a9ff;
    border-color: #40a9ff;
}

/* 基础标题间距 */
h1 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 600;
}

/* index2 分类导读：各大类区块 + 更多按钮 */
.category-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.category-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.category-section-title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 600;
    color: #1890ff;
    padding-bottom: 8px;
    border-bottom: 2px solid #1890ff;
}

.category-section .article {
    padding: 12px 0;
}

.category-more {
    margin: 14px 0 0;
    text-align: right;
}

.btn-more {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    border: 1px solid #1890ff;
    background: #fff;
    color: #1890ff;
    font-size: 13px;
}

.btn-more:hover {
    background: #1890ff;
    color: #fff;
    text-decoration: none;
}

.category-section .no-articles {
    margin: 0;
    padding: 12px 0;
    font-size: 13px;
    color: #999;
}

/* 分页 */
.pagination {
    margin-top: 16px;
    font-size: 13px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.pagination a {
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    background: #fff;
}

.pagination a:hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* 广告位 */
.ad-block {
    margin-bottom: 16px;
}

.ad-block.ad-home-slide {
    margin-bottom: 20px;
}

.ad-block.ad-article-top,
.ad-block.ad-article-bottom {
    margin: 16px 0;
}

/* 全站漂浮广告 */
.ad-float {
    position: fixed;
    z-index: 9999;
}

.ad-pc-right-bottom {
    right: 16px;
    bottom: 16px;
}

.ad-mobile-bottom {
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: none;
}

@media (max-width: 768px) {
    .ad-pc-right-bottom {
        display: none;
    }
    .ad-mobile-bottom {
        display: block;
    }
}

/* ========== PC / 手机端自适应 ========== */

/* 平板及以下：侧栏下移、缩小留白与字号 */
@media (max-width: 992px) {
    .container {
        margin-left: 12px;
        margin-right: 12px;
        padding: 20px 16px;
    }

    .main-with-sidebar {
        gap: 20px;
    }

    .main-with-sidebar .sidebar-right {
        width: 260px;
    }

    .site-header-inner {
        padding: 0 4px;
    }

    footer {
        margin-left: 12px;
        margin-right: 12px;
        padding: 20px 18px 24px;
    }
}

/* 手机端主断点 */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .container {
        margin: 12px 10px 20px;
        padding: 16px 14px;
        border-radius: 6px;
    }

    .main-with-sidebar {
        flex-direction: column;
        gap: 20px;
    }

    .main-with-sidebar .sidebar-right {
        width: 100%;
        order: 2;
    }

    .main-with-sidebar .content-main {
        order: 1;
    }

    .sidebar-title {
        font-size: 15px;
        padding-bottom: 6px;
    }

    .hot-rank-list li {
        padding: 10px 0;
        font-size: 14px;
    }

    .tags.sidebar-tags {
        margin-top: 12px;
    }

    .tags.sidebar-tags a {
        margin: 6px 8px 6px 0;
        padding: 4px 12px;
        font-size: 13px;
    }

    /* 头部：垂直排布、触控友好 */
    .site-header {
        padding: 12px 14px;
    }

    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-header .logo {
        font-size: 20px;
    }

    .site-header .logo img {
        height: 28px !important;
    }

    .site-nav {
        margin-top: 12px;
        gap: 8px;
    }

    .site-nav a {
        padding: 8px 12px;
        font-size: 14px;
    }

    /* 列表与标题 */
    h1 {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .article {
        padding: 14px 0;
    }

    .article h2 {
        font-size: 17px;
        line-height: 1.45;
    }

    .article .info,
    .article .summary {
        font-size: 13px;
    }

    /* 文章详情 */
    .article-title {
        font-size: 22px;
        line-height: 1.4;
        margin-bottom: 10px;
    }

    .article-info {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .article-content {
        font-size: 15px;
        line-height: 1.85;
    }

    .tags {
        margin-top: 16px;
        font-size: 13px;
    }

    .tags a {
        padding: 4px 10px;
        margin: 4px 6px 4px 0;
    }

    /* 友情链接 */
    .links-container {
        margin-top: -12px;
    }

    .links a {
        font-size: 14px;
        margin: 6px 12px 6px 0;
    }

    /* 页脚 */
    footer {
        margin: 24px 10px 16px;
        padding: 20px 16px 24px;
        font-size: 13px;
    }

    /* 分页：可换行 */
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 14px;
    }

    .pagination a {
        padding: 6px 12px;
    }

    /* 搜索表单：块级、大触控区 */
    form[method='get'] {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
    }

    form[method='get'] input[type='text'] {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 16px;
    }

    form[method='get'] button {
        padding: 10px 18px;
        font-size: 15px;
    }

    /* 广告块 */
    .ad-block {
        margin-bottom: 14px;
    }

    .ad-block.ad-article-top,
    .ad-block.ad-article-bottom {
        margin: 14px 0;
    }

    .ad-mobile-bottom {
        left: 10px;
        right: 10px;
        bottom: 10px;
        transform: none;
        max-width: 100%;
    }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .container {
        margin: 10px 8px 16px;
        padding: 14px 12px;
    }

    .site-header {
        padding: 10px 12px;
    }

    .site-header .logo {
        font-size: 18px;
    }

    .site-nav a {
        padding: 6px 10px;
        font-size: 13px;
    }

    h1 {
        font-size: 18px;
    }

    .article h2 {
        font-size: 16px;
    }

    .article-title {
        font-size: 20px;
    }

    footer {
        margin: 20px 8px 12px;
        padding: 18px 12px 20px;
    }
}

