body {
    font-family: 'KaiTi', 'STKaiti', serif;
    background-color: #f8f5f0;
    color: #333;
}

/** 共用 **/
.btn-primary {
    background-color: #8b4513;
    border-color: #8b4513;
}

.btn-primary:hover {
    background-color: #6d3410;
    border-color: #6d3410;
}

.btn-outline-primary {
    color: #8b4513;
    border-color: #8b4513;
}

.btn-outline-primary:hover {
    background-color: #8b4513;
    border-color: #8b4513;
    color: white;
}

.tag {
    display: inline-block;
    background-color: #f0e6d2;
    color: #8b4513;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-right: 8px;
}

.famous-works {
    font-size: 0.95rem;
    color: #666;
    margin-top: 10px;
}

.famous-works strong {
    color: #8b4513;
}

.search-box {
    margin-bottom: 30px;
}

.search-box input {
    border: 2px solid #d4a574;
    border-radius: 25px;
    padding: 10px 20px;
}

.search-box input:focus {
    border-color: #8b4513;
    box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25);
}

.search-box .form-select {
    border: 2px solid #d4a574;
    border-left: none;
    border-right: none;
    padding: 10px 15px;
    color: #8b4513;
    background-color: white;
}

.search-box .form-select:focus {
    border-color: #8b4513;
    box-shadow: none;
}

.search-box .btn-primary {
    border-radius: 0 25px 25px 0; /* 右侧圆角 */
    padding: 10px 30px;
}

.search-box .input-group {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 25px;
}

.pagination {
    justify-content: center;
    margin-top: 40px;
}

.page-link {
    color: #8b4513;
}

.page-item.active .page-link {
    background-color: #8b4513;
    border-color: #8b4513;
}

/** 导航 **/
.navbar {
    background-color: #8b4513;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    color: #fff !important;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-link {
    color: #f0e6d2 !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #fff !important;
}

/** hero区域 **/
.hero-section {
    background: linear-gradient(rgba(139, 69, 19, 0.7), rgba(139, 69, 19, 0.7)),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23d4a574" width="1200" height="600"/><path fill="%23c19a6b" d="M0 300L50 280L100 320L150 290L200 310L250 285L300 305L350 295L400 315L450 288L500 308L550 292L600 312L650 290L700 310L750 295L800 315L850 285L900 305L950 295L1000 315L1050 290L1100 310L1150 295L1200 315V600H0Z"/></svg>');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/** 二级页头部区域 **/
.page-header {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header .meta-info {
    font-size: 1.2rem;
    opacity: 0.95;
}

.page-header .meta-info a {
    color: #f0e6d2;
    text-decoration: none;
    border-bottom: 1px solid #f0e6d2;
}

.page-header .meta-info a:hover {
    color: white;
    border-bottom-color: white;
}

.author-header {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.author-header-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.author-avatar-large {
    width: 150px;
    height: 150px;
    background-color: #d4a574;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.author-header-info h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.author-header-info .meta {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 15px;
}

.author-header-info .brief {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
}

/** 诗词卡片 **/
.poetry-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #8b4513;
}

.poetry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.poetry-title {
    color: #8b4513;
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.poetry-title a {
    color: inherit; /* 继承父元素颜色 */
    font-size: inherit; /* 继承父元素字体大小 */
    font-weight: inherit; /* 继承父元素粗细 */
    text-decoration: none; /* 去掉下划线 */
}

.poetry-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.poetry-meta span {
    margin-right: 15px;
}

.poetry-meta span a {
    color: inherit; /* 继承父元素颜色 */
    font-size: inherit; /* 继承父元素字体大小 */
    font-weight: inherit; /* 继承父元素粗细 */
    text-decoration: none; /* 去掉下划线 */
}

.poetry-content {
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;

    white-space: pre-line;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    position: relative;
}

/* 默认不显示渐隐 */
.poetry-content::after {
    display: none;
}

/* 超过 4 行才显示 */
.poetry-content.show::after {
    display: block;
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.8em;
    background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0),
            #fff
    );
}

.poetry-tags {
    margin-top: 15px;
}

/** 作者卡片 **/
.author-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 25px;
    border-left: 4px solid #8b4513;
}

