/* 继志斋刊《重校琵琶记》古今对照阅读器 - V2.1 样式表 */

:root {
    /* 色彩方案 */
    --bg-paper: #F5F0E8;
    --bg-paper-light: #FAF6EE;
    --bg-dark: #1A1512;
    --bg-dark-light: #2A221B;
    --bg-brown: #EDE8DE;
    --text-original: #2C2C2C;
    --text-translation: #4A4040;
    --text-modern: #8B2500;
    --text-light: #EDE8DE;
    --text-muted: #B8A99A;
    --text-dim: #C4BDB0;
    --line-decoration: rgba(139, 37, 0, 0.15);
    --card-bg: #FAF6EE;
    --white: #FFFFFF;
    --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.12);
    --accent-primary: #C93535;
    
    /* 字体 */
    --font-serif: 'Source Han Serif SC', 'Noto Serif SC', 'SimSun', '宋体', serif;
    --font-kai: 'KaiTi', '楷体', 'FangSong', '仿宋', serif;
    --font-modern: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-modern);
    background-color: var(--bg-paper);
    color: var(--text-original);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
}

.page {
    min-height: 100vh;
    display: none;
}

.page.active {
    display: block;
}

.hidden {
    display: none !important;
}

.nav-svg-logo {
    flex-shrink: 0;
}

/* ==================== 首页样式 ==================== */

/* 区块一：顶部导航栏 */
.home-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #1A1512;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-title {
    font-family: var(--font-serif);
    color: var(--text-light);
    font-size: 16px;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-modern);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--text-modern);
}

/* 区块二：主视觉区 */
.hero-section {
    padding: 140px 24px 100px;
    background-color: var(--bg-paper);
    position: relative;
    min-height: calc(70vh + 50px);
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 56px;
    font-weight: bold;
    color: var(--text-original);
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 20px;
    color: #5A5048;
    margin-bottom: 32px;
    letter-spacing: 2px;
}

.hero-divider {
    width: 80px;
    height: 2px;
    background: var(--text-modern);
    margin: 0 auto 32px;
}

.hero-description {
    font-family: var(--font-serif);
    font-size: 16px;
    line-height: 1.8;
    color: #3A322A;
    max-width: 640px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
}

/* 按钮样式 */
.btn-primary {
    background: var(--text-modern);
    color: var(--bg-paper);
    border: none;
    padding: 10px 22px;
    font-size: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-serif);
    letter-spacing: 1px;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #6D1C00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 37, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-original);
    border: 1px solid var(--text-modern);
    padding: 10px 22px;
    font-size: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-serif);
    letter-spacing: 1px;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--text-modern);
    color: var(--bg-paper);
}

.btn-secondary:disabled {
    background: #E0D8CC;
    color: var(--text-muted);
    border-color: #E0D8CC;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 版本信息弹窗 */
.edition-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.edition-modal.hidden {
    display: none;
}

.edition-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
}

.edition-modal-content {
    position: relative;
    background: var(--bg-paper-light);
    border-radius: 12px;
    width: 90%;
    max-width: 960px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.edition-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 16px;
    border-bottom: 1px solid rgba(139, 37, 0, 0.1);
    position: sticky;
    top: 0;
    background: var(--bg-paper-light);
    z-index: 1;
}

.edition-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #8A7E72;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.edition-modal-close:hover {
    background: rgba(139, 37, 0, 0.1);
    color: var(--text-modern);
}

.edition-modal-body {
    padding: 28px 32px 32px;
}

.edition-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.edition-accent-line {
    width: 3px;
    height: 28px;
    background: var(--text-modern);
    border-radius: 2px;
    flex-shrink: 0;
}

.edition-title {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--text-original);
    letter-spacing: 2px;
}

.edition-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.edition-card {
    background: #FAF6EE;
    border-radius: 6px;
    padding: 24px 24px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    border-left: 3px solid var(--text-modern);
}

.edition-card-title {
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--text-modern);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 37, 0, 0.12);
    letter-spacing: 2px;
}

.edition-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.edition-info-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.edition-info-label {
    font-size: 12px;
    color: #8A7E72;
    font-family: var(--font-serif);
    letter-spacing: 1px;
}

