﻿/* 全局变量 */
: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);
    --gradient-bg: linear-gradient(135deg, #f9f6ec 0%, #f3e9d7 100%);
}

/* 主体内容区域 */
.main-content {
    max-width: 1200px;
    display: flex;
    flex-wrap: wrap;
}

/* 左侧主要内容区域 */
.content-left {
    flex: 1;
    min-width: 300px;
    background: var(--gradient-bg);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

/* 右侧作者信息区域 */
.content-right {
    width: 300px;
    background: var(--gradient-bg);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

/* 名句内容样式 */
.mingju-content {
    margin-bottom: 10px;
}

.mingju-text, .mingju-meta {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.mingju-text {
    font-size: 22px;
    color: #5a4321;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    font-weight: normal;
    line-height: 1.6;
}

    .mingju-text:after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 2px;
        background: linear-gradient(to right, transparent, var(--hover-color), transparent);
    }

.mingju-meta {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 0;
    font-size: 16px;
    letter-spacing: 1px;
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
}

/* 原文区域样式 */
.mingju-source {
    background: rgba(255, 255, 255, 0.9);
    padding: 5px;
    border-radius: 15px;
    margin-bottom: 5px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    min-height:200px;
}

    .mingju-source h2, .mingju-source h3 {
        color: #5a4321;
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--hover-color);
        position: relative;
        font-weight: normal;
    }

        .mingju-source h2:after, .mingju-source h3:after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 40px;
            height: 2px;
            background: var(--hover-color);
        }

    .mingju-source .content {
        font-size: 16px;
        line-height: 1.8;
        color: #6d5b3b;
        text-align: justify;
        white-space: pre-line;
    }

/* 作者信息样式 */
.author-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
    margin-top: 3px;
    margin-bottom: 3px;
    width: 100%;
    box-sizing: border-box;
}

.author-header {
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e6d8b6;
    flex-shrink: 0;
}

.author-name {
    font-size: 20px;
    font-weight: bold;
    color: #5a4321;
    margin-right: 8px;
}

.author-dynasty {
    color: var(--text-light);
    font-size: 14px;
    font-weight: normal;
}

.author-desc {
    color: #6d5b3b;
    line-height: 1.8;
    font-size: 14px;
    text-align: left;
    word-break: break-all;
}

/* 相关名句列表 */
.related-mingju {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
    margin-top: 3px;
    margin-bottom: 3px;
}

    .related-mingju h3 {
        color: #5a4321;
        font-size: 20px;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--hover-color);
        text-align: center;
        position: relative;
    }

        .related-mingju h3:after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 50%;
            transform: translateX(-50%);
            width: 40px;
            height: 2px;
            background: var(--hover-color);
        }

.related-list {
    list-style: none;
    padding: 0;
}

    .related-list li {
        margin-bottom: 15px;
        padding-bottom: 15px;
        border-bottom: 1px dashed var(--border-color);
        color: #6d5b3b;
        font-size: 14px;
        line-height: 1.6;
    }

        .related-list li:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

/* 拼音和注音样式 */
.mingju-pinyin {
    background: rgba(255, 255, 255, 0.9);
    padding: 5px;
    border-radius: 15px;
    margin-bottom: 5px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

    .mingju-pinyin h2, .mingju-pinyin h3 {
        color: #5a4321;
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--hover-color);
        position: relative;
        font-weight: normal;
    }

        .mingju-pinyin h2:after, .mingju-pinyin h3:after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 40px;
            height: 2px;
            background: var(--hover-color);
        }

.pinyin-content {
    font-size: 16px;
    line-height: 1.8;
    color: #6d5b3b;
    text-align: justify;
    white-space: pre-line;
}

.mingju-zhuyin {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    margin-bottom: 5px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

    .mingju-zhuyin h2, .mingju-zhuyin h3 {
        color: #5a4321;
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--hover-color);
        position: relative;
        font-weight: normal;
    }

        .mingju-zhuyin h2:after, .mingju-zhuyin h3:after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 40px;
            height: 2px;
            background: var(--hover-color);
        }

.zhuyin-content {
    font-size: 16px;
    line-height: 1.8;
    color: #6d5b3b;
    text-align: justify;
    white-space: pre-line;
}




.pinyin-content .pinyin-char-group {
    margin: 0 5px;
}

.zhuyin-content .pinyin-wrapper {
    margin: 0;
    width: 100%;
}

.zhuyin-content .pinyin-line {
    justify-content: center;
    margin: 5px 0;
}

.zhuyin-content .pinyin-char-group.mizige {
    margin: 0 8px 15px 8px;
}

.zhuyin-content .pinyin-char-group.mizige .hanzi-wrap {
    width: 50px;
    height: 50px;
}

.zhuyin-content .pinyin-char-group.mizige .hanzi {
    font-size: 24px;
    line-height: 50px;
}

.zhuyin-content .pinyin-char-group.mizige .pinyin-outside {
    font-size: 12px;
    margin-bottom: 5px;
}

