/* ============================================
   校对文库 - 字典库/文档查询系统样式
   设计风格：学术辞典 / 文档库
   ============================================ */

/* CSS 变量 */
:root {
    --bg-base: #f5f2eb;
    --bg-paper: #fffefb;
    --bg-card: #ffffff;
    --bg-sidebar: #faf8f4;
    --bg-hover: #f0ede5;

    --color-primary: #1a2b4a;
    --color-accent: #8b2635;
    --color-accent-light: #a93b4a;
    --color-text: #2c2c2c;
    --color-text-secondary: #6b6557;
    --color-text-muted: #9a9385;
    --color-link: #2c6e7f;
    --color-link-hover: #1a5263;
    --color-border: #e0dad0;
    --color-border-light: #ece8df;

    --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', 'Source Han Serif SC', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    --font-mono: 'SF Mono', 'Consolas', 'Monaco', monospace;

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;

    --shadow-sm: 0 1px 2px rgba(60, 50, 30, 0.06);
    --shadow-md: 0 2px 8px rgba(60, 50, 30, 0.08);
    --shadow-lg: 0 4px 16px rgba(60, 50, 30, 0.10);

    --transition: 0.25s ease;
}

/* 重置和基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--bg-base);
    background-image:
        radial-gradient(circle at 20% 50%, rgba(139, 38, 53, 0.015) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(26, 43, 74, 0.015) 0%, transparent 50%);
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-link-hover);
}

/* ============================================
   头部导航
   ============================================ */
.jd-header {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--color-accent);
}

.jd-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 24px;
}

.jd-logo {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.jd-logo::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--color-accent);
    border-radius: 2px;
}

.jd-logo a {
    color: #fff;
}

.jd-logo a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.jd-nav {
    display: flex;
    gap: 24px;
    flex-shrink: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.jd-nav::-webkit-scrollbar {
    display: none;
}

/* 头部搜索（靠右，紧凑） */
.jd-header-search {
    margin-left: auto;
    display: flex;
    gap: 0;
    max-width: 320px;
}

.jd-header-search input {
    flex: 1;
    padding: 7px 14px;
    border: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 13px;
    outline: none;
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-text);
}

.jd-header-search input::placeholder {
    color: var(--color-text-muted);
}

.jd-header-search button {
    padding: 7px 16px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.jd-header-search button:hover {
    background: var(--color-accent-light);
}

.jd-nav a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}

.jd-nav a:hover,
.jd-nav a.active {
    color: #fff;
    border-bottom-color: var(--color-accent);
}

/* ============================================
   主容器
   ============================================ */
.jd-container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 24px;
    display: flex;
    gap: 24px;
}

/* ============================================
   侧边栏
   ============================================ */
.jd-sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.jd-sidebar::-webkit-scrollbar {
    width: 4px;
}

.jd-sidebar::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

.jd-sidebar-card {
    background: var(--bg-sidebar);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
    margin-bottom: 20px;
}

.jd-sidebar-title {
    background: var(--color-primary);
    color: #fff;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.jd-sidebar-title::before {
    content: '§';
    font-family: var(--font-serif);
    color: var(--color-accent);
    font-size: 16px;
}

/* 分类树 */
.jd-category-tree {
    padding: 6px 0;
}