.edition-info-value {
    font-size: 15px;
    color: var(--text-original);
    line-height: 1.6;
    font-family: var(--font-serif);
}

.edition-origin {
    background: #FAF6EE;
    border-radius: 6px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    border-left: 3px solid var(--text-modern);
}

.edition-origin-title {
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--text-modern);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 37, 0, 0.12);
    letter-spacing: 2px;
}

.edition-origin-content {
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-original);
}

.edition-origin-content p {
    margin-bottom: 12px;
}

.edition-origin-summary {
    margin-bottom: 0;
}

.edition-origin-full {
    margin-top: 10px;
}

.edition-origin-full.hidden {
    display: none;
}

.edition-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    background: none;
    border: 1px solid rgba(139, 37, 0, 0.3);
    color: var(--text-modern);
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 14px;
    transition: all 0.3s ease;
}

.edition-toggle-btn:hover {
    background: var(--text-modern);
    color: var(--bg-paper);
    border-color: var(--text-modern);
}

.toggle-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.edition-toggle-btn.expanded .toggle-arrow {
    transform: rotate(180deg);
}

/* 夜间模式适配 */
.dark-mode .edition-modal-content {
    background: var(--bg-dark-light);
}

.dark-mode .edition-modal-header {
    background: var(--bg-dark-light);
    border-bottom-color: rgba(237, 232, 222, 0.15);
}

.dark-mode .edition-card,
.dark-mode .edition-origin {
    background: var(--bg-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .edition-card-title,
.dark-mode .edition-origin-title {
    border-bottom-color: rgba(237, 232, 222, 0.15);
}

.dark-mode .edition-info-label {
    color: var(--text-muted);
}

.dark-mode .edition-info-value,
.dark-mode .edition-origin-content {
    color: var(--text-light);
}

.dark-mode .edition-toggle-btn {
    border-color: rgba(237, 232, 222, 0.3);
    color: var(--text-light);
}

.dark-mode .edition-toggle-btn:hover {
    background: var(--text-modern);
    color: var(--bg-paper);
    border-color: var(--text-modern);
}

.dark-mode .edition-modal-close {
    color: var(--text-muted);
}

.dark-mode .edition-modal-close:hover {
    background: rgba(237, 232, 222, 0.1);
    color: var(--text-light);
}

/* 响应式 */
@media (max-width: 768px) {
    .edition-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .edition-modal-header {
        padding: 20px 20px 14px;
    }
    
    .edition-modal-body {
        padding: 20px;
    }
    
    .edition-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .edition-card,
    .edition-origin {
        padding: 20px 18px;
    }
    
    .edition-title {
        font-size: 18px;
    }
}

/* 区块四：阅读进度区 */
.progress-section {
    padding: 60px 24px;
    background: var(--bg-paper);
}

.progress-container {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.progress-text {
    font-size: 14px;
    color: #3A322A;
    font-family: var(--font-serif);
    text-align: center;
    margin-bottom: 16px;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: #E0D8CC;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--text-modern);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease;
}

/* 区块五：快速入口区 */
.quick-entry-section {
    padding: 60px 24px 80px;
    background: var(--bg-brown);
}

.entry-container {
    max-width: 1000px;
    margin: 0 auto;
}

.section-heading {
    font-family: var(--font-serif);
    font-size: 28px;
    color: var(--text-original);
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: 4px;
}

.volume-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--line-decoration);
    padding-bottom: 12px;
}

.volume-tab {
    background: transparent;
    border: none;
    padding: 8px 24px;
    font-size: 16px;
    font-family: var(--font-serif);
    color: var(--text-translation);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.volume-tab:hover {
    color: var(--text-modern);
}

.volume-tab.active {
    color: var(--text-modern);
    border-bottom-color: var(--text-modern);
}

/* 出目卡片网格 */
.act-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.act-card {
    background: var(--bg-paper);
    border: 1px solid var(--line-decoration);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.act-card:hover {
    background: rgba(139, 37, 0, 0.06);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.act-number {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-serif);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.act-name {
    font-size: 16px;
    color: var(--text-original);
    font-family: var(--font-serif);
    margin-bottom: 8px;
    line-height: 1.4;
}

.act-progress {
    font-size: 11px;
    color: var(--text-modern);
}

.act-card .progress-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.act-card.completed .progress-indicator {
    background: var(--text-modern);
}

.act-card.completed .act-progress::before {
    content: '✓ ';
}

/* 页脚 */
.home-footer {
    padding: 24px;
    text-align: center;
    background: var(--bg-dark);
    color: var(--text-muted);
    font-size: 12px;
}

/* ==================== 阅读模式样式 ==================== */

.reader-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #1A1512;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: var(--font-modern);
    padding: 4px 8px;
    border-radius: 4px;
}

.back-btn:hover {
    color: var(--text-modern);
    background: rgba(139, 37, 0, 0.1);
}

.reader-nav-title {
    color: var(--text-light);
    font-size: 14px;
    font-family: var(--font-serif);
    letter-spacing: 2px;
}

.reader-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.current-act-label {
    color: var(--text-dim);
    font-size: 14px;
}

.act-select {
    background: var(--bg-dark-light);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 6px 32px 6px 12px;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23EDE8DE' d='M2 4l4 4 4-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 200px;
}

.act-select:hover {
    border-color: var(--text-modern);
}

.act-select optgroup {
    background: var(--bg-dark-light);
    color: var(--text-light);
    font-family: var(--font-serif);
}

.act-select optgroup[label]::before {
    content: '';
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

.act-select option {
    padding: 8px 12px;
}

/* 阅读模式主体 */
.reader-main {
    display: grid;
    grid-template-columns: 48% 52%;
    gap: 0;
    padding-top: 54px;
    min-height: 100vh;
}

/* PDF区域 */
.pdf-panel {
    background: #2A221B;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 54px;
    height: calc(100vh - 54px);
}

.pdf-container {
    flex: 1;
    position: relative;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px;
}

#pdfCanvas {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    background: #fff;
    display: block;
}

.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.zoom-btn,
.zoom-fit {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover,
.zoom-fit:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--text-modern);
    color: var(--text-modern);
}

.zoom-level {
    color: var(--text-light);
    font-size: 13px;
    min-width: 45px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-modern);
    padding: 0 4px;
}

.catalog-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.catalog-btn:hover {
    background: rgba(139, 37, 0, 0.3);
    border-color: var(--text-modern);
    color: var(--text-light);
}

.pdf-hint-left,
.pdf-hint-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.pdf-hint-left {
    left: 20px;
}

.pdf-hint-right {
    right: 20px;
}

.pdf-container:hover .pdf-hint-left,
.pdf-container:hover .pdf-hint-right {
    opacity: 0.4;
}

.pdf-hint-left::before {
    content: '◀';
    color: #fff;
    font-size: 24px;
}

.pdf-hint-right::before {
    content: '▶';
    color: #fff;
    font-size: 24px;
}

.pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 14px 20px 18px;
    background: rgba(0, 0, 0, 0.3);
}

