﻿/* 古籍解译详情页样式 */

/* 重置和基础样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 容器布局 */
.bookjieyi-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    min-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}




/* 古籍解译标题区域 */
.bookjieyi-header {
    text-align: center;
    margin-bottom: 5px;
    padding: 5px;
    background: linear-gradient(135deg, #f9f6ec 0%, #fefcf8 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e6d8b6;
}

.bookjieyi-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23b89b5b" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23b89b5b" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.bookjieyi-title {
    font-size: 32px;
    color: #4e8cbb;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.bookjieyi-meta {
    color: #666;
    font-size: 16px;
    position: relative;
    z-index: 1;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-label {
    font-weight: 600;
    color: #b89b5b;
}

.meta-value {
    color: #555;
}

.bookjieyi-meta a {
    color: #4e8cbb;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.bookjieyi-meta a:hover {
    text-decoration: underline;
    color: #3a7cb2;
}

/* 古籍解译内容区域 */
.bookjieyi-content-section {
    margin-bottom: 5px;
    padding: 5px;
    background: linear-gradient(135deg, #f9f6ec 0%, #fefcf8 100%);
    border-radius: 12px;
    border: 1px solid #e6d8b6;
}

.bookjieyi-content-section h2 {
    color: #4e8cbb;
    margin-bottom: 5px;
    font-size: 20px;
    font-weight: 600;
    position: relative;
    padding-left: 30px;
}

.bookjieyi-content-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #4e8cbb, #3a7cb2);
    border-radius: 2px;
}

/* 古籍解译内容 */
.bookjieyi-content {
    background: linear-gradient(135deg, #ffffff 0%, #fefcf8 100%);
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 5px;
    line-height: 2;
    font-size: 18px;
    color: #333;
    border: 1px solid #e6d8b6;
    box-shadow: 0 4px 15px rgba(184, 155, 91, 0.1);
    position: relative;
}

.bookjieyi-content::before {
    content: '"';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 60px;
    color: #b89b5b;
    opacity: 0.3;
    font-family: serif;
}

.bookjieyi-content::after {
    content: '"';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 60px;
    color: #b89b5b;
    opacity: 0.3;
    font-family: serif;
}

.bookjieyi-content p {
    margin-bottom: 20px;
    text-indent: 2em;
    position: relative;
    z-index: 1;
}

.bookjieyi-content p:last-child {
    margin-bottom: 0;
}

/* 原文内容区域 */
.original-content-section {
    margin-bottom: 5px;
    padding: 5px;
    background: #f9f6ec;
    border-radius: 12px;
    border: 1px solid #e6d8b6;
}

.original-content-section h3 {
    color: #4e8cbb;
    margin-bottom: 5px;
    font-size: 20px;
    font-weight: 600;
    position: relative;
    padding-left: 30px;
}

.original-content-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #4e8cbb, #3a7cb2);
    border-radius: 2px;
}

.original-content-wrapper {
    position: relative;
}

.chapter-info-tag {
    background: linear-gradient(135deg, #fefcf8, #f9f6ec);
    border: 1px solid #e6d8b6;
    border-radius: 20px;
    padding: 8px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #b89b5b;
    font-weight: 500;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(184, 155, 91, 0.1);
}

.original-content {
    font-size: 16px;
    line-height: 2;
    color: #333;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e6d8b6;
    box-shadow: 0 2px 8px rgba(184, 155, 91, 0.05);
    min-height: 200px;
}

.content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, rgba(248, 251, 255, 0.95));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    cursor: pointer;
    border-radius: 0 0 8px 8px;
}

.overlay-hint {
    background: rgba(44, 90, 160, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.overlay-hint:hover {
    background: rgba(44, 90, 160, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
}

.hint-text {
    font-size: 14px;
    font-weight: 500;
}

.view-full-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white !important;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.2);
    display: inline-block;
}

.view-full-btn:hover {
    background: linear-gradient(135deg, #20c997, #28a745);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3);
    color: white !important;
    text-decoration: none;
}

/* 作者信息区域 */


/* 相关推荐区域 */
.related-section {
    margin-bottom: 5px;
    padding: 5px;
    background: #f9f6ec;
    border-radius: 12px;
    border: 1px solid #e6d8b6;
}

.related-section h3 {
    color: #4e8cbb;
    margin-bottom: 5px;
    font-size: 20px;
    font-weight: 600;
    position: relative;
    padding-left: 30px;
}

.related-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(to bottom, #4e8cbb, #3a7cb2);
    border-radius: 2px;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.related-item {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e6d8b6;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(184, 155, 91, 0.05);
    overflow: hidden;
}

.related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(184, 155, 91, 0.15);
    border-color: #b89b5b;
}

.related-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.related-link:hover {
    color: #4e8cbb;
    text-decoration: none;
}

.related-title {
    font-weight: 600;
    font-size: 16px;
    flex: 1;
    line-height: 1.4;
    color: inherit;
}

.related-book {
    font-size: 12px;
    color: #b89b5b;
    background: #fefcf8;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    font-weight: 500;
}

.related-author {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    font-weight: 400;
}

/* 返回列表按钮 */
.back-to-list {
    text-align: center;
    padding-top: 5px;
    border-top: 2px solid #e6d8b6;
}

.back-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #4e8cbb, #3a7cb2);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(78, 140, 187, 0.2);
}

.back-btn:hover {
    background: linear-gradient(135deg, #3a7cb2, #4e8cbb);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 140, 187, 0.3);
    color: #fff;
    text-decoration: none;
}

/* 错误信息样式 */
.error-message {
    background: #fff2f2;
    border: 1px solid #ffcccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #cc0000;
}

.error-message h3 {
    color: #cc0000;
    margin-bottom: 15px;
}

.error-message p {
    margin-bottom: 10px;
}

.error-message ul {
    text-align: left;
    max-width: 400px;
    margin: 0 auto 20px;
}

.error-message a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
}

.error-message a:hover {
    text-decoration: underline;
}

/* 响应式设计 - 平板端 */
@media (max-width: 992px) {
    .related-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* 响应式设计 - 手机端 */
@media (max-width: 768px) {




    .bookjieyi-title {
        font-size: 24px;
    }

    /* 手机端元信息优化为两列布局 */
    .bookjieyi-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 15px;
        font-size: 14px;
    }
    
    .meta-item {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 6px 8px;
        background: rgba(44, 90, 160, 0.05);
        border-radius: 6px;
        border-left: 3px solid #2c5aa0;
    }
    
    .meta-label {
        font-size: 12px;
        font-weight: 500;
        color: #2c5aa0;
        white-space: nowrap;
    }
    
    .meta-value {
        font-size: 12px;
        color: #333;
        font-weight: 400;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bookjieyi-content {
        padding: 25px 20px;
        font-size: 16px;
    }



    .related-list {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    
    .related-link {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 12px;
        flex-wrap: wrap;
    }
    
    .related-title {
        font-size: 15px;
        line-height: 1.3;
        flex: 1;
        min-width: 0;
    }
    
    .chapter-info-tag {
        font-size: 13px;
        padding: 6px 12px;
        margin-bottom: 5px;
    }
    
    .original-content {
        padding: 0;
        font-size: 15px;
        line-height: 1.8;
    }
    
    .overlay-hint {
        flex-direction: column;
        gap: 8px;
        padding: 10px 15px;
        margin-bottom: 15px;
    }
    
    .hint-text {
        font-size: 13px;
    }

        .original-content-section,
    .bookjieyi-content-section {
        padding: 5px;
    }
    
    .bookjieyi-content-section h2,
    .original-content-section h3,
    .related-section h3 {
        font-size: 18px;
        padding-left: 25px;
    }
    
    .bookjieyi-content-section h2::before,
    .original-content-section h3::before,
    .related-section h3::before {
        width: 3px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .bookjieyi-title {
        font-size: 20px;
    }
    
    /* 超小屏幕元信息改为单列布局 */
    .bookjieyi-meta {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .meta-item {
        padding: 5px 8px;
    }
    
    .meta-label,
    .meta-value {
        font-size: 16px;
    }

    .bookjieyi-content {
        padding: 0;
        font-size: 15px;
    }

    .bookjieyi-content::before,
    .bookjieyi-content::after {
        font-size: 40px;
    }

    .original-content-section h3,
    .related-section h3 {
        font-size: 18px;
    }
    
    /* 确保小屏幕上相关推荐每行1条 */
    .related-list {
        grid-template-columns: 1fr !important;
        gap: 1px;
    }
    
    .related-item {
        margin-bottom: 3px;
    }
    
    .related-link {
        padding: 10px;
        gap: 6px;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap;
    }
    
    .related-title {
        font-size: 14px;
        line-height: 1.2;
        flex: 1;
        min-width: 0;
        margin-right: 8px;
    }
    
    .related-book,
    .related-author {
        font-size: 11px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .related-book {
        margin-right: 6px;
    }
}

/* 展开功能样式 */
.original-content-card,
.jieyi-content-card {
    position: relative;
}

/* 原文内容的展开样式 */
.original-content-card .expand-content {
    font-size: 16px;
    line-height: 2;
    color: #333;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e6d8b6;
    box-shadow: 0 2px 8px rgba(184, 155, 91, 0.05);
    min-height: 200px;
    max-height: 500px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

/* 古籍解译内容的展开样式 */
.jieyi-content-card .expand-content {
    background: linear-gradient(135deg, #ffffff 0%, #fefcf8 100%);
    padding: 40px;
    border-radius: 12px;
    line-height: 2;
    font-size: 18px;
    color: #333;
    border: 1px solid #e6d8b6;
    box-shadow: 0 4px 15px rgba(184, 155, 91, 0.1);
    position: relative;
    max-height: 400px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* 古籍解译内容的装饰引号 */
.jieyi-content-card .expand-content::before {
    content: '"';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 60px;
    color: #b89b5b;
    opacity: 0.3;
    font-family: serif;
    z-index: 1;
}

/* 非收起状态的右下角装饰引号 */
.jieyi-content-card .expand-content:not(.collapsed)::after {
    content: '"';
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 60px;
    color: #b89b5b;
    opacity: 0.3;
    font-family: serif;
    z-index: 1;
}

/* 古籍解译内容的段落样式 */
.jieyi-content-card .expand-content p {
    margin-bottom: 20px;
    text-indent: 2em;
    position: relative;
    z-index: 1;
}

.jieyi-content-card .expand-content p:last-child {
    margin-bottom: 0;
}

/* 古籍解译内容收起状态的朦胧遮罩 - 使用box-shadow实现 */
.jieyi-content-card .expand-content.collapsed {
    position: relative;
}

.jieyi-content-card .expand-content.collapsed::before {
    content: '"';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 60px;
    color: #b89b5b;
    opacity: 0.3;
    font-family: serif;
    z-index: 1;
}

/* 重新定义收起状态的装饰引号，并添加朦胧遮罩 */
.jieyi-content-card .expand-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(254, 252, 248, 0.95));
    pointer-events: none;
    z-index: 3;
}

.expand-content.expanded {
    max-height: none !important;
    overflow: visible;
}

.expand-content.collapsed {
    max-height: 500px !important;
    overflow: hidden;
}

.expand-content.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none;
}

/* 卡片操作按钮 */
.card-actions {
    margin: 10px;
    text-align: right;
}

.expand-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s ease;
}

.expand-btn:hover {
    background: #2980b9;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .expand-btn {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .original-content-card .expand-content {
        font-size: 15px;
        line-height: 1.8;
        padding: 20px;
        max-height: 300px;
    }
    
    .original-content-card .expand-content.collapsed {
        max-height: 300px !important;
    }
    
    .jieyi-content-card .expand-content {
        font-size: 16px;
        line-height: 1.8;
        padding: 5px;
        max-height: 260px;
    }
    
    .jieyi-content-card .expand-content.collapsed {
        max-height: 260px !important;
    }
    
    /* 移动端装饰引号调整 */
    .jieyi-content-card .expand-content::before,
    .jieyi-content-card .expand-content::after {
        font-size: 40px;
    }
    
    .jieyi-content-card .expand-content::before {
        top: 10px;
        left: 15px;
    }
    
    .jieyi-content-card .expand-content::after {
        bottom: 10px;
        right: 15px;
    }
} 