/**
 * JianYue - 主题前端主样式
 */

/* ===== CSS变量 ===== */
:root {
    --primary-color: #217ff9;
    --content-bg: #ffffff;
    --body-bg: #f5f6f7;
    --text-color: #333333;
    --light-text: #888888;
    --border-color: #e8e8e8;
    --header-height: 60px;
    --container-width: 1200px;
    --sidebar-width: 300px;
}

/* ===== 重置和基础样式 ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--body-bg);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1a6dd6;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== 头部 ===== */
.site-header {
    background: var(--content-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 999;
    height: var(--header-height);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-title {
    font-size: 22px;
    font-weight: 700;
}

.site-title a {
    color: var(--text-color);
}

/* 导航 */
.site-nav .nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
}

.site-nav .nav-menu li a {
    display: block;
    padding: 8px 16px;
    color: var(--text-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.site-nav .nav-menu li a:hover,
.site-nav .nav-menu li.current-menu-item a {
    color: var(--primary-color);
    background: rgba(33, 127, 249, 0.08);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    transition: all 0.3s ease;
}

/* ===== 主内容区域 ===== */
main.container {
    display: flex;
    gap: 30px;
    padding-top: 30px;
    padding-bottom: 40px;
    min-height: calc(100vh - var(--header-height) - 200px);
}

/* 侧边栏在左侧 */
body.sidebar-left main.container {
    flex-direction: row-reverse;
}

/* 无侧边栏 */
body.no-sidebar .sidebar {
    display: none;
}
body.no-sidebar .content-wrap {
    max-width: 100%;
}

.content-wrap {
    flex: 1;
    min-width: 0;
}

/* ===== 文章列表 ===== */
article {
    background: var(--content-bg);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

article:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.entry-title {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.entry-title a {
    color: var(--text-color);
}

.entry-title a:hover {
    color: var(--primary-color);
}

.entry-meta {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.entry-meta i {
    margin-right: 3px;
}

.entry-summary {
    color: #666;
    line-height: 1.8;
}

.entry-content {
    line-height: 1.9;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin: 1.5em 0 0.8em;
}

.entry-content p {
    margin-bottom: 1em;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 10px 20px;
    margin: 15px 0;
    background: rgba(33, 127, 249, 0.04);
    color: #555;
}

.entry-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.tags-links a {
    display: inline-block;
    padding: 3px 12px;
    margin: 3px 5px 3px 0;
    background: rgba(33, 127, 249, 0.08);
    border-radius: 20px;
    font-size: 13px;
    color: var(--primary-color);
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

.widget {
    background: var(--content-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

/* ===== 分页 ===== */
.pagination {
    text-align: center;
    padding: 20px 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 6px 14px;
    margin: 0 3px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.pagination .page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .page-numbers:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ===== 底部 ===== */
.site-footer {
    background: #2c3e50;
    color: #bdc3c7;
    padding: 30px 0;
    font-size: 14px;
}

.footer-container {
    text-align: center;
}

.footer-container a {
    color: #ecf0f1;
}

.footer-info p {
    margin-bottom: 5px;
}

/* ===== 页脚小工具区域 ===== */
.footer-widget-area {
    background: #1a252f;
    padding: 30px 0 20px;
    color: #bdc3c7;
}

.footer-widget-area .widget {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 10px 0;
}

.footer-widget-area .widget-title-wrap {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.footer-widget-area .widget-title {
    color: #ecf0f1;
}

.footer-widget-area .widget a {
    color: #bdc3c7;
}

.footer-widget-area .widget a:hover {
    color: #fff;
}

.footer-code {
    margin-top: 10px;
    font-size: 13px;
    opacity: 0.8;
}

/* ===== 404页面 ===== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-title {
    font-size: 120px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 20px;
}

.error-description {
    font-size: 18px;
    color: var(--light-text);
    margin-bottom: 30px;
}

.btn-home {
    display: inline-block;
    padding: 10px 30px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.btn-home:hover {
    background: #1a6dd6;
    color: #fff;
}

/* ===== 归档页 ===== */
.archive-header {
    background: var(--content-bg);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.archive-title {
    font-size: 24px;
    margin-bottom: 5px;
}

.archive-description {
    color: var(--light-text);
}

/* ===== 全宽小工具区域 ===== */
.fluid-widget-wrap {
    width: 100%;
    padding: 0;
}

.fluid-widget-wrap .widget {
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
}

/* ===== 小工具通用样式 ===== */
.widget-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.widget-title-wrap .widget-title {
    font-size: 16px;
    margin: 0;
    padding: 0;
    border: none;
}

.widget-title-wrap .title-subtitle {
    font-size: 12px;
    color: var(--light-text);
    margin-left: 10px;
    font-weight: normal;
}

.widget-title-wrap .widget-more {
    font-size: 13px;
    color: var(--light-text);
    white-space: nowrap;
}

.widget-title-wrap .widget-more:hover {
    color: var(--primary-color);
}

/* ===== 搜索小工具 ===== */
.widget-search-box .search-form {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.widget-search-box .search-input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
}

.widget-search-box .search-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.widget-search-box .search-btn:hover {
    opacity: 0.85;
}

.widget-search-box .search-hot-keywords {
    margin-top: 12px;
    font-size: 13px;
}

.widget-search-box .hot-title {
    color: var(--light-text);
}

.widget-search-box .hot-keyword {
    display: inline-block;
    padding: 2px 10px;
    margin: 3px 4px;
    background: rgba(33, 127, 249, 0.08);
    border-radius: 12px;
    color: var(--primary-color);
    font-size: 12px;
}

.widget-search-box .hot-keyword:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ===== 文章列表小工具 ===== */
.widget-posts-list,
.widget-hot-posts,
.widget-comments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-posts-item,
.hot-posts-item,
.comments-item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.widget-posts-item:last-child,
.hot-posts-item:last-child,
.comments-item:last-child {
    border-bottom: none;
}

.widget-posts-item a,
.hot-posts-item a,
.comments-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

.widget-posts-item a:hover,
.hot-posts-item a:hover {
    color: var(--primary-color);
}

.widget-posts-thumb img,
.hot-posts-thumb img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.widget-posts-info {
    flex: 1;
    min-width: 0;
}

.widget-posts-title,
.hot-posts-title {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.widget-posts-date,
.hot-posts-meta {
    display: block;
    font-size: 12px;
    color: var(--light-text);
    margin-top: 4px;
}

.hot-posts-meta i {
    margin-left: 8px;
}

/* ===== 热榜排名徽章 ===== */
.hot-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #ddd;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.hot-rank.rank-1 {
    background: #f44c4c;
}

.hot-rank.rank-2 {
    background: #ff876b;
}

.hot-rank.rank-3 {
    background: #ffb74d;
}

/* ===== 公告小工具 ===== */
.widget-notice-wrap {
    overflow: hidden;
    height: 40px;
    position: relative;
}

.widget-notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.notice-item {
    height: 40px;
    line-height: 40px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.notice-item a {
    color: var(--text-color);
    font-size: 14px;
}

.notice-item a:hover {
    color: var(--primary-color);
}

/* ===== 标签云小工具 ===== */
.widget-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.widget-tag-cloud .tag-item {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(33, 127, 249, 0.06);
    color: var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s;
}

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

/* ===== 最新评论小工具 ===== */
.comments-item a {
    align-items: flex-start;
}

.comment-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.comment-author {
    display: block;
    font-size: 13px;
    color: var(--primary-color);
}

.comment-text {
    display: block;
    font-size: 13px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 2px 0;
}

.comment-post-title {
    display: block;
    font-size: 11px;
    color: var(--light-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== Tab小工具 ===== */
.widget-tab-nav {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 15px;
}

.widget-tab-nav .tab-nav-item {
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    color: var(--light-text);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.widget-tab-nav .tab-nav-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.widget-tab-nav .tab-nav-item:hover {
    color: var(--primary-color);
}

.widget-tab-content .tab-pane {
    display: none;
}

.widget-tab-content .tab-pane.active {
    display: block;
}

/* ===== 图标卡片小工具 ===== */
.widget-icon-cards {
    display: grid;
    gap: 10px;
}

.widget-icon-cards.cards-col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.widget-icon-cards.cards-col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.widget-icon-cards.cards-col-4 {
    grid-template-columns: repeat(4, 1fr);
}

.widget-icon-cards.cards-col-6 {
    grid-template-columns: repeat(6, 1fr);
}

.icon-card-item {
    text-align: center;
}

.icon-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 8px;
    background: rgba(33, 127, 249, 0.03);
    border-radius: 6px;
    color: var(--text-color);
    transition: all 0.3s;
    text-decoration: none;
}

.icon-card-link:hover {
    background: var(--primary-color);
    color: #fff;
}

.icon-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.icon-card-link:hover .icon-card-icon {
    color: #fff;
}

.icon-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.icon-card-desc {
    font-size: 12px;
    color: var(--light-text);
}

.icon-card-link:hover .icon-card-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== 幻灯片小工具 ===== */
.widget-slider-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.widget-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.widget-slider .slider-item {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
}

.widget-slider .slider-item.active {
    display: block;
}

.slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #fff;
}

.slider-title {
    font-size: 18px;
    margin: 0 0 5px;
    color: #fff;
}

.slider-desc {
    font-size: 14px;
    margin: 0;
    opacity: 0.9;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
}

.slider-arrow:hover {
    background: var(--primary-color);
    color: #fff;
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot.active {
    background: #fff;
    width: 20px;
    border-radius: 4px;
}

/* ===== 用户信息卡小工具 ===== */
.widget-user-card {
    overflow: hidden;
    border-radius: 8px;
}

.user-card-cover {
    height: 80px;
    background: linear-gradient(135deg, #217ff9 0%, #4f9cf9 100%);
}

.user-card-body {
    padding: 15px;
    text-align: center;
    margin-top: -35px;
}

.user-card-avatar {
    margin-bottom: 10px;
}

.user-card-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.user-card-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.user-card-tip {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 12px;
}

.user-card-links,
.user-card-btns {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.user-card-link,
.btn-login,
.btn-register {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s;
}

.user-card-link {
    color: var(--light-text);
    background: rgba(33, 127, 249, 0.08);
}

.user-card-link:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-login {
    background: var(--primary-color);
    color: #fff;
}

.btn-login:hover {
    opacity: 0.85;
    color: #fff;
}

.btn-register {
    background: rgba(33, 127, 249, 0.1);
    color: var(--primary-color);
}

.btn-register:hover {
    background: var(--primary-color);
    color: #fff;
}

/* ===== 作者信息卡小工具 ===== */
.widget-author-card {
    text-align: center;
}

.author-card-avatar img {
    border-radius: 50%;
    margin-bottom: 10px;
}

.author-card-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.author-card-name a {
    color: var(--text-color);
}

.author-card-bio {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 8px;
    line-height: 1.6;
}

.author-card-count {
    font-size: 13px;
    color: var(--light-text);
    margin-bottom: 12px;
}

.author-card-btn {
    display: inline-block;
    padding: 6px 20px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
}

.author-card-btn:hover {
    opacity: 0.85;
    color: #fff;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    main.container {
        flex-direction: column;
        padding-top: 20px;
    }

    .sidebar {
        width: 100%;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--content-bg);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        padding: 15px;
    }

    .site-nav.active {
        display: block;
    }

    .site-nav .nav-menu {
        flex-direction: column;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .widget-icon-cards.cards-col-4,
    .widget-icon-cards.cards-col-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   AJAX系统样式 / AJAX System Styles
   ============================================ */

/* ---------- 加载动画 ---------- */
.ajax-loader {
    text-align: center;
    padding: 30px 0;
}
.loader-spin {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: jySpin 0.8s linear infinite;
}
@keyframes jySpin {
    to { transform: rotate(360deg); }
}
.posts-list.loading,
.comment-list.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ---------- AJAX消息提示 ---------- */
.ajax-msg {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 99999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.ajax-msg.show { opacity: 1; }
.ajax-msg-error {
    background: #fee;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}
.ajax-msg-success {
    background: #e8f5e9;
    color: #27ae60;
    border: 1px solid #c3e6cb;
}
.ajax-msg-info {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

/* ---------- Toast消息 ---------- */
.jy-toast {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 99999;
    background: #333;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.jy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.jy-toast-error { background: #e74c3c; }
.jy-toast-success { background: #27ae60; }
.jy-toast-info { background: #1976d2; }
.jy-toast-warning { background: #f39c12; }

/* ---------- 模态框 ---------- */
.jy-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99990;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 20px 40px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.jy-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.jy-modal {
    width: 100%;
    max-width: 520px;
    margin: auto;
}
.jy-modal-inner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}
.jy-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
}
.jy-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.jy-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}
.jy-modal-close:hover { color: #333; }
.jy-modal-body { padding: 24px; }

/* ---------- 分享弹窗 ---------- */
.share-modal-content h3 {
    margin: 0 0 20px;
    font-size: 16px;
    text-align: center;
}
.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; color: #fff; }
.share-weibo { background: #e6162d; }
.share-qq { background: #12b7f5; }
.share-wechat { background: #07c160; }
.share-copy { background: #666; }

/* ---------- 搜索建议下拉 ---------- */
.jy-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
}
.jy-search-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.jy-search-suggestions li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.15s;
}
.jy-search-suggestions li a:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}
.jy-search-suggestions li a .time {
    font-size: 12px;
    color: #999;
    margin-left: 12px;
    white-space: nowrap;
}
.jy-search-suggestions .no-result {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ---------- 加载更多按钮 ---------- */
.load-more-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 30px auto;
    padding: 12px 0;
    text-align: center;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}
.load-more-btn:hover {
    background: #eee;
    color: var(--primary-color);
}
.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}
.load-more-btn:disabled {
    cursor: default;
    color: #ccc;
    background: #fafafa;
}

/* ---------- 点赞状态 ---------- */
[data-action="like"].liked { color: #e74c3c; }
[data-action="like"].loading { pointer-events: none; opacity: 0.6; }

/* ===== 返回顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    opacity: 0.85;
}

/* ===== 暗黑模式切换按钮 ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 6px;
    color: var(--text-color);
    border-radius: 50%;
    transition: all 0.3s;
}
.dark-mode-toggle:hover {
    background: rgba(33, 127, 249, 0.1);
    color: var(--primary-color);
}

/* ===== 页面加载动画 ===== */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--content-bg);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-spinner {
    display: flex;
    gap: 8px;
}
.loading-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: loadingBounce 1.4s ease-in-out infinite both;
}
.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }
@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== 面包屑导航 ===== */
.breadcrumb-nav {
    background: var(--content-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    font-size: 13px;
    color: var(--light-text);
}
.breadcrumb-nav a {
    color: var(--light-text);
}
.breadcrumb-nav a:hover {
    color: var(--primary-color);
}
.breadcrumb-nav .breadcrumb-delimiter {
    margin: 0 8px;
    color: #ccc;
}
.breadcrumb-nav .breadcrumb-current {
    color: var(--text-color);
}

/* ===== 相关文章 ===== */
.related-posts {
    background: var(--content-bg);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.related-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}
.related-posts-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.related-post-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.related-thumb img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.related-post-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.related-post-title:hover {
    color: var(--primary-color);
}
.related-post-date {
    font-size: 12px;
    color: var(--light-text);
    white-space: nowrap;
}
@media (max-width: 768px) {
    .related-posts-list {
        grid-template-columns: 1fr;
    }
}
