:root {
    --gap: 24px;
    --bg-color: #F2ECE0;
    --card-bg: #EEEEEE;
    --mint-green: #CFE1EC;
    --author-color: #9F9F9F;
    --text-color: #2E2E2E;
    --text-muted: #666;
    --divider-color: rgba(0,0,0,0.1);
    --modal-overlay-bg: rgba(0, 0, 0, 0.8);
    --plyr-color-main: #427391;
    --adm-primary: #407291;
    --adm-primary-rgb: 64, 114, 145;
}

/* 鏆楄壊妯″紡鍙橀噺 */
[data-theme="dark"] {
    --bg-color: #1A1A1A;
    --card-bg: #2A2A2A;
    --mint-green: #3A4A5A;
    --author-color: #888;
    --text-color: #E0E0E0;
    --text-muted: #AAA;
    --divider-color: rgba(255,255,255,0.1);
    --modal-overlay-bg: rgba(0, 0, 0, 0.9);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Serif SC', "Source Han Serif SC", "Source Han Serif CN", serif;
    font-weight: 900;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding-top: 80px; /* 涓哄浐瀹氶〉鐪夌暀鍑虹┖闂?*/
    transition: background-color 0.3s, color 0.3s;
    
    /* 鍏ㄥ眬闅愯棌婊氬姩鏉?*/
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Chrome, Safari and Opera 鍏ㄥ眬闅愯棌婊氬姩鏉?*/
*::-webkit-scrollbar {
    display: none;
}

.menu-icon:hover {
    transform: scale(1.1);
}

.container {
    display: flex;
    min-height: 100vh;
    padding: 0 8%; /* 鏁翠釜椤甸潰鏈€宸︿晶鍜屾渶鍙充晶鐣欑櫧 */
    box-sizing: border-box;
    background-color: var(--bg-color);
    transition: background-color 0.3s;
}

.left-space {
    width: 250px;
    flex-shrink: 0;
    background-color: var(--bg-color); /* 鐣欑櫧鍖哄煙鑳屾櫙鍚屾 */
    border-right: 1px solid var(--divider-color); /* 宸﹀彸鏉垮潡涔嬮棿鐨勭珫绾垮垎鍓?*/
    padding: var(--gap);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: background-color 0.3s, border-color 0.3s;
    
    /* 鍥哄畾渚ц竟鏍?*/
    position: sticky;
    top: 80px; /* 涓庨〉鐪夐珮搴﹀榻?*/
    height: calc(100vh - 80px);
    overflow-y: auto;
}

/* 浣滆€呬粙缁嶉〉鏍峰紡 */
.author-profile {
    width: 100%;
}

.profile-cover {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: -40px;
    background-color: var(--card-bg);
}

.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-wrapper {
    padding-left: 20px;
    margin-bottom: 15px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--bg-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: cover;
    transition: border-color 0.3s;
}

.profile-info {
    padding: 0 10px;
}

.profile-name {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-color);
    margin-bottom: 8px;
    word-wrap: break-word; /* 鍏佽鍦ㄥ崟璇嶅唴鎹㈣ */
    overflow-wrap: break-word; /* 澶勭悊婧㈠嚭鐨勬枃鏈?*/
    max-width: 100%; /* 闄愬埗鏈€澶у搴?*/
}

.profile-bio {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
    font-weight: 400;
}

.profile-links {
    display: flex;
    gap: 15px;
}

.profile-links a {
    color: var(--author-color);
    transition: color 0.3s;
}

.profile-links a:hover {
    color: var(--text-color);
}

.profile-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* 鍙姌鍙犳澘鍧楁牱寮?*/
.collapsible-section {
    width: 100%;
    border-top: 1px solid var(--divider-color);
    padding-top: 20px;
    transition: border-color 0.3s;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
}

.section-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--text-color);
}

.section-icon {
    transition: transform 0.3s;
    color: var(--author-color);
}

.section-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 2000px; /* 澧炲姞鏈€澶ч珮搴︿互瀹圭撼鏇村鏍囩 */
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsed .section-content {
    max-height: 0;
}

.collapsed .section-icon {
    transform: rotate(-90deg);
}

.category-item {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    background-color: var(--mint-green);
    color: var(--text-color);
}

