﻿:root {
    --primary-color: #4e8cbb;
    --primary-dark: #3a7cb2;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #f5f5f5;
    --border-color: #e6d8b6;
    --hover-color: #b89b5b;
    --section-bg: #f9f6ec;
    --card-shadow: 0 2px 12px rgba(180,160,100,0.10);
}

/* 主体布局 */
.g-bd {
    padding: 20px 0;
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-content {
    width: 100%;
    margin: 0 auto;
}

/* 面包屑导航 - 古典风格 */
.breadcrumb {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: var(--section-bg);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin: 0 10px;
    color: var(--text-lighter);
    font-weight: bold;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--hover-color);
}

.breadcrumb li:last-child span {
    color: var(--hover-color);
    font-weight: bold;
}

/* 专题介绍区域 - 古典卡片风格 */
.topic-header {
    background: var(--section-bg);
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
}

.topic-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hover-color), var(--border-color), var(--hover-color));
    border-radius: 14px 14px 0 0;
}

.topic-header h1 {
    font-size: 24px;
    color: #7c5c1e;
    margin: 0 0 15px;
    font-weight: bold;
    letter-spacing: 1px;
}

.topic-meta {
    margin-bottom: 15px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 20px;
}

.topic-type {
    background: #f3e9d7;
    color: var(--hover-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

.topic-count {
    color: var(--hover-color);
    font-weight: bold;
}

.topic-description {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 15px;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 15px;
}

/* 内容列表区域 */
.content-section {
    margin-bottom: 30px;
}

/* 栏目标题样式 - 古典风格 */
.section-title {
    background: var(--section-bg);
    padding: 20px 30px;
    margin-bottom: 25px;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    text-align: center;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hover-color), var(--border-color), var(--hover-color));
    border-radius: 14px 14px 0 0;
}

.section-title h2 {
    font-size: 20px;
    color: #7c5c1e;
    margin: 0;
    font-weight: bold;
    letter-spacing: 2px;
    position: relative;
}

