/* ===== 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; }

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;
}

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);
    background: rgba(255,255,255,0.88);
}

.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; }

.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;
}

/* ===== 分页 ===== */
.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);
}

.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;
}

.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; }

/* Markdown渲染内容样式 (vditor-reset) */
.detail-content.vditor-reset {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    padding: 0;
}
.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;
}
.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 a {
    color: var(--primary);
    text-decoration: underline;
}
.detail-content.vditor-reset table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
.detail-content.vditor-reset th,
.detail-content.vditor-reset td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}
.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;
}

.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;
}

.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: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.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%;
    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;
}

.swipe-info h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.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;
}

.swipe-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-light);
    margin-top: auto;
}

.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; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-qr-sticky {
        position: static;
    }

    .detail-page {
        padding: 0 0 48px;
    }

    .detail-card {
        padding: 20px;
    }

    .detail-title { font-size: 22px; }

    .resource-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 14px;
    }

    .nav-content { height: 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;
    }

    /* 轮播图移动端单张展示 */
    .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;
    }

    .swipe-cover {
        height: 180px;
    }
}