.category-item.active {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.category-item:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.right-content {
    flex: 1;
    padding: var(--gap);
    box-sizing: border-box;
}

/* 鐎戝竷娴佸竷灞€ - 鏀逛负 Grid 浠ユ敮鎸佹í鍚戞帓搴?*/
.masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 澶у睆骞曢粯璁?4 鍒?*/
    column-gap: var(--gap);
    row-gap: 0; /* 鍨傜洿闂磋窛鐢?JS 鍖呭惈鍦ㄨ法搴﹀唴锛屾澶勮涓?0 浠ラ槻 1px 琛岄珮璺冲彉 */
    grid-auto-rows: 1px; /* 浣跨敤 1px 琛岄珮浠ヨ幏寰楁渶绮剧‘鐨勯珮搴︽帶鍒?*/
    align-items: start;
}

@media (max-width: 1600px) {
    .container {
        padding: 0;
    }
    .masonry {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .masonry {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    .container {
        flex-direction: column;
        padding: 0;
    }
    .left-space {
        width: 100%;
        flex-shrink: 0;
        height: auto;
        position: static;
        overflow-y: visible;
        border-right: none;
        border-bottom: 1px solid var(--divider-color);
        padding: 12px;
    }
    .right-content {
        flex: 1;
        padding: 12px;
    }
    .masonry {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 12px;
        row-gap: 0;
    }
    .card {
        margin-bottom: 0; /* Grid 甯冨眬涓嬩娇鐢?gap 鎺у埗闂磋窛 */
    }
    .card-content {
        padding: 10px; /* 绉诲姩绔崱鐗囧唴瀹瑰唴杈硅窛缂╁皬 */
    }
    .card-title {
        font-size: 14px; /* 绉诲姩绔瓧浣撶◢寰缉灏忥紝閬垮厤鏍囬杩囬暱鎹㈣杩囧 */
    }
    .author-name {
        font-size: 13px; /* 绉诲姩绔綔鑰呭悕涔熷悓姝ョ缉灏?*/
    }
    .author-avatar {
        width: 32px; /* 绉诲姩绔ご鍍忕缉灏?*/
        height: 32px;
        margin-top: 0;
    }
    .profile-avatar-wrapper {
        margin-bottom: 6px;
    }
    .collapsible-section {
        padding-top: 8px;
    }
    /* 隐藏"分类"标题，始终展开不可折叠 */
    .section-header {
        display: none;
    }
    .section-content {
        max-height: none !important;
        overflow: visible !important;
    }
    .collapsed .section-content {
        max-height: none !important;
    }
    .section-content.sticky-cats {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 99;
        background: var(--bg-color);
        padding: 6px 12px;
        border-top: 1px solid var(--divider-color);
        border-bottom: 1px solid var(--divider-color);
    }
    .author-info {
        margin-top: -24px; /* 瀵瑰簲澶村儚缂╁皬鐨勫亸绉昏皟鏁?*/
    }
    .video-badge {
        width: 24px;
        height: 24px;
        bottom: 8px;
        right: 8px;
    }
    .video-badge svg {
        width: 14px;
        height: 14px;
    }
    /* 移动端作者信息栏：用 order 重排为 作者名 → 签名 → 地区+链接同行 */
    .profile-info {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }
    .profile-name {
        width: 100%;
        order: 1;
        font-size: 22px;
        margin-bottom: 2px;
    }
    .profile-bio {
        width: 100%;
        order: 2;
        font-size: 14px;
        margin-bottom: 6px;
        margin-top: 2px;
        line-height: 1.4;
    }
    .profile-location {
        display: none !important;
    }
    .profile-links {
        order: 3;
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 8px;
    }
    .profile-links svg {
        width: 22px;
        height: 22px;
    }
}

.card {
    position: relative;
    break-inside: avoid;
    margin-bottom: 0; /* 绉婚櫎澶栬竟璺濓紝鏀圭敤 grid-gap 鎺у埗 */
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--mint-green); /* 钖勮嵎缁胯竟妗?*/
    transition: background-color 0.3s, border-color 0.3s;
    /* 鎬ц兘浼樺寲 */
}

.card img.main-img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* 缃《鏍囪瘑 */
.sticky-badge-live {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 140, 0, 0.9);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 900;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* 瑙嗛鍗＄墖鏍囪瘑 */
.video-card {
    position: relative;
}

.video-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.video-badge svg {
    width: 18px;
    height: 18px;
}

.video-card:hover .video-badge {
    background-color: #fff;
    transform: scale(1.1);
}

.card:hover img.main-img {
    transform: scale(1.01);
}

.card-content {
    padding: 15px;
    position: relative;
}

.author-info {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    margin-top: -32px; /* 鍚戜笂鍋忕Щ锛屼竴鍗婂彔鍦ㄥ浘鐗囦笂 */
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--divider-color); /* 澶村儚鍜屼綔鑰呭悕涓嬫柟鐨勭粏绾匡紝绋嶅井鍑忔贰涓€鐐?*/
    transition: border-color 0.3s;
}