.jd-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jd-category-count {
    margin-left: 8px;
    font-size: 12px;
    color: var(--color-text-muted);
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.jd-category-item:hover {
    background: var(--bg-hover);
    color: var(--color-primary);
}

.jd-category-item.active {
    background: rgba(139, 38, 53, 0.06);
    color: var(--color-accent);
    border-left-color: var(--color-accent);
    font-weight: 600;
}

.jd-category-row {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.jd-category-row .jd-category-item {
    flex: 1;
}

.jd-category-row .icon-arrow {
    padding: 8px 12px;
    font-size: 10px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: transform var(--transition), color var(--transition);
    flex-shrink: 0;
}

.jd-category-row .icon-arrow:hover {
    color: var(--color-accent);
}

.jd-category-row .icon-arrow.rotated {
    transform: rotate(90deg);
}

.jd-category-children {
    background: rgba(0, 0, 0, 0.015);
}

.jd-category-children .jd-category-item {
    padding-left: 32px;
    font-size: 13px;
}

.jd-category-children .jd-category-children .jd-category-item {
    padding-left: 48px;
}

/* 热门列表 */
.jd-hot-list {
    list-style: none;
    padding: 6px 0;
}

.jd-hot-list li {
    padding: 8px 16px;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
}

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

.jd-hot-list li a {
    color: var(--color-text-secondary);
    font-size: 13px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jd-hot-list li a:hover {
    color: var(--color-accent);
}

.jd-hot-num {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 11px;
    margin-right: 8px;
    background: var(--bg-hover);
    color: var(--color-text-muted);
    font-family: var(--font-serif);
}

.jd-hot-list li:nth-child(1) .jd-hot-num {
    background: var(--color-accent);
    color: #fff;
}

.jd-hot-list li:nth-child(2) .jd-hot-num {
    background: #c4582a;
    color: #fff;
}

.jd-hot-list li:nth-child(3) .jd-hot-num {
    background: #c49a2a;
    color: #fff;
}

/* ============================================
   主内容区
   ============================================ */
.jd-main {
    flex: 1;
    min-width: 0;
}

.jd-main-full {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* 面包屑 */
.jd-breadcrumb {
    background: var(--bg-paper);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

.jd-breadcrumb-left {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 120px);
}

.jd-breadcrumb-left>span,
.jd-breadcrumb-left>a {
    flex-shrink: 0;
}

.jd-breadcrumb-right {
    flex-shrink: 0;
    margin-left: 16px;
    min-width: 80px;
    text-align: right;
}

.jd-breadcrumb a {
    color: var(--color-text-secondary);
}

.jd-breadcrumb a:hover {
    color: var(--color-accent);
}

.jd-breadcrumb .separator {
    margin: 0 8px;
    color: var(--color-text-muted);
}

.jd-breadcrumb .current {
    color: var(--color-text);
    font-weight: 500;
}

.jd-breadcrumb .back-link {
    color: var(--color-accent);
    font-weight: 600;
    padding: 4px 12px;
    background: rgba(139, 38, 53, 0.05);
    border-radius: var(--radius-sm);
}

/* ============================================
   搜索栏（列表页内）
   ============================================ */
.jd-search-bar {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
}

.jd-search-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 15px;
    outline: none;
    transition: border-color var(--transition);
    background: var(--bg-paper);
    color: var(--color-text);
}

.jd-search-input::placeholder {
    color: var(--color-text-muted);
}

.jd-search-input:focus {
    border-color: var(--color-accent);
}

.jd-search-btn {
    padding: 12px 28px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}

.jd-search-btn:hover {
    background: var(--color-accent-light);
}

/* ============================================
   骨架屏
   ============================================ */
.jd-skeleton {
    background: var(--bg-paper);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--color-border);
}

.jd-skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, #ebe7df 25%, #e0dad0 50%, #ebe7df 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.jd-skeleton-line.title {
    height: 22px;
    width: 60%;
}

.jd-skeleton-line.short {
    width: 40%;
}

.jd-skeleton-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-paper);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    border: 1px solid var(--color-border);
}

.jd-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(90deg, #ebe7df 25%, #e0dad0 50%, #ebe7df 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    flex-shrink: 0;
}

.jd-skeleton-content {
    flex: 1;
}

.jd-skeleton-loading {
    padding: 8px 16px;
}