.author-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.author-card-content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.author-avatar {
    width: 100px;
    height: 100px;
    background-color: #d4a574;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.author-info {
    flex: 1;
}

.author-name {
    color: #8b4513;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.author-name a {
    color: inherit; /* 继承父元素颜色 */
    font-size: inherit; /* 继承父元素字体大小 */
    font-weight: inherit; /* 继承父元素粗细 */
    text-decoration: none; /* 去掉下划线 */
}

.author-meta {
    color: #666;
    font-size: 1rem;
    margin-bottom: 12px;
}

.author-meta span {
    margin-right: 15px;
}

.author-intro {
    color: #444;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.author-tags {
    margin-bottom: 15px;
}

/** section **/
.section-title {
    text-align: center;
    margin: 50px 0 30px;
    color: #8b4513;
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #8b4513;
    margin: 15px auto 0;
}

/** 过滤section **/
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-section h5 {
    color: #8b4513;
    margin-bottom: 15px;
}

.filter-btn {
    margin: 5px;
    padding: 5px 15px;
    background-color: #f0e6d2;
    border: 1px solid #d4a574;
    color: #8b4513;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background-color: #8b4513;
    color: white;
}

/** 诗词详情页 **/
#poetry-detail {
    .main-content {
        background: white;
        border-radius: 8px;
        padding: 40px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 30px;
    }

    .poetry-text {
        font-size: 1.5rem;
        line-height: 2.5;
        text-align: center;
        color: #2c2c2c;
        margin: 40px 0;
        padding: 30px;
        background-color: #faf8f5;
        border-radius: 8px;
        border: 2px solid #d4a574;
    }

    .translation, .annotation, .appreciation {
        font-size: 1.1rem;
        line-height: 2;
        color: #444;
        margin-bottom: 20px;
    }

    .annotation-item {
        margin-bottom: 15px;
        padding: 15px;
        background-color: #faf8f5;
        border-left: 3px solid #8b4513;
        border-radius: 4px;
    }

    .annotation-item strong {
        color: #8b4513;
    }

    .tags-section {
        margin: 30px 0;
    }

    .tag {
        display: inline-block;
        background-color: #8b4513;
        color: white;
        padding: 8px 20px;
        border-radius: 20px;
        font-size: 1rem;
        margin-right: 10px;
        margin-bottom: 10px;
    }

    .sidebar {
        background: white;
        border-radius: 8px;
        padding: 25px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 30px;
    }

    .sidebar h4 {
        color: #8b4513;
        margin-bottom: 20px;
        font-size: 1.3rem;
    }

    .author-info {
        text-align: center;
        margin-bottom: 20px;
    }

    .author-avatar {
        width: 100px;
        height: 100px;
        background-color: #d4a574;
        border-radius: 50%;
        margin: 0 auto 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.5rem;
        color: white;
    }

    .author-name {
        font-size: 1.3rem;
        color: #8b4513;
        font-weight: bold;
        margin-bottom: 5px;
    }

    .author-dynasty {
        color: #666;
        margin-bottom: 15px;
    }

    .related-poetry {
        list-style: none;
        padding: 0;
    }

    .related-poetry li {
        padding: 12px;
        margin-bottom: 10px;
        background-color: #faf8f5;
        border-radius: 4px;
        transition: background-color 0.3s;
    }

    .related-poetry li:hover {
        background-color: #f0e6d2;
    }

    .related-poetry a {
        color: #333;
        text-decoration: none;
    }

    .related-poetry a:hover {
        color: #8b4513;
    }
}

