/* ======================================================
   xunwei.css — 寻味博文 · 专属样式
   暖橙色调 · 大图视觉化 · 与三餐解忧铺风格统一
====================================================== */

.xunwei-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 40px;
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding-top: 80px;
}

/* ---------- 页眉 ---------- */
.xunwei-header {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, rgba(255, 138, 92, 0.06), rgba(249, 199, 79, 0.10));
    border-radius: 40px;
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
}
/* 🆕 Logo 样式（去边框、放大尺寸） */
.page-logo {
    width: 320px; /* 🌟 放大至 140px，视觉更大气、更具品牌感 */
    height: 100px;
    object-fit: contain; /* 保持图片原始比例，防止拉伸变形 */
    margin-top: -24px;
    margin-bottom: -24px; /* 微调位置，让标题更贴近 Logo */
    
    /* 🌟 已移除 border-radius 和 box-shadow，呈现图片最干净的边缘 */
    
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.page-logo:hover {
    /* 悬停动画保留，但幅度稍微收敛，更适合大尺寸图片 */
    transform: scale(1.05) rotate(-2deg); 
}
.xunwei-main-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary, #2D2A24);
    margin: 0 0 8px;
}
.xunwei-main-title .highlight {
    color: #FF8A5C;
}
.xunwei-subhead {
    font-size: 1.1rem;
    color: var(--text-secondary, #5B5348);
    max-width: 600px;
    margin: 6px auto 0;
}
.xunwei-subhead a {
    color: #FF8A5C;
    font-weight: 700;
    text-decoration: none;
}
.xunwei-subhead a:hover {
    text-decoration: underline;
}
.xunwei-header-decoration {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}
.xunwei-header-decoration span {
    width: 40px;
    height: 4px;
    background: #FF8A5C;
    border-radius: 4px;
    opacity: 0.5;
}
.xunwei-header-decoration span:nth-child(2) {
    width: 60px;
    opacity: 0.8;
}
.xunwei-header-decoration span:nth-child(3) {
    width: 40px;
    opacity: 0.5;
}

/* ---------- 博文网格 ---------- */
.xunwei-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
    margin-top: 10px;
}