.page-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: var(--font-modern);
    padding: 6px 12px;
    border-radius: 4px;
}

.page-nav-btn:hover:not(:disabled) {
    color: var(--text-modern);
    background: rgba(139, 37, 0, 0.1);
}

.page-nav-btn:disabled {
    color: #665e54;
    cursor: not-allowed;
}

.page-info {
    color: var(--text-light);
    font-size: 14px;
    font-family: var(--font-serif);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-info input {
    width: 60px;
    padding: 4px 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--text-light);
    font-size: 14px;
    font-family: var(--font-serif);
    transition: border-color 0.3s;
}

.page-info input:focus {
    outline: none;
    border-color: var(--text-modern);
}

.page-sep {
    color: var(--text-muted);
}

/* 文本对照区域 */
.text-panel {
    background: var(--bg-paper);
    padding: 28px 32px;
    height: calc(100vh - 54px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.layer-controls {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-decoration);
    background: var(--bg-paper);
    flex-shrink: 0;
    padding-top: 4px;
}

.layer-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-family: var(--font-modern);
    border-radius: 4px 4px 0 0;
}

.layer-btn:hover {
    color: var(--text-translation);
    background: rgba(139, 37, 0, 0.03);
}

.layer-btn.active {
    color: var(--text-original);
    border-bottom-color: var(--text-modern);
}