.jd-skeleton-line-sm {
    margin-bottom: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   内容卡片（辞典条目风格）
   ============================================ */
.jd-content-card {
    background: var(--bg-paper);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 12px;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-border);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.jd-content-card:hover {
    border-left-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.jd-content-card.hidden {
    display: none;
}

.jd-content-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jd-content-title a {
    color: var(--color-primary);
}

.jd-content-title a:hover {
    color: var(--color-accent);
}

.jd-content-title-md {
    font-size: 16px;
}

.jd-content-tag {
    display: inline-block;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: var(--radius-sm);
    margin-right: 6px;
    vertical-align: middle;
    font-family: var(--font-sans);
    font-weight: 500;
}

.jd-content-tag.top {
    background: rgba(139, 38, 53, 0.08);
    color: var(--color-accent);
    border: 1px solid rgba(139, 38, 53, 0.2);
}

.jd-content-tag.hot {
    background: rgba(196, 90, 42, 0.08);
    color: #c4582a;
    border: 1px solid rgba(196, 90, 42, 0.2);
}

.jd-content-meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.jd-content-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.jd-content-meta .category-tag {
    background: rgba(26, 43, 74, 0.06);
    color: var(--color-primary);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.jd-content-summary {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.7;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ============================================
   分页
   ============================================ */
.jd-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.jd-pagination button {
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    background: var(--bg-paper);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
}

.jd-pagination button:hover:not(:disabled) {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.jd-pagination button.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.jd-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   详情页（字典条目风格）
   ============================================ */
.jd-detail-card {
    background: var(--bg-paper);
    border-radius: var(--radius-md);
    padding: 36px 40px;
    border: 1px solid var(--color-border);
    border-top: 4px solid var(--color-accent);
}

.jd-detail-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-primary);
    line-height: 1.4;
}

.jd-detail-meta {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.jd-detail-content {
    font-size: 16px;
    line-height: 2;
    color: var(--color-text);
}

.jd-detail-content p {
    margin-bottom: 16px;
    text-indent: 2em;
}

.jd-detail-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

.jd-detail-content h1,
.jd-detail-content h2,
.jd-detail-content h3 {
    margin: 24px 0 12px;
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--color-primary);
}

.jd-detail-content h2 {
    font-size: 20px;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 6px;
}

.jd-detail-content h3 {
    font-size: 17px;
}

.jd-detail-content code {
    font-family: var(--font-mono);
    background: var(--bg-hover);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: var(--color-accent);
}

.jd-detail-content pre {
    background: var(--color-primary);
    color: #e0dad0;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 16px 0;
}

.jd-detail-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.jd-detail-content blockquote {
    border-left: 4px solid var(--color-accent);
    background: rgba(139, 38, 53, 0.03);
    padding: 12px 20px;
    margin: 16px 0;
    color: var(--color-text-secondary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.jd-detail-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--color-text-muted);
    font-family: var(--font-serif);
}

/* ============================================
   补充内容/回复区（注释/批注风格）
   ============================================ */
.jd-reply-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px dashed var(--color-border);
}

.jd-reply-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.jd-reply-title::before {
    content: '¶';
    color: var(--color-accent);
    font-size: 20px;
}

.jd-reply-item {
    background: var(--bg-sidebar);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 12px;
    border-left: 3px solid var(--color-accent);
    border-top: 1px solid var(--color-border-light);
    border-right: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.jd-reply-floor {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font-serif);
    letter-spacing: 1px;
}

.jd-reply-meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.jd-reply-meta .author {
    color: var(--color-primary);
    font-weight: 600;
}

.jd-reply-time {
    font-size: 12px;
    color: var(--color-text-muted);
}

.jd-reply-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-text);
}

.jd-reply-content p {
    margin-bottom: 8px;
}

.jd-no-reply {
    text-align: center;
    color: var(--color-text-muted);
    padding: 40px 0;
    font-size: 14px;
    font-style: italic;
}

/* ============================================
   上下篇导航
   ============================================ */
.jd-prev-next {
    margin-top: 28px;
    padding: 20px 24px;
    background: var(--bg-sidebar);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.jd-prev-next a {
    color: var(--color-text-secondary);
    font-size: 14px;
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jd-prev-next a:hover {
    background: var(--bg-hover);
    color: var(--color-accent);
}

.jd-prev-next .disabled {
    color: var(--color-text-muted);
    pointer-events: none;
}

/* ============================================
   首页横幅
   ============================================ */
.jd-banner {
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    color: #fff;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.jd-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-accent);
}

.jd-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-accent);
}

