/* ===== CSS 变量 ===== */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --accent: #f59e0b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== 全局重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { overflow-x: clip; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    max-width: 100vw;
}

a { text-decoration: none; color: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== 导航栏 ===== */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.88);
    will-change: transform;
}

.nav-content {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: var(--primary);
    white-space: nowrap;
}

.logo-icon { font-size: 28px; display: flex}
.logo-icon img { height: 28px; width: auto; vertical-align: middle; }

.search-box {
    flex: 1;
    max-width: 520px;
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    height: 42px;
    padding: 0 48px 0 18px;
    border: 2px solid var(--border);
    border-radius: 100px;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn:hover { background: var(--primary-hover); transform: scale(1.05); }

/* ===== 分类栏 ===== */
.category-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.category-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.category-row::-webkit-scrollbar { display: none; }

/* 移动端分类展开/收起按钮（默认隐藏） */
.category-toggle {
    display: none;
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.category-toggle:hover { border-color: var(--primary-light); }

.category-toggle-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

.category-tag {
    flex-shrink: 0;
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
}

.category-tag:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    background: var(--primary-light);
}

.category-tag.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== 搜索提示 ===== */
.main-content {
    flex: 1;
    padding: 0 0 32px;
    width: 100%;
}
.search-info {
    padding: 16px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.search-info strong { color: var(--primary); }

/* ===== 资源卡片网格 ===== */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.resource-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.card-cover {
    position: relative;
    height: 160px;
    overflow: hidden;
    /* 无封面图时显示渐变背景 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;  /* 消除img底部间隙 */
}

/* 有封面图时隐藏渐变背景 */
.card-cover.has-cover {
    background: none;
}

.card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.placeholder-icon { font-size: 48px; opacity: 0.6; }

/* 给不同卡片不同渐变色 */
.resource-card:nth-child(6n+2) .card-cover-placeholder { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%); }
.resource-card:nth-child(6n+3) .card-cover-placeholder { background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%); }
.resource-card:nth-child(6n+4) .card-cover-placeholder { background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%); }
.resource-card:nth-child(6n+5) .card-cover-placeholder { background: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%); }
.resource-card:nth-child(6n+6) .card-cover-placeholder { background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%); }

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.badge-free { background: rgba(16, 185, 129, 0.9); color: white; }
.badge-price { background: rgba(245, 158, 11, 0.9); color: white; }

.card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

.meta-category {
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
    font-weight: 500;
}

.meta-category a {
    color: inherit;
    text-decoration: none;
}

.meta-categories {
    display: inline-flex;
    gap: 4px;
    flex-wrap: wrap;
}

.meta-more {
    background: var(--border);
    color: var(--text-secondary);
    font-size: 11px;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 0 48px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
    padding: 0 8px;
}

a.page-btn:hover { color: var(--primary); border-color: var(--primary); }

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-ellipsis {
    color: var(--text-light);
    padding: 0 4px;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 80px 0;
}

.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state p { color: var(--text-secondary); font-size: 16px; }