.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    border: 2px solid white; /* 鐧借壊杈规 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 澧炲姞闃村奖鎻愬崌閲嶅彔鎰?*/
    transition: border-color 0.3s;
}

[data-theme="dark"] .author-avatar {
    border-color: var(--card-bg);
}

.author-name {
    font-size: 16px;
    font-weight: 900; /* Heavy 瀛楅噸 */
    color: var(--author-color);
    margin-top: 16px; /* 浣滆€呭悕浣嶇疆寰€涓嬭皟鏁翠竴鐐?*/
    transition: color 0.3s;
}

.card-title {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 8px;
    color: var(--text-color);
    transition: color 0.3s;
}

.meta-info {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    transition: color 0.3s;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-item svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 弹窗 (Modal) 样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay-bg);
    display: none; /* 默认隐藏 */
    justify-content: center;
    align-items: center;
    z-index: 2002;
    backdrop-filter: blur(0px); /* 初始无模糊 */
    opacity: 0; /* 初始透明 */
    transition: opacity 0.4s ease, backdrop-filter 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    backdrop-filter: blur(5px);
}

.modal-container {
    background-color: var(--bg-color);
    width: 90%;
    max-width: 1100px;
    height: auto;
    max-height: 90vh;
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    grid-template-rows: auto auto 1fr auto auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, background-color 0.3s;
    transform: scale(0.8);
    opacity: 0;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
    opacity: 1;
}

/* 顶部固定：作者头像 + 关闭 (桌面端在右侧列顶部) */
.modal-header {
    grid-column: 2;
    grid-row: 1;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-color);
    transition: background-color 0.3s;
}

/* 第一根分割线 (桌面端在右侧列) */
.modal-divider:first-of-type {
    grid-column: 2;
    grid-row: 2;
}

/* 第二根分割线 (桌面端在右侧列) */
.modal-divider:last-of-type {
    grid-column: 2;
    grid-row: 4;
}

/* 中间滚动区：桌面端 display:contents 让子元素参与网格 */
.modal-scroll {
    display: contents;
}

/* 左侧图片区 */
.modal-left {
    grid-column: 1;
    grid-row: 1 / 6;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.modal-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden; /* 关键：隐藏溢出的图片 */
}

/* 漫画模式：允许垂直滚动 */
.modal-image-wrapper.manga-mode {
    overflow-y: auto;
    display: block; /* 覆盖 flex */
}

.modal-image-container {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* 平滑的滑动动画 */
}

/* 漫画模式：垂直排列且高度自适应 */
.modal-image-container.manga-mode {
    flex-direction: column;
    height: auto;
    transform: none !important; /* 禁用左右位移 */
}

/* 文章模式：允许垂直滚动并调整背景 */
.modal-image-wrapper.article-mode {
    overflow-y: auto;
    display: block;
    background-color: var(--bg-color); /* 文章背景使用页面背景色 */
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--divider-color) transparent;
}

.modal-image-wrapper.article-mode::-webkit-scrollbar {
    display: block;
    width: 6px;
}

.modal-image-wrapper.article-mode::-webkit-scrollbar-thumb {
    background-color: var(--divider-color);
    border-radius: 3px;
}

/* 文章封面图 */
.article-cover {
    width: 100%;
    height: 40vh;
    object-fit: cover;
    display: none;
}

.article-mode .article-cover {
    display: block;
}

/* 文章正文排版 */
.article-content {
    padding: 40px;
    line-height: 1.8;
    color: var(--text-color);
    font-weight: 400;
    display: none;
}

.article-mode .article-content {
    display: block;
}

.article-content h1, .article-content h2, .article-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: var(--text-color);
    font-weight: 900;
}

.article-content h1 { font-size: 24px; border-bottom: 2px solid var(--divider-color); padding-bottom: 8px; }
.article-content h2 { font-size: 20px; }
.article-content h3 { font-size: 18px; }

.article-content p {
    margin-bottom: 1.2em;
    white-space: pre-wrap; /* 关键：支持换行 */
}

/* 文章目录 (TOC) 增强样式 */
.article-toc {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--divider-color);
    display: none;
}

.article-mode .article-toc {
    display: block;
}

.toc-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 4px;
    position: relative;
}