/* ===== 剧情简介 ===== */
.act-summary {
    border: 1px solid var(--line-decoration);
    border-radius: 8px;
    background: var(--bg-paper-light);
    overflow: hidden;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.summary-header:hover {
    background: rgba(201, 53, 53, 0.04);
}

.summary-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.summary-arrow {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.25s ease;
    display: inline-block;
}

.act-summary.expanded .summary-arrow {
    transform: rotate(90deg);
}

.summary-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.act-summary.expanded .summary-body {
    max-height: 200px;
}

.summary-text {
    margin: 0;
    padding: 0 16px 12px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.text-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 16px;
    transition: opacity 0.25s ease;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.text-content.hidden {
    display: none !important;
}

.text-content.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ===== 插图说明卡片 ===== */
.illustration-card {
    width: 85%;
    margin: 16px auto;
    padding: 28px 24px;
    background: var(--bg-paper-light);
    border: 1px solid rgba(139, 37, 0, 0.25);
    border-radius: 12px;
    text-align: center;
    transition: opacity 0.25s ease;
    animation: illustrationFadeIn 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    flex: 1 1 0;
    min-height: 0;
}

.illustration-card.hidden {
    display: none !important;
}

@keyframes illustrationFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.illustration-decoration-top,
.illustration-decoration-bottom {
    height: 2px;
    margin: 0 auto 16px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-primary) 50%, transparent 100%);
    width: 70%;
}

.illustration-decoration-bottom {
    margin: 16px auto 0;
}

.illustration-header {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.illustration-body {
    padding: 0 12px;
}

.illustration-act {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--text-original);
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.illustration-desc {
    font-size: 13px;
    color: var(--text-translation);
    line-height: 1.8;
    font-family: var(--font-kai);
}

/* 夜间模式适配（预留） */
.dark-mode .illustration-card {
    background: var(--bg-dark-light);
    border-color: rgba(232, 184, 0, 0.25);
}

.dark-mode .illustration-header {
    color: var(--text-modern);
}

.dark-mode .illustration-act {
    color: var(--text-light);
}

.dark-mode .illustration-desc {
    color: var(--text-dim);
}

.text-card {
    background: var(--bg-paper-light);
    border: 1px solid var(--line-decoration);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.text-card:hover {
    box-shadow: var(--shadow-soft);
}

.text-card.highlight {
    background: rgba(139, 37, 0, 0.06);
    border-color: rgba(139, 37, 0, 0.3);
}

.text-card.hidden {
    display: none;
}

.card-original {
    background: var(--bg-paper);
    border-color: #E0D8CC;
}

.card-translation {
    background: #FAF6EE;
}

.card-modern {
    background: #FFFFFF;
    border-color: rgba(139, 37, 0, 0.15);
}

.card-label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-original .card-label {
    color: var(--text-original);
}

.card-translation .card-label {
    color: var(--text-original);
}

.card-modern .card-label {
    color: var(--text-modern);
}

.card-text {
    font-size: 16px;
    line-height: 1.9;
    padding: 16px;
    border-radius: 6px;
}

.card-original .card-text {
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--text-original);
    background: rgba(245, 240, 232, 0.5);
}

.card-translation .card-text {
    font-family: var(--font-kai);
    font-size: 16px;
    color: var(--text-translation);
    background: rgba(253, 251, 245, 0.8);
}

.card-modern .card-text {
    font-family: var(--font-modern);
    font-size: 16px;
    color: var(--text-modern);
    background: rgba(255, 253, 252, 0.9);
}

/* 字体大小控制按钮 */
.font-size-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 4px 0 12px;
    flex-shrink: 0;
}

.font-size-btn {
    background: transparent;
    border: 1px solid var(--line-decoration);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    width: 32px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-serif);
}

.font-size-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.font-size-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* 字体档位：小 */
.text-panel.font-small .card-original .card-text {
    font-size: 15px;
}
.text-panel.font-small .card-translation .card-text {
    font-size: 13px;
}
.text-panel.font-small .card-modern .card-text {
    font-size: 13px;
}

/* 字体档位：中（默认） */
.text-panel.font-medium .card-original .card-text {
    font-size: 18px;
}
.text-panel.font-medium .card-translation .card-text {
    font-size: 16px;
}
.text-panel.font-medium .card-modern .card-text {
    font-size: 16px;
}