/** 作者详情页 **/
#author-detail {
    .info-card {
        background: white;
        border-radius: 8px;
        padding: 30px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 30px;
    }

    .section-title {
        color: #8b4513;
        font-size: 1.8rem;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #d4a574;
    }

    .biography {
        font-size: 1.1rem;
        line-height: 2;
        color: #444;
    }

    .biography p {
        margin-bottom: 20px;
        text-indent: 2em;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }

    .stat-item {
        background-color: #faf8f5;
        padding: 25px;
        border-radius: 8px;
        text-align: center;
        border: 2px solid #d4a574;
    }

    .stat-number {
        font-size: 2.5rem;
        color: #8b4513;
        font-weight: bold;
        margin-bottom: 10px;
    }

    .stat-label {
        color: #666;
        font-size: 1rem;
    }

    .achievement-list {
        list-style: none;
        padding: 0;
    }

    .achievement-list li {
        padding: 15px 20px;
        margin-bottom: 10px;
        background-color: #faf8f5;
        border-left: 4px solid #8b4513;
        border-radius: 4px;
        font-size: 1.05rem;
    }

    .achievement-list li::before {
        content: "✦ ";
        color: #8b4513;
        font-weight: bold;
        margin-right: 10px;
    }

    .poetry-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .quote-box {
        background: linear-gradient(135deg, #faf8f5 0%, #f0e6d2 100%);
        border-left: 5px solid #8b4513;
        padding: 25px 30px;
        margin: 30px 0;
        border-radius: 4px;
        font-size: 1.2rem;
        line-height: 1.8;
        color: #444;
        font-style: italic;
    }

    .timeline {
        position: relative;
        padding-left: 40px;
    }

    .timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 2px;
        background-color: #d4a574;
    }

    .timeline-item {
        position: relative;
        margin-bottom: 30px;
        padding: 20px;
        background-color: #faf8f5;
        border-radius: 8px;
    }

    .timeline-item::before {
        content: '';
        position: absolute;
        left: -31px;
        top: 25px;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: #8b4513;
        border: 3px solid #f8f5f0;
    }

    .timeline-year {
        color: #8b4513;
        font-weight: bold;
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .timeline-content {
        color: #444;
        line-height: 1.8;
    }


    .relationship-container {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        margin-top: 1rem;
    }

    .relationship-item {
        padding: 1.5rem;
        background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
        border-left: 4px solid #8b4513;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .relationship-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
    }

    .relationship-type {
        display: inline-block;
        padding: 0.25rem 0.75rem;
        background: #8b4513;
        color: white;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }

    .relationship-name {
        font-size: 1.2rem;
        font-weight: 700;
        color: #2c3e50;
        margin-bottom: 0.5rem;
    }

    .relationship-desc {
        color: #666;
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* 响应式设计 */
    @media (max-width: 1200px) {
        .relationship-container {
            grid-template-columns: repeat(3, 1fr);
        }
    }

    @media (max-width: 768px) {
        .relationship-container {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 480px) {
        .relationship-container {
            grid-template-columns: 1fr;
        }
    }
}

/** 页脚 **/
.footer {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #f0e6d2;
    border-top: 3px solid #d4a574;
}

.footer-brand {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-desc {
    color: #f0e6d2;
    line-height: 1.8;
    font-size: 0.95rem;
    opacity: 0.95;
}

.footer-subtitle {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #d4a574;
}

.footer-links {
    line-height: 2.2;
}

.footer-links a {
    color: #f0e6d2;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-block;
}

.footer-links a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-tags .tag {
    background-color: rgba(212, 165, 116, 0.3);
    color: #f0e6d2;
    border: 1px solid #d4a574;
    font-size: 0.8rem;
    padding: 4px 12px;
}

.footer-bottom {
    border-top: 1px solid rgba(212, 165, 116, 0.3);
}

.footer-copyright {
    color: #f0e6d2;
    font-size: 0.9rem;
}

.footer-copyright a {
    color: #f0e6d2;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.footer-copyright a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.footer-slogan {
    color: #d4a574;
    font-size: 0.95rem;
    font-weight: 500;
    font-style: italic;
}

/* 响应式 */
@media (max-width: 768px) {
    .footer {
        text-align: center;
    }

    .footer-subtitle::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links a:hover {
        padding-left: 0;
    }
}