.toc-row {
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.toc-row:hover {
    background-color: var(--divider-color);
}

.toc-toggle-btn {
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.toc-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    padding: 6px 8px 6px 4px;
    flex-grow: 1;
    font-size: 13px;
    line-height: 1.4;
}

.toc-link:hover {
    color: var(--text-color);
}

/* 阅读高亮样式 */
.toc-link.active {
    color: #407291;
    font-weight: 700;
}

[data-theme="dark"] .toc-link.active {
    color: #6092B1;
}

/* 层级缩进 */
.toc-h1 { font-weight: 400; font-size: 14px; margin-top: 10px; }
.toc-h2 { font-weight: 400; }
.toc-h3 { font-weight: 400; }

/* 折叠逻辑样式 */
.toc-sub-list {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: 15px;
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    opacity: 1;
}

.toc-item.collapsed > .toc-sub-list {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

/* 折叠指示器图标 */
.toc-toggle-icon {
    width: 12px;
    height: 12px;
    transition: transform 0.3s;
    color: var(--author-color);
}

.toc-item.collapsed .toc-toggle-btn .toc-toggle-icon {
    transform: rotate(-90deg);
}

/* 恢复 H1 按钮显示 */
.toc-level-1 .toc-toggle-btn {
    visibility: visible;
}

/* 视频播放器容器 */
.modal-video-wrapper {
    width: 100%;
    height: 100%;
    display: none;
    background-color: #000;
}

.modal-video-wrapper .plyr {
    height: 100%;
}

/* 优化 Plyr 切换视频源菜单：彻底隐藏默认数字，仅显示自定义标签 */
.plyr__menu__container [role="menuitemradio"][data-plyr="quality"] {
    font-size: 0 !important;
    color: transparent !important;
    padding-left: 7px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
}

.plyr__menu__container [role="menuitemradio"][data-plyr="quality"] .plyr__menu__value {
    color: var(--text-color, #333) !important;
    font-size: 14px !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    flex: 1 !important;
}

.plyr__menu__container [role="menuitemradio"][data-plyr="quality"] .plyr__badge {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    display: inline-block !important;
}

.plyr__menu__container [role="menuitemradio"][data-plyr="quality"][aria-checked="true"]::before {
    background: var(--accent-color, #407291) !important;
    left: 12px !important;
    visibility: visible !important;
}

.modal-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-slide.manga-mode {
    flex: none;
    height: auto;
    display: block;
}

.modal-slide.manga-mode img {
    width: 100%;
    height: auto;
    max-height: none;
    cursor: zoom-in;
}

.modal-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
}

/* 轮播图按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    transition: all 0.3s ease;
    user-select: none;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
}

.modal-image-wrapper:hover .carousel-btn {
    opacity: 1;
    visibility: visible;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

/* 分页小点 */
.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.modal-image-wrapper:hover .carousel-dots {
    opacity: 1;
    visibility: visible;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* 右侧内容区 (桌面端 grid 第2列) */
.modal-body {
    grid-column: 2;
    grid-row: 3;
    padding: 20px 30px 30px 30px;
    overflow-y: auto;
    background-color: var(--bg-color);
    transition: background-color 0.3s;
}

.modal-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--text-color);
    margin-top: 0;
}

.title-category {
    color: #407291;
    margin-right: 4px;
    transition: color 0.3s;
}

[data-theme="dark"] .title-category {
    color: #6092B1;
}

.multi-source-hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    background-color: var(--accent-color, #407291);
    color: white;
    padding: 1px 6px;
    height: 16px;
    border-radius: 4px;
    margin-right: 6px;
    font-weight: 700;
    cursor: help;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: fadeIn 0.3s ease;
    text-transform: none;
    line-height: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

.modal-description {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.8;
    font-weight: 400;
    margin-bottom: 25px;
    transition: color 0.3s;
    white-space: pre-wrap;
    word-break: break-all;
}

.modal-description b, .modal-description strong,
.modal-description h2, .modal-description h3 {
    font-weight: 900;
    color: var(--text-color);
}

.modal-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    transition: color 0.3s;
}

/* 弹窗多功能按钮 */
.modal-action-btn {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #CFE1EC;
    color: #407291;
    border: 1px solid #407291;
    text-align: center;
    user-select: none;
    box-sizing: border-box;
}

.modal-action-btn:hover {
    opacity: 0.8;
}

.modal-action-btn:active {
    transform: scale(0.98);
}

.modal-action-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* 底部固定链接区 */
.modal-footer {
    grid-column: 2;
    grid-row: 5;
    padding: 20px 30px;
    background-color: var(--bg-color);
    transition: background-color 0.3s;
}

.modal-links {
    display: flex;
    gap: 12px;
}

.modal-link-btn {
    flex: 1;
    padding: 10px;
    background-color: var(--text-color);
    color: var(--bg-color);
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: opacity 0.3s, background-color 0.3s, color 0.3s;
}

.modal-link-btn:hover {
    opacity: 0.9;
}

.modal-link-btn.secondary {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--divider-color);
}

.modal-link-btn.icon-only {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    color: var(--author-color) !important;
    border: 1px solid var(--divider-color);
    box-sizing: border-box;
}

.modal-link-btn.icon-only svg {
    width: 18px;
    height: 18px;
    fill: var(--author-color) !important;
}

.modal-link-btn.icon-only:hover {
    opacity: 0.8;
    transform: none;
}

.modal-link-btn.icon-only:active {
    transform: scale(0.98);
}

.modal-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-author-link {
}

.modal-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: border-color 0.3s;
}