/* ===== 详情页 ===== */
.breadcrumb-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    margin-bottom: 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.breadcrumb a { color: var(--text-secondary); transition: var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.bc-sep { color: var(--text-light); }

.detail-page { padding: 0 0 64px; flex: 1; width: 100%; }

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

/* 防止 Grid 子项被内容撑开 */
.detail-main {
    min-width: 0;
    overflow: hidden;
}

.detail-sidebar {
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.detail-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.detail-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.detail-price-box {
    margin: 24px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: var(--radius);
    border: 1px solid #bbf7d0;
}

.price-free {
    font-size: 22px;
    font-weight: 700;
    color: #16a34a;
}

.price-value {
    font-size: 28px;
    font-weight: 700;
    color: #ea580c;
}

.detail-desc, .detail-info { margin-bottom: 24px; }
.detail-desc { margin-top: 24px; }

.detail-desc h3, .detail-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}

.detail-desc p, .detail-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.detail-content { word-break: break-word; overflow-wrap: anywhere; overflow: hidden; }

/* Markdown渲染内容样式 (vditor-reset) */
.detail-content.vditor-reset {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    padding: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow: hidden;
}
.detail-content.vditor-reset h1,
.detail-content.vditor-reset h2,
.detail-content.vditor-reset h3,
.detail-content.vditor-reset h4,
.detail-content.vditor-reset h5,
.detail-content.vditor-reset h6 {
    color: var(--text);
    margin: 1.2em 0 0.6em;
    font-weight: 600;
}
.detail-content.vditor-reset h1 { font-size: 1.6em; }
.detail-content.vditor-reset h2 { font-size: 1.4em; }
.detail-content.vditor-reset h3 { font-size: 1.2em; }
.detail-content.vditor-reset p { margin: 0.8em 0; }
.detail-content.vditor-reset ul,
.detail-content.vditor-reset ol { margin: 0.8em 0; padding-left: 2em; }
.detail-content.vditor-reset li { margin: 0.3em 0; }
.detail-content.vditor-reset blockquote {
    margin: 1em 0;
    padding: 8px 16px;
    border-left: 4px solid var(--primary);
    background: var(--primary-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}
.detail-content.vditor-reset code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e11d48;
}
.detail-content.vditor-reset pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 1em 0;
    -webkit-overflow-scrolling: touch;
    position: relative;
}
/* 代码块复制按钮 */
.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.08);
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, background .2s, color .2s, border-color .2s;
    z-index: 1;
    line-height: 1.4;
    font-family: inherit;
}
.detail-content.vditor-reset pre:hover .code-copy-btn {
    opacity: 1;
}
.code-copy-btn:hover {
    background: rgba(255,255,255,0.18);
    color: #e2e8f0;
}
.code-copy-btn.copied {
    color: #4ade80;
    border-color: rgba(74,222,128,0.4);
}
.detail-content.vditor-reset pre code {
    background: none;
    color: inherit;
    padding: 0;
}
.detail-content.vditor-reset img {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

.detail-content.vditor-reset iframe,
.detail-content.vditor-reset video,
.detail-content.vditor-reset embed,
.detail-content.vditor-reset object {
    max-width: 100%;
    height: auto;
}
.detail-content.vditor-reset a {
    color: var(--primary);
    text-decoration: underline;
}
.detail-content.vditor-reset table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.detail-content.vditor-reset th,
.detail-content.vditor-reset td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.detail-content.vditor-reset th {
    background: var(--bg);
    font-weight: 600;
}
.detail-content.vditor-reset hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5em 0;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.download-btn:active { transform: translateY(0); }

.btn-icon { font-size: 18px; }

/* 侧边栏 */
.sidebar-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-light); }
.info-value { color: var(--text); font-weight: 500; }

/* 二维码侧边栏卡片 */
.sidebar-qr-sticky {
    margin-top: 16px;
    position: sticky;
    top: 80px;
}

/* 侧边栏推荐列表 */
.sidebar-recommend {
    margin-top: 16px;
}

.recommend-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.recommend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

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

.recommend-item:hover {
    background: var(--primary-light);
    margin: 0 -8px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    border-color: transparent;
}

.recommend-item:last-child:hover {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.recommend-item:first-child:hover {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.recommend-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.recommend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recommend-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0.6;
}

.recommend-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.recommend-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommend-price {
    font-size: 13px;
    font-weight: 700;
    color: #ea580c;
}

.qr-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.qr-tab {
    padding: 4px 12px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
}

.qr-tab:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.qr-tab.active {
    color: white;
    background: var(--primary);
}

.qr-content {
    text-align: center;
}

.qr-content.hidden {
    display: none;
}

.qr-image {
    width: 100%;
    max-width: 200px;
    border-radius: var(--radius);
}

.qr-title {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 推荐区域 */
.recommend-section {
    margin-top: 48px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.recommend-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ===== 页脚 ===== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    color: var(--text-light);
    font-size: 14px;
    margin-top: 24px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.footer-inner > p {
    margin: 0;
    line-height: 1.8;
}

.footer-left p {
    margin: 0;
    line-height: 1.8;
}

.footer-icp a {
    color: var(--text-light);
    font-size: 12px;
    transition: color 0.2s;
}

.footer-icp a:hover {
    color: var(--primary);
}

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

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-icon-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-light);
    font-size: 13px;
    transition: color 0.2s;
}

.footer-icon-link:hover {
    color: var(--primary);
}

.footer-icon-link svg {
    flex-shrink: 0;
}

/* ===== 支付模态框 ===== */
.pay-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.pay-overlay.open { display: flex; }

.pay-modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.pay-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.pay-close:hover { background: var(--border); }

.pay-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pay-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.pay-subtitle strong {
    color: #ea580c;
    font-size: 18px;
}

.pay-methods {
    display: flex;
    gap: 16px;
}

.pay-method-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.pay-method-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
}