.jd-banner h1 {
    font-family: var(--font-serif);
    font-size: 32px;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.jd-banner p {
    font-size: 15px;
    opacity: 0.8;
    letter-spacing: 1px;
}

/* 首页搜索区 */
.jd-hero-search {
    background: var(--bg-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
}

.jd-hero-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 0 0 3px 3px;
}

.jd-hero-search-title {
    font-family: var(--font-serif);
    font-size: 24px;
    color: var(--color-primary);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.jd-hero-search-desc {
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.jd-hero-search-bar {
    display: flex;
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
}

.jd-hero-search-bar input {
    flex: 1;
    padding: 14px 24px;
    border: 2px solid var(--color-border);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 16px;
    outline: none;
    transition: border-color var(--transition);
    background: var(--bg-base);
    color: var(--color-text);
}

.jd-hero-search-bar input::placeholder {
    color: var(--color-text-muted);
}

.jd-hero-search-bar input:focus {
    border-color: var(--color-accent);
}

.jd-hero-search-bar button {
    padding: 14px 32px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 15px;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
    font-weight: 600;
}

.jd-hero-search-bar button:hover {
    background: var(--color-accent-light);
}

/* 首页快捷分类入口 */
.jd-quick-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.jd-quick-cat {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bg-sidebar);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--color-text-secondary);
    transition: all var(--transition);
}

.jd-quick-cat:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(139, 38, 53, 0.04);
}

/* ============================================
   区块标题
   ============================================ */
.jd-section-title {
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-left: 14px;
    border-left: 4px solid var(--color-accent);
    color: var(--color-primary);
    letter-spacing: 1px;
}

/* ============================================
   网格布局
   ============================================ */
.jd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.jd-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.jd-grid .jd-content-card,
.jd-grid-2col .jd-content-card {
    margin-bottom: 0;
}

.jd-grid .jd-content-summary {
    -webkit-line-clamp: 3;
}

/* ============================================
   底部
   ============================================ */
.jd-footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 28px 20px;
    margin-top: 48px;
    font-size: 13px;
    border-top: 3px solid var(--color-accent);
}

.jd-footer a {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   加载更多 / 空状态
   ============================================ */
.jd-load-more {
    text-align: center;
    margin-top: 24px;
}

.jd-load-more button {
    padding: 10px 40px;
    background: var(--bg-paper);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
}

.jd-load-more button:hover:not(:disabled) {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(139, 38, 53, 0.03);
}

.jd-load-more button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.jd-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
    background: var(--bg-paper);
    border-radius: var(--radius-md);
    border: 1px dashed var(--color-border);
}

.jd-empty .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

/* ============================================
   移动端适配
   ============================================ */