[data-theme="dark"] .modal-avatar {
    border-color: var(--card-bg);
}

.modal-author-name {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-color);
    transition: color 0.3s;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    background-color: var(--divider-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    transition: all 0.3s;
}

.modal-close-btn:hover {
    background-color: var(--divider-color);
    color: var(--text-color);
}

/* 细线分割 */
.modal-divider {
    height: 1px;
    background-color: var(--divider-color);
    margin: 0 30px;
    transition: background-color 0.3s;
}

/* ========== 移动端弹窗 ========== */
@media (max-width: 768px) {
    .modal-overlay {
        background-color: var(--bg-color);
        backdrop-filter: none;
    }
    .modal-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }
    /* 顶部固定：作者头像名称 + 关闭 */
    .modal-header {
        flex-shrink: 0;
        padding: 10px 20px;
    }
    /* 移动端缩小头像 */
    .modal-avatar {
        width: 32px;
        height: 32px;
    }
    /* 移动端缩小作者名字体 */
    .modal-author-name {
        font-size: 15px;
    }
    /* 分割线恢复为普通流 */
    .modal-divider:first-of-type,
    .modal-divider:last-of-type {
        grid-column: auto;
        grid-row: auto;
    }
    .modal-divider {
        margin: 0;
    }
    /* 中间滚动区：图片 + 内容一起滚动 */
    .modal-scroll {
        display: flex;
        flex-direction: column;
        flex: 1;
        overflow-y: auto;
    }
    /* 图片区自适应 */
    .modal-left {
        flex: none;
        background-color: var(--card-bg);
    }
    /* 移动端图片区：普通图片限制最大高度，为正文留空间；视频模式16:9 */
    .modal-left .modal-image-wrapper {
        max-height: 65vh;
    }
    /* 移动端普通图片裁切预览，不留左右白边 */
    .modal-left .modal-slide:not(.manga-mode):not(.article-mode) img {
        object-fit: cover;
    }
    .modal-left .modal-image-wrapper.video-mode {
        aspect-ratio: 16 / 9;
        max-height: none;
    }
    /* 漫画/文章模式恢复自适应高度 */
    .modal-left .modal-image-wrapper.manga-mode,
    .modal-left .modal-image-wrapper.article-mode {
        aspect-ratio: auto;
        max-height: 65vh;
    }
    /* 内容区不再独立滚动 */
    .modal-body {
        flex: none;
        overflow-y: visible;
        padding: 15px 20px;
    }
    /* 底部固定：链接按钮 */
    .modal-footer {
        flex-shrink: 0;
        padding: 15px 20px;
    }
    /* 文章目录在移动端不显示 */
    .article-toc {
        display: none !important;
    }
}
.modal-admin-says-container {
    margin: 20px 0;
    padding: 15px 20px;
    background-color: rgba(var(--adm-primary-rgb), 0.05);
    border-radius: 8px;
    transition: background-color 0.3s;
}

[data-theme="dark"] .modal-admin-says-container {
    background-color: rgba(var(--adm-primary-rgb), 0.1);
}

.admin-says-label {
    font-size: 11px;
    font-weight: 900;
    color: #407291; /* 涓?.title-category 棰滆壊涓€鑷?*/
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

[data-theme="dark"] .admin-says-label {
    color: #6092B1; /* 鏆楄壊妯″紡涓?.title-category 涓€鑷?*/
}

.modal-admin-says {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    font-style: normal;
    font-weight: normal;
}

/* ========== 回顶部悬浮按钮 ========== */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--divider-color);
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    user-select: none;
    overflow: hidden;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top-percent,
.back-to-top-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.back-to-top-percent {
    font-size: 16px;
    font-weight: 900;
    color: var(--text-color);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
}
.back-to-top-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.back-to-top-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--text-color);
    transition: fill 0.3s;
}
/* 显示百分比时 */
.back-to-top.showing-percent .back-to-top-percent {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.back-to-top.showing-percent .back-to-top-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
}
@media (max-width: 768px) {
    .back-to-top {
        display: none !important;
    }
}