.pay-method-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.wechat-icon { background: #07c160; }
.alipay-icon { background: #1677ff; }

.pay-method-name {
    font-size: 14px;
    font-weight: 600;
}

.qrcode-box {
    margin: 20px auto;
    width: 220px;
    height: 220px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pay-waiting {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    margin: 12px 0 4px;
}

.pay-hint {
    font-size: 12px;
    color: var(--text-light);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.pay-waiting { animation: pulse 1.5s infinite; }

/* ===== 回到顶部按钮 ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* ===== 404页面 ===== */
.page-404 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.not-found {
    text-align: center;
    padding: 60px 20px;
}

.not-found-code {
    font-size: 120px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.not-found-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.not-found-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.not-found-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.not-found-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-back-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-go-back {
    display: inline-flex;
    align-items: center;
    padding: 12px 32px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-go-back:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    background: var(--primary-light);
}

/* ===== 配置菜单栏 ===== */
.config-menu-bar {
    background: rgba(255,255,255,0.88);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    position: sticky;
    top: 64px;
    z-index: 99;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    will-change: transform;
}

.config-menu-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.config-menu-row::-webkit-scrollbar { display: none; }

.config-menu-tag {
    flex-shrink: 0;
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.config-menu-tag:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    background: var(--primary-light);
}

.config-menu-tag.active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
}

/* ===== 布局区块通用 ===== */
.layout-section {
    padding: 32px 0;
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
}

.layout-section:first-child {
    padding-top: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    position: relative;
    padding-left: 14px;
}

.section-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), #8b5cf6);
}

.section-more {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.section-more:hover {
    color: var(--primary);
}

/* ===== 轮播图 carousel ===== */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
}

.carousel-viewport {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    padding: 4px 0;
}

.carousel-slide {
    flex: 0 0 calc(33.333% - 11px);
    scroll-snap-align: start;
    display: flex;
}

.carousel-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.carousel-cover {
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.carousel-cover.has-cover { background: none; }
.carousel-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.carousel-info {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.carousel-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-info p {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    min-height: 2.6em;
}

.carousel-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
    margin-top: auto;
}

.carousel-meta .badge {
    position: static;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-80%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 5;
}

.carousel-btn:hover {
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }

/* 轮播指示点 */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: var(--primary-light);
    transform: scale(1.3);
}

.carousel-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
}

/* ===== 卡片带文字 card_text ===== */
.card-text-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.card-text-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.card-text-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-text-cover {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.card-text-cover.has-cover { background: none; }
.card-text-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

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

.card-text-body h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text-body p {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

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

/* ===== 上图下文字 image_text ===== */
.image-text-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.image-text-item {
    display: block;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.image-text-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.image-text-cover {
    height: 160px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
}

.image-text-cover.has-cover { background: none; }
.image-text-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.image-text-info {
    padding: 12px 14px;
}

.image-text-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.image-text-info p {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 左图右文字 image_text_left ===== */
.left-right-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.left-right-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    align-items: center;
}

.left-right-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.left-right-cover {
    flex-shrink: 0;
    width: 160px;
    height: 110px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
}

.left-right-cover.has-cover { background: none; }
.left-right-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

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

.left-right-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.left-right-body p {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

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

.left-right-meta .badge {
    position: static;
}

/* ===== 文本列表 text_list ===== */
.text-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.text-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

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

.text-list-item:hover {
    background: var(--primary-light);
}

.text-list-index {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-light);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-list-item:nth-child(-n+3) .text-list-index {
    background: var(--primary);
    color: white;
}

.text-list-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-list-badge {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.text-list-badge.free {
    background: #dcfce7;
    color: #16a34a;
}

.text-list-badge.price {
    background: #fef3c7;
    color: #d97706;
}

.text-list-count {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-light);
}

/* ===== 英雄横幅 hero_banner ===== */
.hero-banner-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    min-height: 400px;
}

.hero-banner-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.hero-banner-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.hero-banner-main {
    grid-row: 1 / 3;
}

.hero-banner-item:nth-child(2) { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%); }
.hero-banner-item:nth-child(3) { background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%); }
.hero-banner-item:nth-child(4) { background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%); }

.hero-banner-cover {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-banner-cover.has-cover { background: none; }
.hero-banner-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
}

.hero-banner-overlay h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-banner-overlay p {
    font-size: 13px;
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.hero-banner-main .hero-banner-overlay h3 { font-size: 22px; }

.hero-banner-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.hero-banner-meta .badge { position: static; }

/* ===== 瀑布流 grid_masonry ===== */
.masonry-grid {
    columns: 4;
    column-gap: 16px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 16px;
    display: block;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.masonry-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.masonry-cover {
    overflow: hidden;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    min-height: 120px;
}

.masonry-item:nth-child(6n+2) .masonry-cover { background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%); }
.masonry-item:nth-child(6n+3) .masonry-cover { background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%); }
.masonry-item:nth-child(6n+4) .masonry-cover { background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%); }
.masonry-item:nth-child(6n+5) .masonry-cover { background: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%); }
.masonry-item:nth-child(6n+6) .masonry-cover { background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%); }