/* 响应式断点：768px以下 */
@media (max-width: 768px) {

    /* 隐藏PC端导航 */
    .jd-nav {
        display: none !important;
    }

    /* 移动端显示搜索框 */
    .jd-header-search {
        display: flex !important;
        margin-left: auto;
        max-width: 180px;
        flex-shrink: 0;
    }

    .jd-header-search input {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 0;
    }

    .jd-header-search button {
        padding: 6px 12px;
        font-size: 12px;
        flex-shrink: 0;
    }

    /* 隐藏PC端左侧栏 */
    .jd-sidebar {
        display: none !important;
    }

    /* 主内容占满宽度 */
    .jd-main,
    .jd-main-full {
        width: 100% !important;
        margin-left: 0 !important;
        flex: 1;
        min-width: 0;
    }

    /* 调整容器padding */
    .jd-container {
        padding: 0 12px;
        margin: 12px auto;
        gap: 12px;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* 调整header */
    .jd-header-inner {
        padding: 0 16px;
        flex-wrap: nowrap;
        height: 64px;
        gap: 12px;
    }

    .jd-logo {
        flex-shrink: 0;
    }

    .jd-logo a {
        font-size: 18px;
    }

    /* 调整首页布局 */
    .jd-hero-search {
        padding: 24px 16px;
        max-width: 100%;
        overflow: hidden;
    }

    .jd-hero-search-title {
        font-size: 24px;
        word-break: break-word;
    }

    .jd-hero-search-desc {
        font-size: 14px;
        word-break: break-word;
    }

    .jd-hero-search-bar {
        max-width: 100%;
    }

    .jd-quick-categories {
        flex-wrap: wrap;
        gap: 8px;
    }

    .jd-quick-cat {
        font-size: 13px;
        padding: 6px 14px;
    }

    /* 调整网格布局 */
    .jd-grid,
    .jd-grid-2col {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    /* 调整内容卡片 */
    .jd-content-card {
        padding: 16px;
        max-width: 100%;
        overflow: hidden;
    }

    .jd-content-title {
        font-size: 16px;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .jd-content-summary {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .jd-content-meta {
        flex-wrap: wrap;
        gap: 6px;
        font-size: 12px;
    }

    /* 调整详情页 */
    .jd-detail-card {
        padding: 20px 16px;
        max-width: 100%;
        overflow: hidden;
    }

    .jd-detail-title {
        font-size: 22px;
        word-break: break-word;
    }

    .jd-detail-content {
        font-size: 15px;
        line-height: 1.8;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .jd-detail-content img,
    .jd-detail-content table {
        max-width: 100%;
    }

    /* 调整分页 */
    .jd-pagination {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
    }

    .jd-page-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 32px;
    }

    /* 调整面包屑 */
    .jd-breadcrumb {
        font-size: 13px;
        flex-wrap: wrap;
    }

    .jd-breadcrumb-right {
        display: none;
    }

    /* 调整section标题 */
    .jd-section-title {
        font-size: 18px;
    }

    /* 调整分页信息 */
    .jd-pagination-info {
        text-align: center;
        font-size: 13px;
    }

    /* 确保所有元素不超出屏幕 */
    * {
        max-width: 100%;
    }
}

/* 更小屏幕：480px以下 */
@media (max-width: 480px) {
    .jd-hero-search-title {
        font-size: 24px;
    }

    .jd-hero-search-bar {
        flex-direction: column;
    }

    .jd-hero-search-bar input {
        border-radius: var(--radius-md);
    }

    .jd-hero-search-bar button {
        width: 100%;
        border-radius: var(--radius-md);
        margin-top: 8px;
    }

    .jd-detail-title {
        font-size: 20px;
    }

    .jd-prev-next {
        flex-direction: column;
        gap: 8px;
    }

    .jd-prev-next a {
        max-width: 100%;
    }

    .jd-text-right {
        text-align: left !important;
    }
}

/* ============================================
   分页
   ============================================ */
.jd-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.jd-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--color-border);
    background: var(--bg-paper);
    color: var(--color-text-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
}

.jd-page-btn:hover:not(:disabled):not(.active) {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(139, 38, 53, 0.04);
}

.jd-page-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    font-weight: 600;
}

.jd-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.jd-page-ellipsis {
    padding: 0 6px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.jd-pagination-info {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--color-text-muted);
    font-family: var(--font-serif);
}

.jd-pagination-info span {
    color: var(--color-primary);
    font-weight: 600;
}

/* ============================================
   工具类
   ============================================ */
.jd-mt-lg {
    margin-top: 30px;
}

.jd-mt-md {
    margin-top: 12px;
}

.jd-mb-0 {
    margin-bottom: 0;
}

.jd-text-right {
    text-align: right;
}

.jd-link-brand {
    color: var(--color-accent);
}

.jd-btn-outline-pill {
    display: inline-block;
    padding: 10px 40px;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    background: var(--bg-paper);
}

.jd-btn-outline-pill:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(139, 38, 53, 0.03);
}

.jd-skeleton-title-detail {
    margin: 0 auto 20px;
    width: 80%;
}

.jd-skeleton-meta-detail {
    margin: 0 auto 24px;
}

/* 搜索关键词高亮 */
.jd-highlight {
    color: var(--color-accent);
    font-weight: 600;
    background: rgba(139, 38, 53, 0.08);
    padding: 0 2px;
    border-radius: 2px;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 768px) {
    .jd-container {
        flex-direction: column;
        padding: 0 12px;
        margin: 12px auto;
    }

    .jd-sidebar {
        width: 100%;
    }

    .jd-header-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 12px;
        gap: 10px;
    }

    .jd-header-search {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .jd-nav {
        gap: 16px;
    }

    .jd-detail-card {
        padding: 20px 16px;
    }

    .jd-detail-title {
        font-size: 22px;
    }

    .jd-prev-next {
        flex-direction: column;
    }

    .jd-banner {
        padding: 32px 20px;
    }

    .jd-banner h1 {
        font-size: 24px;
    }

    .jd-hero-search {
        padding: 24px 16px;
    }

    .jd-hero-search-bar {
        flex-direction: column;
    }

    .jd-hero-search-bar input {
        border-right: 2px solid var(--color-border);
        border-radius: var(--radius-md);
        margin-bottom: 8px;
    }

    .jd-hero-search-bar button {
        border-radius: var(--radius-md);
    }
}