@media screen and (max-width: 768px) {
    .zhuyin-content .pinyin-char-group.mizige .hanzi-wrap {
        width: 40px;
        height: 40px;
    }
    
    .zhuyin-content .pinyin-char-group.mizige .hanzi {
        font-size: 20px;
        line-height: 40px;
    }
    
    .zhuyin-content .pinyin-char-group.mizige .pinyin-outside {
        font-size: 10px;
    }
}

/* 响应式布局 */
@media screen and (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }

    .content-left {
        border-radius: 20px 20px 0 0;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
    }

    .content-right {
        width: 100%;
        border-radius: 0 0 20px 20px;
        border-left: 1px solid var(--border-color);
    }

    .author-info {
        display: flex;
        gap: 20px;
    }

    .author-avatar {
        margin-bottom: 0;
    }
}

@media screen and (max-width: 768px) {

    .mingju-text {
        font-size: 28px;
    }

    .author-info {
        padding: 20px;
        display: flex;
        gap: 15px;
        align-items: flex-start;
    }

    .author-header {
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 0;
        margin-bottom: 0;
    }

    .author-avatar {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    /* 作者名称和朝代容器 */
    .author-name-info {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    .author-name {
        font-size: 18px;
        margin: 0;
        line-height: 1.2;
        font-weight: bold;
    }

    .author-dynasty {
        font-size: 13px;
        line-height: 1.2;
        color: #666;
        background: rgba(0,0,0,0.05);
        padding: 2px 8px;
        border-radius: 12px;
        white-space: nowrap;
    }

    .author-desc {
        font-size: 13px;
        line-height: 1.6;
        margin-top: 5px;
    }

    /* 相关名句区域移动端优化 */
    .related-mingju {
        padding: 20px;
    }

    .related-mingju h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .related-list li {
        margin-bottom: 10px;
        font-size: 14px;
        line-height: 1.5;
    }

    /* 返回链接区域移动端优化 */
    .back-links {
        padding: 15px 20px;
        text-align: center;
    }

    .back-btn {
        display: inline-block;
        margin: 5px;
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* 超小屏幕优化 */
@media screen and (max-width: 480px) {
    .author-info {
        padding: 15px;
        gap: 12px;
    }

    .author-avatar {
        width: 60px;
        height: 60px;
    }

    .author-name-info {
        gap: 8px;
    }

    .author-name {
        font-size: 16px;
    }

    .author-dynasty {
        font-size: 11px;
        padding: 1px 6px;
    }

    .author-desc {
        font-size: 12px;
    }
}

.mingju-title {
    text-align: center;
    font-size: 22px;
    font-weight: normal;
    color: #5a4321;
    margin-bottom: 20px;
    line-height: 1.6;
}

.mingju-title-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 5px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

/* 访问量样式 */
.hits {
    color: var(--text-lighter);
    font-size: 14px;
    margin-left: 10px;
}

/* 名句展示区域 */
.mingju-display {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.mingju-display h2 {
    color: #5a4321;
    font-size: 18px;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--hover-color);
    position: relative;
    font-weight: normal;
}

.mingju-display h2:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--hover-color);
}

.mingju-text {
    font-size: 20px;
    color: #5a4321;
    line-height: 1.8;
    text-align: center;
    font-weight: 500;
}

/* 作者简介区域 */
.author-intro {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.author-intro h2 {
    color: #5a4321;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hover-color);
    position: relative;
    font-weight: normal;
}

.author-intro h2:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--hover-color);
}

.intro-content {
    color: #6d5b3b;
    line-height: 1.8;
    font-size: 15px;
}

/* 出处信息区域 */
.source-info {
    color: #6d5b3b;
    line-height: 1.8;
    font-size: 15px;
}

/* 返回链接样式 */
.back-links {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    text-align: center;
}

.back-btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
}

.back-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 140, 187, 0.3);
}

/* 相关名句链接样式优化 */
.related-list a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-list a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 性能优化：减少重绘和回流 */
.mingju-content,
.author-info,
.related-mingju,
.back-links {
    will-change: transform;
    transform: translateZ(0);
}

/* 图片懒加载优化 */
.author-avatar {
    transition: opacity 0.3s ease;
}

.author-avatar[loading="lazy"] {
    opacity: 0.8;
}

.author-avatar:not([loading="lazy"]) {
    opacity: 1;
}

/* Panel控件样式优化 */
.dynasty-panel,
.source-panel,
.dynasty-right-panel {
    display: inline;
}

.dynasty-panel .dynasty,
.source-panel .source,
.dynasty-right-panel .author-dynasty {
    margin-left: 10px;
}

/* 确保Panel在隐藏时不占用空间 */
.dynasty-panel[style*="display:none"],
.source-panel[style*="display:none"],
.dynasty-right-panel[style*="display:none"] {
    display: none !important;
}

/* ASP.NET控件样式重置 */
.mingju-content label,
.author-info label {
    display: inline;
    font-weight: inherit;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

/* Image控件样式 */
.author-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e6d8b6;
    flex-shrink: 0;
    transition: opacity 0.3s ease;
}

/* HyperLink控件样式 */
.back-links a {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
}

.back-links a:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 140, 187, 0.3);
}