.section-title h2::before,
.section-title h2::after {
    content: '◆';
    color: var(--hover-color);
    font-size: 16px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.section-title h2::before {
    left: -30px;
}

.section-title h2::after {
    right: -30px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* 通用卡片样式 - 古典风格 */
.content-card {
    background: var(--section-bg);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    padding: 20px;
    cursor: pointer;
    /* 固定卡片尺寸 */
    width: 100%;
    height: 180px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hover-color), var(--border-color), var(--hover-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(180,160,100,0.18);
    border-color: var(--hover-color);
}

.content-card:hover::before {
    opacity: 1;
}

/* 诗词卡片样式 - 古典书卷风格 */
.poetry-card {
    background: linear-gradient(135deg, #fefcf8 0%, var(--section-bg) 100%);
    /* 移除min-height，使用固定高度 */
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 诗词引用样式 - 主要内容区域 */
.poetry-card .poetry-quote {
    margin: 0;
    padding: 0 20px 0 0;
    font-size: 16px;
    color: #5a4321;
    line-height: 1.6;
    font-weight: 500;
    text-align: left;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    /* 内容文本截取 - 显示2行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.2em; /* 限制高度为2行 */
}

.poetry-card .poetry-quote a {
    color: #5a4321;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    width: 100%;
}

.poetry-card .poetry-quote a:hover {
    color: var(--hover-color);
}

/* 诗词来源信息 - 底部区域 */
.poetry-card .poetry-source {
    color: var(--text-light);
    font-size: 12px;
    text-align: left;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.poetry-card .poetry-source .source-title {
    color: var(--hover-color);
    font-weight: bold;
    font-size: 12px;
    background: #f3e9d7;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    /* 标题文本截取 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.poetry-card .source-author {
    color: var(--text-light);
    font-size: 11px;
    background: #f3e9d7;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
}

.poetry-card .source-dynasty {
    color: var(--hover-color);
    font-size: 11px;
    background: #f3e9d7;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60px;
}



/* 名句卡片样式 - 古典竹简风格 */
.mingju-card {
    background: linear-gradient(135deg, #f9f6ec 0%, #f3e9d7 100%);
    padding: 20px;
    /* 固定高度 */
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 名句引用样式 - 主要内容区域 */
.mingju-card .mingju-quote {
    margin: 0;
    padding: 0 20px 0 0;
    font-size: 16px;
    color: #5a4321;
    line-height: 1.6;
    font-weight: 500;
    text-align: left;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    /* 内容文本截取 - 显示2行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.2em; /* 限制高度为2行 */
}

.mingju-card .mingju-quote a {
    color: #5a4321;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    width: 100%;
}

.mingju-card .mingju-quote a:hover {
    color: var(--hover-color);
}

.mingju-card .mingju-quote::before,
.mingju-card .mingju-quote::after {
    content: '"';
    color: var(--hover-color);
    font-size: 18px;
    font-weight: bold;
    position: absolute;
}

.mingju-card .mingju-quote::before {
    left: -10px;
    top: 0;
}

.mingju-card .mingju-quote::after {
    right: 5px;
    bottom: 0;
}

/* 名句来源信息 - 底部区域 */
.mingju-card .mingju-source {
    color: var(--text-light);
    font-size: 12px;
    text-align: left;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mingju-card .mingju-source .source-title {
    color: var(--hover-color);
    font-weight: bold;
    font-size: 12px;
    background: #f3e9d7;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    /* 标题文本截取 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.mingju-card .source-author {
    color: var(--text-light);
    font-size: 11px;
    background: #f3e9d7;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
}

.mingju-card .source-dynasty {
    color: var(--hover-color);
    font-size: 11px;
    background: #f3e9d7;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60px;
}

.mingju-card .mingju-tags {
    margin-top: 8px;
    text-align: center;
}

.mingju-card .mingju-tags .tag {
    background: #f3e9d7;
    color: var(--hover-color);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    margin: 0 2px;
    border: 1px solid var(--border-color);
}

/* 固定标签样式 - 统一高度和宽度，文字过长时显示省略号 */
.fixed-tag {
    display: inline-block !important;
    width: 80px !important;
    height: 24px !important;
    line-height: 20px !important;
    padding: 2px 8px !important;
    margin: 2px 4px 2px 0 !important;
    background: #f3e9d7 !important;
    color: var(--hover-color) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.fixed-tag:hover {
    background: var(--hover-color) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(124, 92, 30, 0.3) !important;
}

/* 成语卡片样式 - 古典印章风格 */
.idiom-card {
    background: linear-gradient(135deg, #fff5f5 0%, #f9f6ec 100%);
    text-align: center;
    /* 固定高度 */
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.idiom-card::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, var(--hover-color) 30%, transparent 30%);
    border-radius: 50%;
    opacity: 0.3;
}

.idiom-card h3 {
    color: #5a4321;
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    /* 标题文本截取 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.idiom-card h3 a {
    color: #5a4321;
    text-decoration: none;
    transition: color 0.3s;
}

.idiom-card h3 a:hover {
    color: var(--hover-color);
}

.idiom-card .idiom-pinyin {
    color: var(--text-light);
    font-size: 12px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.idiom-card .idiom-meaning {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.6;
    padding: 0 5px;
    /* 内容文本截取 - 显示2行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.4em; /* 限制高度为2行 */
}

/* 成语标签样式 */
.idiom-card .idiom-tags {
    margin-top: 12px;
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.idiom-card .idiom-tags .tag {
    display: inline-block;
    background: linear-gradient(135deg, #f3e9d7, #e9d8b4);
    color: var(--hover-color);
    padding: 3px 8px;
    margin: 2px 3px;
    border-radius: 10px;
    font-size: 11px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.idiom-card .idiom-tags .tag:hover {
    background: linear-gradient(135deg, var(--hover-color), #7c5c1e);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(124, 92, 30, 0.3);
}

/* 分页样式 - 古典风格 */
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 20px 30px;
    background: var(--section-bg);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
}

.pagination::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hover-color), var(--border-color), var(--hover-color));
    border-radius: 14px 14px 0 0;
}

.page-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #f3e9d7, #e9d8b4);
    color: var(--hover-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid var(--border-color);
    letter-spacing: 1px;
    min-width: 80px;
    text-align: center;
}

.page-btn:hover {
    background: linear-gradient(135deg, var(--hover-color), #7c5c1e);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 92, 30, 0.3);
}

.page-btn.disabled {
    background: #f0f0f0 !important;
    color: var(--text-lighter) !important;
    cursor: not-allowed;
    pointer-events: none;
    border-color: #ddd !important;
    transform: none !important;
    box-shadow: none !important;
}

.page-btn.disabled:hover {
    background: #f0f0f0 !important;
    color: var(--text-lighter) !important;
    transform: none !important;
    box-shadow: none !important;
}

.page-info {
    font-size: 14px;
    color: var(--text-light);
    margin: 0 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
    background: #f3e9d7;
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .pagination {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .page-btn {
        width: 120px;
        text-align: center;
    }
    
    .topic-header {
        padding: 20px;
    }
    
    .topic-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .section-title h2::before,
    .section-title h2::after {
        display: none;
    }
}

/* 响应式布局 */
@media screen and (max-width: 1200px) {
    .content-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .topic-header h1 {
        font-size: 20px;
    }
    
    .content-card {
        padding: 15px;
        /* 移动端固定高度 */
        height: 160px;
    }
    
    .poetry-card,
    .mingju-card,
    .idiom-card {
        height: 160px;
    }
    
    .poetry-card .poetry-quote,
    .mingju-card .mingju-quote,
    .idiom-card h3 {
        font-size: 14px;
    }
    
    .poetry-card .poetry-quote {
        max-height: 3.6em;
        -webkit-line-clamp: 2;
        padding: 0 15px 0 0;
    }
    
    .poetry-card .poetry-source {
        font-size: 11px;
        padding-top: 8px;
        gap: 6px;
    }
    
    .poetry-card .poetry-source .source-title {
        font-size: 10px;
        padding: 1px 6px;
        max-width: 100px;
    }
    
    .poetry-card .source-author,
    .poetry-card .source-dynasty {
        font-size: 10px;
        padding: 1px 4px;
        max-width: 60px;
    }
    
    .idiom-card .idiom-meaning {
        font-size: 12px;
        height: 2.2em;
    }
    
    .mingju-card .mingju-quote {
        font-size: 14px;
        max-height: 3.6em;
        -webkit-line-clamp: 2;
        padding: 0 15px 0 0;
    }
    
    .mingju-card .mingju-source {
        font-size: 11px;
        padding-top: 8px;
        text-align: left;
        gap: 6px;
    }
    
    .mingju-card .mingju-source .source-title {
        font-size: 10px;
        padding: 1px 6px;
        max-width: 100px;
    }
    
    .mingju-card .source-author,
    .mingju-card .source-dynasty {
        font-size: 10px;
        padding: 1px 4px;
        max-width: 60px;
    }
}

@media screen and (max-width: 576px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-card {
        margin: 0 auto;
        max-width: 320px;
        /* 小屏幕固定高度 */
        height: 150px;
    }
    
    .poetry-card,
    .mingju-card,
    .idiom-card {
        height: 150px;
    }
    
    .breadcrumb {
        padding: 12px 15px;
    }
    
    .breadcrumb li:not(:last-child)::after {
        margin: 0 6px;
    }
}

/* 名句专题内容区域特殊样式 */
#mingJuPanel .content-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#mingJuPanel .mingju-card {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px 30px;
    gap: 30px;
    background: linear-gradient(135deg, #fefcf8 0%, var(--section-bg) 100%);
    /* 名句卡片固定高度 */
    height: 120px;
    box-sizing: border-box;
}

#mingJuPanel .mingju-card blockquote {
    flex: 2;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color);
    position: relative;
    border-right: 1px solid var(--border-color);
    padding-right: 30px;
    text-align: left;
    /* 名句内容文本截取 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.6em;
}

#mingJuPanel .mingju-source {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    text-align: left;
    flex-wrap: wrap;
}

#mingJuPanel .mingju-source .source-title {
    color: var(--hover-color);
    font-weight: bold;
    font-size: 13px;
    background: #f3e9d7;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    /* 标题文本截取 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

#mingJuPanel .mingju-source .source-author {
    color: var(--text-light);
    font-size: 12px;
    background: #f3e9d7;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80px;
}

#mingJuPanel .mingju-source .source-dynasty {
    color: var(--hover-color);
    font-size: 12px;
    background: #f3e9d7;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60px;
}

#mingJuPanel .mingju-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#mingJuPanel .mingju-tags .tag {
    background: #f3e9d7;
    color: var(--hover-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* 响应式布局调整 */
@media screen and (max-width: 768px) {
    #mingJuPanel .mingju-card {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        /* 移动端名句卡片固定高度 */
        height: 140px;
    }

    #mingJuPanel .mingju-card blockquote {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 15px;
        font-size: 14px;
        max-height: 2.8em;
        -webkit-line-clamp: 2;
    }

    #mingJuPanel .mingju-source {
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }
}

/* 保持其他卡片的网格布局 */
#poetryPanel .content-grid,
#idiomPanel .content-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* 确保诗词卡片在网格中正常显示 */
#poetryPanel .poetry-card {
    height: 180px;
} 