/* 字体档位：大 */
.text-panel.font-large .card-original .card-text {
    font-size: 21px;
}
.text-panel.font-large .card-translation .card-text {
    font-size: 19px;
}
.text-panel.font-large .card-modern .card-text {
    font-size: 19px;
}

/* ===== 段落操作按钮 ===== */
.section-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 10px 0 6px;
    border-top: 1px dashed var(--line-decoration);
    margin-top: 12px;
    margin-bottom: 4px;
    position: relative;
    z-index: 2;
    background: #FFFCF8;
}

.action-btn {
    background: transparent;
    border: 1px solid var(--line-decoration);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.action-btn:hover {
    background: rgba(180, 60, 60, 0.1);
    border-color: var(--accent-primary);
}

/* 收藏激活状态 */
.action-btn.favorited {
    color: #E8B800;
    border-color: #E8B800;
    background: rgba(232, 184, 0, 0.1);
}

/* 笔记已有状态 */
.action-btn.has-note {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(180, 60, 60, 0.08);
}

/* 笔记小圆点提示 */
.action-btn.has-note::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    bottom: 2px;
    right: 2px;
}

.action-btn {
    position: relative;
}

/* 段落收藏状态 — 金色标记 */
.section-favorited .text-card {
    border-left: 3px solid #E8B800;
    background: rgba(232, 184, 0, 0.06);
}

/* ===== 笔记输入区域 ===== */
.note-input-area {
    margin-top: 8px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--line-decoration);
    border-radius: 6px;
    background: #FFFCF8;
    animation: slideDown 0.2s ease;
    position: relative;
    z-index: 2;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.note-textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid var(--line-decoration);
    border-radius: 4px;
    padding: 10px;
    font-family: var(--font-modern);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: white;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.note-textarea:focus {
    border-color: var(--accent-primary);
}

.note-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.note-save-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(201, 53, 53, 0.3);
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.note-save-btn:hover {
    background: #B02E2E;
    box-shadow: 0 3px 10px rgba(201, 53, 53, 0.45);
}

.note-save-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(201, 53, 53, 0.3);
}

.note-close-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--line-decoration);
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.note-close-btn:hover {
    border-color: var(--text-secondary);
}

/* ===== 收藏/笔记管理面板 ===== */
.favorites-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1999;
    animation: fadeIn 0.2s ease;
}

.favorites-backdrop.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.favorites-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #FFFCF8;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.25s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.favorites-panel.hidden {
    display: none;
}

.favorites-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line-decoration);
    background: var(--accent-primary);
    color: white;
}

.favorites-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-family: var(--font-serif);
}

.panel-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.panel-close-btn:hover {
    opacity: 1;
}

.favorites-tabs {
    display: flex;
    border-bottom: 1px solid var(--line-decoration);
}

.fav-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.fav-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    font-weight: 600;
}

.tab-count {
    display: inline-block;
    background: var(--accent-primary);
    color: white;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    min-width: 20px;
    text-align: center;
}

.fav-tab:not(.active) .tab-count {
    background: var(--text-secondary);
}

.favorites-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.fav-list, .note-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fav-list.hidden, .note-list.hidden {
    display: none;
}

.fav-item, .note-item {
    padding: 12px;
    background: white;
    border: 1px solid var(--line-decoration);
    border-radius: 6px;
    position: relative;
    transition: box-shadow 0.2s;
}

.fav-item:hover, .note-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.fav-item {
    border-left: 3px solid #E8B800;
}

.fav-item-head, .note-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.item-act-name {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(180, 60, 60, 0.08);
    padding: 2px 8px;
    border-radius: 3px;
}

.item-delete-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    transition: color 0.2s;
}

.item-delete-btn:hover {
    color: var(--accent-primary);
}

.item-excerpt {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-content {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 8px;
    padding: 6px 8px;
    background: rgba(180, 60, 60, 0.04);
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
}

.item-jump-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.item-jump-btn:hover {
    background: #993333;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.empty-state-icon {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* 段落高亮动画（跳转定位时） */
.section-highlight {
    animation: sectionHighlight 2s ease;
}

@keyframes sectionHighlight {
    0%, 100% { box-shadow: none; }
    20%, 80% { box-shadow: 0 0 0 2px var(--accent-primary); border-radius: 6px; }
}

/* 我的收藏入口按钮 */
.favorites-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.favorites-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.6);
}