.masonry-cover.has-cover { background: none; }
.masonry-cover img { width: 100%; display: block; }

.masonry-body {
    padding: 12px 14px;
}

.masonry-body h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.masonry-body p {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

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

/* ===== 时间线 timeline ===== */
.timeline-list {
    position: relative;
    padding-left: 32px;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), #8b5cf6, var(--primary-light));
    border-radius: 1px;
}

.timeline-item {
    position: relative;
    display: block;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.timeline-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.timeline-dot {
    position: absolute;
    left: -27px;
    top: 22px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-card);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item:first-child .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
    font-weight: 500;
}

.timeline-content h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* ===== 特性展示 features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-light), #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    overflow: hidden;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.feature-emoji {
    font-size: 32px;
}

.feature-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-item p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.feature-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

/* ===== 表格列表 table_list ===== */
.table-list-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.table-list {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.table-list thead {
    background: var(--bg);
}

.table-list th {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table-list td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table-list tbody tr:hover {
    background: var(--primary-light);
}

.table-list tbody tr:last-child td {
    border-bottom: none;
}

.tl-index {
    width: 40px;
    text-align: center;
    color: var(--text-light);
    font-weight: 600;
}

.tl-title {
    font-weight: 500;
    min-width: 150px;
}

.tl-desc {
    color: var(--text-secondary);
    font-size: 13px;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tl-price {
    width: 80px;
}

.tl-count {
    width: 80px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

/* ===== 滑动卡片 swipe_card ===== */
.swipe-wrapper {
    position: relative;
    overflow: hidden;
}

.swipe-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0 16px;
}

.swipe-track::-webkit-scrollbar { display: none; }

.swipe-slide {
    flex: 0 0 380px;
    scroll-snap-align: center;
}

.swipe-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-md);
}

.swipe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.swipe-cover {
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
}

.swipe-cover.has-cover { background: none; }
.swipe-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.swipe-info {
    padding: 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.swipe-info h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.swipe-info p {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    min-height: 2.6em;
    line-height: 1.3;
}

.swipe-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
    margin-top: auto;
    min-height: 24px;
}

.swipe-meta .badge { position: static; }

.swipe-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-80%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.92);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 5;
}

.swipe-btn:hover {
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.swipe-prev { left: 8px; }
.swipe-next { right: 8px; }

/* ===== 焦点展示 spotlight ===== */
.spotlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
    min-height: 380px;
}

.spotlight-main {
    grid-row: 1 / 3;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.spotlight-main:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }

.spotlight-main .spotlight-cover {
    width: 100%;
    height: 100%;
    min-height: 380px;
    overflow: hidden;
    position: relative;
}

.spotlight-main .spotlight-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.spotlight-main .spotlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
}