/* ---------- 卡片 ---------- */
.xunwei-card {
    background: var(--card-bg, #ffffff);
    border-radius: 24px;
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.04));
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.xunwei-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover, 0 16px 40px rgba(0,0,0,0.10));
}
.xunwei-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.xunwei-card-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%;
    background-size: cover;
    background-position: center;
    background-color: #f0ebe5;
    flex-shrink: 0;
}
.xunwei-card-image-placeholder {
    background: linear-gradient(135deg, #f7f1eb, #ede6df);
    display: flex;
    align-items: center;
    justify-content: center;
}
.xunwei-placeholder-icon {
    font-size: 4rem;
    opacity: 0.35;
}
.xunwei-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 138, 92, 0.88);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 30px;
    letter-spacing: 0.3px;
}
.xunwei-card-date-badge {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 4px 16px;
    border-radius: 30px;
    letter-spacing: 0.3px;
}
.xunwei-card-body {
    padding: 20px 22px 22px;
}
.xunwei-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--text-primary, #2D2A24);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.xunwei-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary, #5B5348);
    line-height: 1.6;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.xunwei-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: var(--text-light, #999);
    border-top: 1px solid var(--border-glass, rgba(0,0,0,0.05));
    padding-top: 14px;
}
.xunwei-card-author {
    color: var(--text-secondary, #5B5348);
}
.xunwei-card-readmore {
    color: #FF8A5C;
    font-weight: 600;
    transition: transform 0.2s;
}
.xunwei-card-readmore:hover {
    transform: translateX(4px);
}

/* 最新一篇（突出展示） */
.xunwei-card.featured-card {
    grid-column: 1 / -1;
    border-color: #FF8A5C;
    box-shadow: 0 8px 36px rgba(255, 138, 92, 0.16);
    background: linear-gradient(135deg, #fffcf8, #fff5ed);
}
.xunwei-card.featured-card .xunwei-card-image {
    padding-top: 45%;
}
.xunwei-card.featured-card .xunwei-card-title {
    font-size: 1.8rem;
}
.xunwei-card.featured-card .xunwei-card-excerpt {
    font-size: 1.05rem;
    -webkit-line-clamp: 4;
}
.xunwei-card.featured-card .xunwei-card-body {
    padding: 24px 28px 26px;
}
[data-theme="dark"] .xunwei-card.featured-card {
    background: #2f2822;
    border-color: #FF8A5C;
}

/* ---------- 暗色主题 ---------- */
[data-theme="dark"] .xunwei-card {
    background: var(--card-bg, #2a241f);
    border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .xunwei-card-title {
    color: #f0e8e0;
}
[data-theme="dark"] .xunwei-card-excerpt {
    color: #b0a898;
}
[data-theme="dark"] .xunwei-card-meta {
    color: #7a7068;
}
[data-theme="dark"] .xunwei-card-author {
    color: #b0a898;
}
[data-theme="dark"] .xunwei-card-image-placeholder {
    background: linear-gradient(135deg, #2a241f, #1f1b17);
}

/* ---------- 分页 ---------- */
.xunwei-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}
.xunwei-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 40px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
    color: var(--text-secondary, #5B5348);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.xunwei-pagination .page-numbers.current {
    background: #FF8A5C;
    color: #fff;
    border-color: #FF8A5C;
}
.xunwei-pagination .page-numbers:hover:not(.current) {
    background: rgba(255, 138, 92, 0.08);
    border-color: #FF8A5C;
}

/* ---------- 登录提示 ---------- */
.xunwei-login-prompt {
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
    background: var(--card-bg, #fff);
    border-radius: 30px;
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
}
.xunwei-login-prompt p {
    font-size: 1rem;
    color: var(--text-secondary, #5B5348);
    margin-bottom: 14px;
}
.xunwei-login-btn {
    display: inline-block;
    padding: 10px 32px;
    border-radius: 40px;
    background: #FF8A5C;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.xunwei-login-btn:hover {
    background: #e07446;
}

/* ---------- 空状态 ---------- */
.xunwei-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg, #fff);
    border-radius: 40px;
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
}
.xunwei-empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}
.xunwei-empty-state h3 {
    font-size: 1.4rem;
    margin: 0 0 8px;
    color: var(--text-primary, #2D2A24);
}
.xunwei-empty-state p {
    color: var(--text-secondary, #5B5348);
    max-width: 400px;
    margin: 0 auto;
}

/* ---------- 底部导航 ---------- */
.xunwei-bottom-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 32px;
    margin: 50px 0 30px;
    padding: 18px 28px;
    background: var(--card-bg, #ffffff);
    backdrop-filter: blur(6px);
    border-radius: 60px;
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
    box-shadow: var(--shadow-sm);
}
.xunwei-bottom-nav a {
    color: var(--text-primary, #2D2A24);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    padding: 6px 10px;
    border-radius: 40px;
}
.xunwei-bottom-nav a i {
    color: #FF8A5C;
}
.xunwei-bottom-nav a:hover {
    color: #FF8A5C;
    background: rgba(255, 138, 92, 0.08);
}
.xunwei-bottom-nav a.active {
    color: #FF8A5C;
    background: rgba(255, 138, 92, 0.12);
}
[data-theme="dark"] .xunwei-bottom-nav {
    background: var(--card-bg, #2a241f);
    border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .xunwei-bottom-nav a {
    color: #e0d8d0;
}

/* ---------- 页脚 ---------- */
.xunwei-footer-note {
    margin-top: 10px;
    margin-bottom: 30px;
    color: var(--text-secondary, #5B5348);
    font-size: 0.85rem;
    opacity: 0.7;
    text-align: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .xunwei-container {
        padding-top: 70px;
        padding-left: 16px;
        padding-right: 16px;
    }
    .xunwei-main-title {
        font-size: 2rem;
    }
    .xunwei-subhead {
        font-size: 1rem;
    }
    .xunwei-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .xunwei-card.featured-card {
        grid-column: 1;
    }
    .xunwei-card.featured-card .xunwei-card-title {
        font-size: 1.4rem;
    }
    .xunwei-card.featured-card .xunwei-card-image {
        padding-top: 66.67%;
    }
    .xunwei-bottom-nav {
        gap: 10px 16px;
        padding: 14px 16px;
        border-radius: 40px;
    }
    .xunwei-bottom-nav a {
        font-size: 0.9rem;
    }
    .xunwei-card-excerpt {
        font-size: 0.9rem;
    }
}

/* ======================================================
   寻味博文 SPA 新增样式
   ===================================================== */

/* --- 主展示区 --- */
.xunwei-main {
    margin: 30px 0 40px;
    background: var(--card-bg, #fff);
    border-radius: 24px;
    padding: 30px 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-glass, rgba(0,0,0,0.06));
}
.xunwei-loading, .xunwei-hint {
    text-align: center;
    color: var(--text-secondary, #5B5348);
    padding: 40px 0;
    font-size: 1.1rem;
}
.xunwei-single-article {
    max-width: 100%;
}
.xunwei-single-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary, #5B5348);
    margin-bottom: 10px;
}
.xunwei-single-type {
    background: #FF8A5C;
    color: #fff;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}
.xunwei-single-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 10px 0 20px;
    color: var(--text-primary, #2D2A24);
}
.xunwei-single-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary, #2D2A24);
}
.xunwei-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
}

/* --- 点赞 --- */
.xunwei-single-footer {
    margin: 30px 0 20px;
    border-top: 1px solid var(--border-glass);
    padding-top: 20px;
}
.xunwei-like-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s;
}
.xunwei-like-btn:hover {
    transform: scale(1.1);
}
.xunwei-like-btn.liked {
    color: #e74c3c;
}
.like-count {
    font-size: 1.2rem;
    font-weight: 600;
}

/* --- 评论 --- */
.xunwei-comments-section {
    margin-top: 30px;
    border-top: 1px solid var(--border-glass);
    padding-top: 20px;
}
.xunwei-comments-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}
.xunwei-comments-list {
    margin-bottom: 20px;
}
.xunwei-comment {
    background: var(--bg-primary, #f9f5f0);
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
}
.xunwei-comment strong {
    color: var(--text-primary, #2D2A24);
}
.xunwei-comment-date {
    font-size: 0.8rem;
    color: var(--text-light, #999);
    margin-left: 12px;
}
.xunwei-comment p {
    margin: 4px 0 0;
    color: var(--text-secondary, #5B5348);
}
.xunwei-no-comment {
    color: var(--text-light, #999);
}
.xunwei-comment-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.xunwei-comment-form textarea {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    background: var(--bg-primary, #f9f5f0);
    font-family: inherit;
    resize: vertical;
}
.xunwei-comment-form button {
    padding: 10px 24px;
    background: #FF8A5C;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.xunwei-comment-form button:hover {
    background: #e07446;
}

/* --- 卡片网格（3x2）--- */
.xunwei-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}
.xunwei-card {
    background: var(--card-bg, #fff);
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.xunwei-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.xunwei-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--text-primary, #2D2A24);
}
.xunwei-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary, #5B5348);
    margin-bottom: 8px;
}
.xunwei-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary, #5B5348);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- 分页 --- */
.xunwei-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0 20px;
}
.xunwei-pagination .page-numbers {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-glass);
    border-radius: 30px;
    padding: 6px 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.xunwei-pagination .page-numbers.current {
    background: #FF8A5C;
    color: #fff;
    border-color: #FF8A5C;
}
.xunwei-pagination .page-numbers:hover {
    background: rgba(255,138,92,0.1);
}

/* --- 标签栏 --- */
.xunwei-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}
.xunwei-tab {
    padding: 8px 24px;
    border-radius: 30px;
    border: 1px solid var(--border-glass);
    background: var(--card-bg, #fff);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.xunwei-tab.active {
    background: #FF8A5C;
    color: #fff;
    border-color: #FF8A5C;
}
.xunwei-tab:hover {
    background: rgba(255,138,92,0.1);
}

/* 响应式 */
@media (max-width: 768px) {
    .xunwei-grid {
        grid-template-columns: 1fr 1fr;
    }
    .xunwei-main {
        padding: 16px;
    }
    .xunwei-single-title {
        font-size: 1.5rem;
    }
}
@media (max-width: 480px) {
    .xunwei-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================================
   暗色主题适配修复
   ===================================================== */

[data-theme="dark"] .xunwei-tab {
    background: var(--card-bg, #2a241f);
    color: #e0d8d0;
    border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .xunwei-tab.active {
    background: #FF8A5C;
    color: #fff;
    border-color: #FF8A5C;
}
[data-theme="dark"] .xunwei-tab:hover:not(.active) {
    background: rgba(255,138,92,0.15);
}

/* 主区域 */
[data-theme="dark"] .xunwei-main {
    background: var(--card-bg, #2a241f);
    border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .xunwei-single-title {
    color: #f0e8e0;
}
[data-theme="dark"] .xunwei-single-content {
    color: #e0d8d0;
}
[data-theme="dark"] .xunwei-single-meta {
    color: #b0a898;
}
[data-theme="dark"] .xunwei-single-type {
    background: #FF8A5C;
    color: #fff;
}

/* 评论区 */
[data-theme="dark"] .xunwei-comment {
    background: #1f1b17;
    border: 1px solid rgba(255,255,255,0.06);
}
[data-theme="dark"] .xunwei-comment strong {
    color: #f0e8e0;
}
[data-theme="dark"] .xunwei-comment p {
    color: #c0b8b0;
}
[data-theme="dark"] .xunwei-comment-date {
    color: #7a7068;
}
[data-theme="dark"] .xunwei-no-comment {
    color: #7a7068;
}
[data-theme="dark"] .xunwei-comment-form textarea {
    background: #1f1b17;
    color: #e0d8d0;
    border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .xunwei-comment-form textarea::placeholder {
    color: #7a7068;
}
[data-theme="dark"] .xunwei-comment-form button {
    background: #FF8A5C;
    color: #fff;
}
[data-theme="dark"] .xunwei-comment-form button:hover {
    background: #e07446;
}

/* 卡片 */
[data-theme="dark"] .xunwei-card {
    background: var(--card-bg, #2a241f);
    border-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .xunwei-card-title {
    color: #f0e8e0;
}
[data-theme="dark"] .xunwei-card-meta {
    color: #b0a898;
}
[data-theme="dark"] .xunwei-card-excerpt {
    color: #c0b8b0;
}
[data-theme="dark"] .xunwei-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* 分页按钮 */
[data-theme="dark"] .xunwei-pagination .page-numbers {
    background: var(--card-bg, #2a241f);
    color: #e0d8d0;
    border-color: rgba(255,255,255,0.1);
}
[data-theme="dark"] .xunwei-pagination .page-numbers.current {
    background: #FF8A5C;
    color: #fff;
    border-color: #FF8A5C;
}
[data-theme="dark"] .xunwei-pagination .page-numbers:hover:not(.current) {
    background: rgba(255,138,92,0.15);
}

/* 加载状态 */
[data-theme="dark"] .xunwei-loading,
[data-theme="dark"] .xunwei-hint {
    color: #b0a898;
}

/* Toast（复用全局暗色适配，但特别处理） */
[data-theme="dark"] #xunwei-toast {
    background: #2a241f;
    color: #f0e8e0;
    border-color: rgba(255,255,255,0.1);
}