/* ===== 全文检索样式 ===== */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-dark-light);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.25s ease;
    width: 220px;
    height: 32px;
}

.search-container:focus-within {
    border-color: var(--accent-primary);
    width: 280px;
    box-shadow: 0 0 0 2px rgba(201, 53, 53, 0.2);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    padding: 4px 12px 4px 14px;
    font-size: 13px;
    font-family: var(--font-modern);
    min-width: 0;
    border-radius: 20px 0 0 20px;
}

.search-input::placeholder {
    color: var(--text-dim);
    font-size: 12px;
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 4px 10px 4px 8px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 0 20px 20px 0;
    transition: color 0.2s;
    height: 100%;
}

.search-btn:hover {
    color: var(--accent-primary);
}

/* 搜索结果浮层 */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    min-width: 340px;
    max-width: 440px;
    max-height: 420px;
    background: var(--bg-paper-light);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
    z-index: 300;
    font-family: var(--font-modern);
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.search-result-empty,
.search-result-summary {
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text-translation);
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-result-summary {
    text-align: left;
    color: var(--text-original);
    font-weight: 500;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active {
    background: rgba(201, 53, 53, 0.08);
}

.search-result-item.active {
    background: rgba(201, 53, 53, 0.14);
}

.search-result-act {
    font-size: 12px;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-result-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: normal;
}

.search-result-context {
    font-size: 13px;
    color: var(--text-original);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-serif);
}

.search-keyword-highlight {
    background: rgba(232, 184, 0, 0.35);
    color: #8B2500;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-more {
    padding: 12px 16px;
    text-align: center;
    font-size: 12px;
    color: var(--accent-primary);
    cursor: pointer;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.15s;
}

.search-result-more:hover {
    background: rgba(201, 53, 53, 0.06);
}

/* 段落跳转高亮效果（3秒） */
.text-content.search-jump-highlight {
    animation: searchJumpHighlight 3s ease;
}

@keyframes searchJumpHighlight {
    0% { background: rgba(232, 184, 0, 0.25); }
    20%, 70% { background: rgba(232, 184, 0, 0.15); box-shadow: 0 0 0 3px rgba(232, 184, 0, 0.4); border-radius: 8px; }
    100% { background: transparent; box-shadow: none; }
}

/* 响应式：小屏幕下面板全宽 */
@media (max-width: 600px) {
    .favorites-panel {
        width: 100%;
        max-width: 100%;
    }
    .favorites-btn {
        font-size: 12px;
        padding: 5px 8px;
    }
    .search-container {
        width: 140px;
        height: 30px;
    }
    .search-container:focus-within {
        width: 180px;
    }
    .search-input {
        font-size: 12px;
        padding: 4px 8px;
    }
    .search-results {
        min-width: 260px;
        max-width: 300px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* 段落导航 */
.section-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line-decoration);
    background: var(--bg-paper);
    padding-bottom: 12px;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}

.section-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-translation);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 4px;
    font-family: var(--font-modern);
}

.section-nav-btn:hover:not(:disabled) {
    color: var(--text-modern);
    background: rgba(139, 37, 0, 0.06);
}

.section-nav-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.section-info {
    font-family: var(--font-serif);
    color: var(--text-translation);
    font-size: 14px;
}

.section-label {
    color: var(--text-muted);
    font-size: 13px;
    margin-left: 8px;
}

.sep {
    margin: 0 4px;
    color: var(--text-muted);
}

/* 标签页控制 */
/* 目录覆盖层 */
.catalog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 240, 232, 0.98);
    z-index: 20;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}

.catalog-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-paper);
    border-bottom: 1px solid var(--line-decoration);
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--text-modern);
    font-weight: bold;
}

.catalog-close-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.catalog-close-btn:hover {
    background: rgba(139, 37, 0, 0.1);
    color: var(--text-modern);
}

.catalog-overlay-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.catalog-volume {
    margin-bottom: 20px;
}