.spotlight-main .spotlight-overlay h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.spotlight-main .spotlight-overlay p {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spotlight-main .spotlight-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.spotlight-main .spotlight-meta .badge { position: static; }

.spotlight-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.spotlight-side-item {
    flex: 1;
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    overflow: hidden;
}

.spotlight-side-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.spotlight-side-item .spotlight-thumb {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.spotlight-side-item .spotlight-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.spotlight-side-item .spotlight-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    font-size: 28px;
    opacity: 0.6;
}

.spotlight-side-item .spotlight-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.spotlight-side-item h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spotlight-side-item p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.spotlight-side-item .spotlight-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.spotlight-side-item .spotlight-item-meta .badge { position: static; font-size: 11px; padding: 2px 6px; }

/* ===== 便当盒 bento ===== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
    gap: 16px;
}

.bento-item {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.bento-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }

/* 第一行：前两个各占1.5列高度 */
.bento-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
.bento-item:nth-child(2) { grid-column: span 1; grid-row: span 2; }
.bento-item:nth-child(3) { grid-column: span 1; }
.bento-item:nth-child(4) { grid-column: span 1; }
.bento-item:nth-child(5) { grid-column: span 2; }

.bento-cover {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bento-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.bento-item:hover .bento-cover img {
    transform: scale(1.06);
}

.bento-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}

.bento-overlay h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.bento-overlay p {
    font-size: 12px;
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bento-overlay .bento-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin-top: 4px;
}

.bento-overlay .bento-meta .badge { position: static; font-size: 11px; padding: 2px 6px; }

.bento-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    opacity: 0.5;
}

.bento-item:nth-child(6n+1) .bento-placeholder { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.bento-item:nth-child(6n+2) .bento-placeholder { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.bento-item:nth-child(6n+3) .bento-placeholder { background: linear-gradient(135deg, #14b8a6, #06b6d4); }
.bento-item:nth-child(6n+4) .bento-placeholder { background: linear-gradient(135deg, #f59e0b, #f97316); }
.bento-item:nth-child(6n+5) .bento-placeholder { background: linear-gradient(135deg, #3b82f6, #2dd4bf); }
.bento-item:nth-child(6n+6) .bento-placeholder { background: linear-gradient(135deg, #a855f7, #ec4899); }

/* ===== 堆叠卡片 stack_card ===== */
.stack-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    padding: 20px 0;
}

.stack-card {
    width: 260px;
    perspective: 800px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.stack-card-inner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    /* 堆叠层效果 */
    box-shadow:
        0 2px 0 var(--border),
        0 4px 0 var(--border),
        0 6px 12px rgba(0,0,0,0.06);
}

.stack-card:hover .stack-card-inner {
    transform: translateY(-12px) rotateX(2deg);
    box-shadow:
        0 12px 24px rgba(0,0,0,0.12),
        0 4px 8px rgba(0,0,0,0.06);
    border-color: var(--primary-light);
}

.stack-cover {
    height: 170px;
    overflow: hidden;
    position: relative;
}

.stack-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stack-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    font-size: 40px;
    opacity: 0.6;
}

.stack-body {
    padding: 14px 16px;
}

.stack-body h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stack-body p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.stack-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
}

.stack-meta .badge { position: static; font-size: 11px; padding: 2px 6px; }

/* ===== 封面流 cover_flow ===== */
.coverflow-wrapper {
    position: relative;
    padding: 20px 0;
}

.coverflow-track {
    position: relative;
    height: 300px;
    perspective: 1200px;
    overflow: visible;
}

.coverflow-item {
    position: absolute;
    width: 220px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-md);
    /* 默认隐藏，JS 控制位置 */
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7);
    left: 50%;
    top: 50%;
    margin-left: -110px;
    margin-top: -140px;
}

.coverflow-item.active {
    opacity: 1;
    z-index: 5;
    transform: scale(1) rotateY(0deg) translateX(0);
    pointer-events: auto;
    box-shadow: var(--shadow-xl);
}

.coverflow-item.prev {
    opacity: 0.7;
    z-index: 4;
    transform: scale(0.88) rotateY(18deg) translateX(-140px);
    pointer-events: auto;
}

.coverflow-item.next {
    opacity: 0.7;
    z-index: 4;
    transform: scale(0.88) rotateY(-18deg) translateX(140px);
    pointer-events: auto;
}

.coverflow-item.far-prev {
    opacity: 0.35;
    z-index: 3;
    transform: scale(0.72) rotateY(28deg) translateX(-260px);
    pointer-events: auto;
}

.coverflow-item.far-next {
    opacity: 0.35;
    z-index: 3;
    transform: scale(0.72) rotateY(-28deg) translateX(260px);
    pointer-events: auto;
}

.coverflow-item.hidden-left,
.coverflow-item.hidden-right {
    opacity: 0;
    z-index: 1;
    transform: scale(0.6) translateX(0);
    pointer-events: none;
}

.coverflow-item:hover:not(.active) {
    opacity: 0.9;
}

.coverflow-cover {
    width: 100%;
    height: 100%;
}

.coverflow-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.coverflow-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    font-size: 48px;
    opacity: 0.6;
}

.coverflow-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.coverflow-item.active .coverflow-info {
    opacity: 1;
}

.coverflow-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.coverflow-info p {
    font-size: 12px;
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.coverflow-info .coverflow-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    margin-top: 4px;
}

.coverflow-info .coverflow-meta .badge { position: static; font-size: 11px; padding: 2px 6px; }

.coverflow-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.coverflow-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.coverflow-nav button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.coverflow-dots {
    display: flex;
    gap: 6px;
}

.coverflow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.coverflow-dot.active {
    background: var(--primary);
    width: 20px;
    border-radius: 4px;
}

/* ===== 对比列表 comparison ===== */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.comparison-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 2px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.comparison-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.comparison-item.comparison-featured {
    border-color: var(--primary);
    position: relative;
}

.comparison-item.comparison-featured::before {
    content: '推荐';
    position: absolute;
    top: 12px;
    right: -28px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 32px;
    transform: rotate(45deg);
    z-index: 2;
}

.comparison-header {
    padding: 20px 16px 12px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.comparison-header img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 8px;
}

.comparison-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 8px;
}

.comparison-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.comparison-header .comparison-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.comparison-header .comparison-price.free {
    color: #10b981;
}

.comparison-body {
    padding: 12px 16px;
    flex: 1;
}

.comparison-body p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.comparison-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

/* ===== Pinterest风格 pinterest ===== */
.pinterest-grid {
    column-count: 4;
    column-gap: 16px;
}

.pinterest-item {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: block;
    text-decoration: none;
    color: inherit;
}

.pinterest-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.pinterest-cover {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.pinterest-cover img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.pinterest-item:hover .pinterest-cover img {
    transform: scale(1.05);
}

.pinterest-body {
    padding: 12px 14px;
}

.pinterest-body h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pinterest-body p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pinterest-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-light);
}

.pinterest-meta .badge { position: static; font-size: 11px; padding: 2px 6px; }

/* ===== 手风琴 accordion ===== */
.accordion-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accordion-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
}

.accordion-item:hover {
    border-color: var(--primary-light);
}

.accordion-item.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.accordion-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: var(--primary-light);
}