.catalog-volume-title {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--text-modern);
    padding: 6px 10px;
    background: rgba(139, 37, 0, 0.08);
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: bold;
}

.catalog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 3px;
}

.catalog-item:hover {
    background: rgba(139, 37, 0, 0.06);
}

.catalog-item.active {
    background: rgba(139, 37, 0, 0.12);
    color: var(--text-modern);
}

.catalog-item-num {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 50px;
    font-family: var(--font-serif);
}

.catalog-item-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-translation);
    font-family: var(--font-serif);
}

.catalog-item.active .catalog-item-name {
    color: var(--text-modern);
    font-weight: bold;
}

.catalog-item-progress {
    font-size: 11px;
    color: var(--text-muted);
}

#textContent {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
    min-height: 0;
}

.section-nav {
    flex-shrink: 0;
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-paper-light);
    border-radius: 12px;
    padding: 36px 40px;
    max-width: 520px;
    width: 92%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.about-content h2 {
    font-family: var(--font-serif);
    color: var(--text-original);
    margin-bottom: 24px;
    text-align: center;
    font-size: 24px;
    letter-spacing: 2px;
}

.about-text {
    margin-bottom: 28px;
    line-height: 1.9;
}

.about-text p {
    margin-bottom: 14px;
    color: var(--text-translation);
}

.about-text strong {
    color: var(--text-modern);
}

.about-text ul {
    margin: 16px 0;
    padding-left: 24px;
}

.about-text ul li {
    margin: 8px 0;
    color: var(--text-translation);
}

.about-meta {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line-decoration);
}

.about-content .btn-primary {
    display: block;
    margin: 0 auto;
}

/* 提示框 */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 12px 28px;
    border-radius: 8px;
    z-index: 2000;
    animation: slideUp 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    font-family: var(--font-modern);
    font-size: 14px;
}

.toast.hidden {
    display: none;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(184, 169, 154, 0.4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-modern);
}

.pdf-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.pdf-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* 选中文本样式 */
::selection {
    background: rgba(139, 37, 0, 0.2);
    color: var(--text-modern);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .reader-main {
        grid-template-columns: 1fr;
    }
    
    .pdf-panel {
        position: relative;
        top: 0;
        height: 55vh;
    }
    
    .text-panel {
        max-height: none;
        padding: 24px 20px;
    }
    
    .hero-section {
        background-image: none;
    }
}

.pdf-load-status {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: min(88%, 420px);
    padding: 14px 18px;
    border-radius: 8px;
    background: rgba(245, 240, 232, 0.96);
    color: #4a3529;
    text-align: center;
    line-height: 1.6;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
}

.pdf-load-status.error {
    border: 1px solid #b64a2c;
}

.pdf-load-status a {
    color: #8b2500;
    font-weight: 600;
}

.pdf-preload-progress {
    margin-top: 12px;
    color: #7b6a5d;
    font-size: 13px;
    text-align: center;
}

.pdf-preload-progress.complete {
    color: #526b45;
}

.pdf-preload-progress.warning {
    color: #9a5a2f;
}

@media (max-width: 768px) {
    .nav-title {
        font-size: 14px;
    }
    
    .hero-section {
        padding: 120px 20px 70px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 36px;
        letter-spacing: 2px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .reader-nav {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 16px;
    }
    
    .reader-nav-title {
        display: none;
    }
    
    .current-act-label {
        display: none;
    }
    
    .act-select {
        min-width: auto;
        width: 100%;
        order: 3;
    }
    
    .book-cover-placeholder {
        width: 160px;
        height: 220px;
    }
    
    .book-title {
        font-size: 18px;
    }
    
    .act-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .volume-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .layer-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .card-text {
        padding: 12px;
    }
    
    .card-original .card-text {
        font-size: 16px;
    }
    
    .modal-content {
        padding: 24px 20px;
    }
}

/* 打印样式 */
@media print {
    .home-nav,
    .reader-nav,
    .pdf-panel,
    .layer-controls,
    .section-nav,
    .home-footer,
    .hero-buttons,
    .volume-tabs {
        display: none;
    }
    
    .page {
        display: block !important;
    }
    
    .reader-main {
        display: block;
        padding: 0;
    }
    
    .text-panel {
        max-height: none;
    }
}