.accordion-index {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.accordion-item.active .accordion-index {
    background: var(--primary);
    color: #fff;
}

.accordion-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.accordion-tags {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.accordion-tags .badge { position: static; font-size: 11px; padding: 2px 8px; }

.accordion-arrow {
    font-size: 14px;
    color: var(--text-light);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-item.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item.active .accordion-body {
    max-height: 300px;
}

.accordion-content {
    padding: 0 18px 16px 60px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.accordion-thumb {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.accordion-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.accordion-detail {
    flex: 1;
    min-width: 0;
}

.accordion-detail p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 8px;
}

.accordion-detail a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.accordion-detail a:hover {
    text-decoration: underline;
}

/* ===== 标签页 tabs ===== */
.tabs-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabs-nav::-webkit-scrollbar { height: 0; }

.tabs-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.tabs-btn:hover {
    color: var(--text);
    background: var(--primary-light);
}

.tabs-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tabs-panel {
    display: none;
    padding: 16px;
}

.tabs-panel.active {
    display: block;
}

.tab-resource-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.tab-resource-item:hover {
    background: var(--primary-light);
}

.tab-resource-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.tab-resource-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tab-resource-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    font-size: 20px;
    opacity: 0.6;
}

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

.tab-resource-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-resource-info p {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tab-resource-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-light);
}

.tab-resource-meta .badge { position: static; font-size: 11px; padding: 2px 6px; }

/* ===== 渐变卡片 gradient_card ===== */
.gradient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.gradient-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    color: #fff;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    cursor: pointer;
}

.gradient-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.gradient-item:nth-child(8n+1) { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gradient-item:nth-child(8n+2) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.gradient-item:nth-child(8n+3) { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.gradient-item:nth-child(8n+4) { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.gradient-item:nth-child(8n+5) { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.gradient-item:nth-child(8n+6) { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.gradient-item:nth-child(8n+7) { background: linear-gradient(135deg, #fccb90 0%, #d57eeb 100%); }
.gradient-item:nth-child(8n+8) { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }

.gradient-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    overflow: hidden;
}

.gradient-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.3;
    mix-blend-mode: overlay;
}

.gradient-body {
    position: relative;
    padding: 20px;
    z-index: 1;
}

.gradient-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.gradient-body p {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.5;
    margin-bottom: 8px;
}

.gradient-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.gradient-meta .badge { position: static; background: rgba(255,255,255,0.25); color: #fff; }

/* ===== 圆形展示 circle ===== */
.circle-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    padding: 20px 0;
}

.circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 120px;
    transition: var(--transition);
}

.circle-item:hover {
    transform: translateY(-4px);
}

.circle-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border);
    margin-bottom: 10px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.circle-item:hover .circle-avatar {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.circle-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.circle-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    font-size: 28px;
    opacity: 0.7;
}

.circle-item:nth-child(6n+2) .circle-placeholder { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.circle-item:nth-child(6n+3) .circle-placeholder { background: linear-gradient(135deg, #14b8a6, #06b6d4); }
.circle-item:nth-child(6n+4) .circle-placeholder { background: linear-gradient(135deg, #f59e0b, #f97316); }
.circle-item:nth-child(6n+5) .circle-placeholder { background: linear-gradient(135deg, #3b82f6, #2dd4bf); }
.circle-item:nth-child(6n+6) .circle-placeholder { background: linear-gradient(135deg, #a855f7, #ec4899); }

.circle-name {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.circle-price {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

/* ===== 交错网格 staggered ===== */
.staggered-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.staggered-item {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.staggered-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

/* 交错效果：奇数行偏移 */
.staggered-item:nth-child(8n+5),
.staggered-item:nth-child(8n+6),
.staggered-item:nth-child(8n+7),
.staggered-item:nth-child(8n+8) {
    margin-top: 24px;
}

.staggered-cover {
    height: 140px;
    overflow: hidden;
}

.staggered-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.staggered-item:hover .staggered-cover img {
    transform: scale(1.06);
}

.staggered-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    opacity: 0.5;
}

.staggered-item:nth-child(6n+1) .staggered-placeholder { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.staggered-item:nth-child(6n+2) .staggered-placeholder { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.staggered-item:nth-child(6n+3) .staggered-placeholder { background: linear-gradient(135deg, #14b8a6, #06b6d4); }
.staggered-item:nth-child(6n+4) .staggered-placeholder { background: linear-gradient(135deg, #f59e0b, #f97316); }
.staggered-item:nth-child(6n+5) .staggered-placeholder { background: linear-gradient(135deg, #3b82f6, #2dd4bf); }
.staggered-item:nth-child(6n+6) .staggered-placeholder { background: linear-gradient(135deg, #a855f7, #ec4899); }

.staggered-body {
    padding: 12px 14px;
}

.staggered-body h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.staggered-body p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.staggered-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
}

.staggered-meta .badge { position: static; font-size: 11px; padding: 2px 6px; }

/* ===== 浮动卡片 floating_card ===== */
.floating-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    padding: 20px 0;
}

.floating-item {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.floating-item:hover {
    transform: translateY(-10px);
    box-shadow:
        0 20px 40px rgba(0,0,0,0.12),
        0 8px 16px rgba(0,0,0,0.06);
}

.floating-cover {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.floating-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.floating-item:hover .floating-cover img {
    transform: scale(1.08);
}

.floating-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    opacity: 0.5;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.floating-item:nth-child(6n+2) .floating-placeholder { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.floating-item:nth-child(6n+3) .floating-placeholder { background: linear-gradient(135deg, #14b8a6, #06b6d4); }
.floating-item:nth-child(6n+4) .floating-placeholder { background: linear-gradient(135deg, #f59e0b, #f97316); }
.floating-item:nth-child(6n+5) .floating-placeholder { background: linear-gradient(135deg, #3b82f6, #2dd4bf); }
.floating-item:nth-child(6n+6) .floating-placeholder { background: linear-gradient(135deg, #a855f7, #ec4899); }

.floating-body {
    padding: 18px 20px;
}

.floating-body h3 {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
}

.floating-body p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.floating-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
}

.floating-meta .meta-categories {
    display: inline-flex;
    gap: 4px;
}

.floating-meta .badge { position: static; font-size: 11px; padding: 2px 6px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-layout > * {
        min-width: 0;
    }

    .sidebar-qr-sticky {
        position: static;
    }

    .detail-page {
        padding: 0 0 48px;
    }

    .detail-card {
        padding: 20px;
        min-width: 0;
    }

    .detail-title {
        font-size: 22px;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .breadcrumb {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .breadcrumb > span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .detail-content.vditor-reset pre {
        padding: 12px;
        font-size: 13px;
    }

    .detail-content.vditor-reset table {
        font-size: 13px;
    }

    .resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
    }

    .nav-content { height: 56px; }

    .config-menu-bar { top: 56px; }

    .container { padding: 0 16px; }

    .config-menu-tag {
        padding: 6px 14px;
        font-size: 13px;
    }

    /* 移动端回到顶部按钮位置调整 */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .download-btn {
        padding: 12px 28px;
        font-size: 15px;
        display: inline-flex;
        max-width: 100%;
    }

    /* 轮播图移动端单张展示 */
    .carousel-slide {
        flex: 0 0 calc(80% - 12px);
    }

    .card-text-grid {
        grid-template-columns: 1fr;
    }

    .image-text-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .left-right-cover {
        width: 110px;
        height: 80px;
    }

    .section-heading {
        font-size: 18px;
    }

    .layout-section {
        padding: 20px 0;
    }

    /* 英雄横幅移动端 */
    .hero-banner-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
    }

    .hero-banner-main {
        grid-row: auto;
    }

    .hero-banner-grid .hero-banner-item {
        min-height: 200px;
    }

    /* 瀑布流移动端 */
    .masonry-grid {
        columns: 2;
    }

    /* 特性展示移动端 */
    .features-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .feature-item {
        padding: 20px 14px;
    }

    .feature-icon {
        width: 48px;
        height: 48px;
    }

    .feature-emoji {
        font-size: 24px;
    }

    /* 表格列表移动端 */
    .tl-desc {
        display: none;
    }

    /* 滑动卡片移动端 */
    .swipe-slide {
        flex: 0 0 300px;
    }

    /* 焦点展示移动端 */
    .spotlight-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .spotlight-main {
        grid-row: auto;
    }

    .spotlight-main .spotlight-cover {
        min-height: 220px;
    }

    .spotlight-side {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .spotlight-side-item {
        flex: 1 1 calc(50% - 8px);
        min-width: 200px;
    }

    /* 便当盒移动端 */
    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 140px;
    }

    .bento-item:nth-child(1) { grid-column: span 2; }
    .bento-item:nth-child(2) { grid-column: span 1; grid-row: span 1; }
    .bento-item:nth-child(5) { grid-column: span 1; }

    /* 堆叠卡片移动端 */
    .stack-list {
        gap: 16px;
    }

    .stack-card {
        width: calc(50% - 8px);
    }

    /* 封面流移动端 */
    .coverflow-item {
        width: 180px;
        height: 230px;
    }

    .coverflow-item.prev {
        transform: scale(0.85) rotateY(15deg) translateX(30px);
    }

    .coverflow-item.next {
        transform: scale(0.85) rotateY(-15deg) translateX(-30px);
    }

    .swipe-cover {
        height: 180px;
    }

    /* 侧边栏推荐列表移动端 */
    .recommend-thumb {
        width: 36px;
        height: 36px;
    }

    .recommend-title {
        font-size: 13px;
    }

    .recommend-price {
        font-size: 12px;
    }

    /* 对比列表移动端 */
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    /* Pinterest移动端 */
    .pinterest-grid {
        column-count: 2;
    }

    /* 手风琴移动端 */
    .accordion-content {
        padding: 0 14px 14px 14px;
        flex-direction: column;
    }

    .accordion-thumb {
        width: 100%;
        height: 100px;
    }

    /* 标签页移动端 */
    .tabs-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* 渐变卡片移动端 */
    .gradient-grid {
        grid-template-columns: 1fr;
    }

    /* 圆形展示移动端 */
    .circle-item {
        width: 90px;
    }

    .circle-avatar {
        width: 64px;
        height: 64px;
    }

    .circle-name {
        font-size: 12px;
    }

    /* 交错网格移动端 */
    .staggered-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .staggered-item:nth-child(8n+5),
    .staggered-item:nth-child(8n+6),
    .staggered-item:nth-child(8n+7),
    .staggered-item:nth-child(8n+8) {
        margin-top: 12px;
    }

    .staggered-cover {
        height: 100px;
    }

    /* 浮动卡片移动端 */
    .floating-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .floating-cover {
        height: 160px;
    }
}
