:root {
    --bg-color: #F9F7F1;
    --text-color: #34495E;
    --accent-color: #E67E22;
    --link-color: #3498DB;
    --border-color: #E0E0E0;
    --header-bg: #fff;
    --header-text: #2C3E50;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --sidebar-bg: #fff;
    --sidebar-width: 300px;
    --system-text-color: #E67E22;
    --font-size: 1.25rem;
}

.header-icon-btn {
    background: transparent;
    border: none;
    color: var(--header-text);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.header-icon-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #b0b0b0;
    --accent-color: #d35400;
    --link-color: #5dade2;
    --border-color: #333;
    --header-bg: #222;
    --header-text: #ecf0f1;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    --sidebar-bg: #222;
    --system-text-color: #F39C12;
}

html,
body {
    font-family: 'Noto Serif SC', serif;
    line-height: 1.8;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    max-width: 100%;
    overflow-x: hidden;
}

header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

header a {
    color: var(--header-text);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: bold;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions button {
    flex-shrink: 0;
}

/* 章节标题在 header 中 */
.header-chapter-title {
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: normal;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
}

/* 3D 按钮在 header 右侧 */
.header-3d-btn {
    position: relative;
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-3d-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* 为固定 header 添加顶部间距 */
body {
    padding-top: 48px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    header {
        padding: 0.4rem 0.8rem;
        gap: 0.5rem;
    }

    header a {
        font-size: 1.2rem;
    }

    .header-chapter-title {
        font-size: 0.85rem;
        max-width: 150px;
    }

    .header-3d-btn {
        padding: 0.45rem 0.9rem;
        font-size: 0.85rem;
    }

    body {
        padding-top: 40px;
    }
}

.container {
    width: min(90%, 800px);
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
}

/* Theme Toggle Button */
.theme-toggle {
    position: relative;
    background: var(--header-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    font-size: 1.1rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100%;
    background: var(--sidebar-bg);
    box-shadow: var(--shadow);
    transform: translateX(-290px);
    transition: transform 0.3s ease;
    z-index: 200;
    overflow-y: auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.sidebar:hover {
    transform: translateX(0);
}

.sidebar-handle {
    position: absolute;
    top: 50%;
    right: 0;
    width: 10px;
    height: 50px;
    background: var(--accent-color);
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transform: translateY(-50%);
}

.sidebar h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    color: var(--header-text);
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    display: block;
    padding: 0.5rem;
    color: var(--text-color);
    border-radius: 4px;
}

.sidebar a:hover {
    background: var(--bg-color);
    text-decoration: none;
    color: var(--accent-color);
}

/* Tech Background (SVG) */
.tech-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--bg-color);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    color: var(--text-color);
}

.close-modal {
    color: var(--text-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--accent-color);
}

.modal-chapter-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.modal-chapter-list a {
    display: block;
    padding: 0.8rem;
    background: var(--header-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
}

.modal-chapter-list a:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* System Text Style (Default) */
.system-text {
    color: var(--system-text-color);
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    display: block;
    margin: 0.5rem 0;
    padding: 0.5rem 0.8rem;
    background: var(--bg-color);
    border-left: 3px solid var(--system-text-color);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.nav-btn .nav-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.nav-btn .nav-text {
    font-size: 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Chapter Page Styles */
#chapter-title {
    text-align: center;
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 2rem;
    color: var(--header-text);
    font-weight: bold;
}

#chapter-content {
    font-size: var(--font-size);
    text-align: justify;
}

#chapter-content p {
    margin-bottom: 1.5rem;
}

.view-mode-bar {
    display: flex;
    justify-content: flex-start;
    margin: 0 0 1rem;
    gap: 0.75rem;
}

.icon-only {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    justify-content: center;
    padding: 0;
}

#three-container {
    display: none;
    width: 100%;
    height: min(78vh, 840px);
    margin: 1.5rem 0 0;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: radial-gradient(circle at top, rgba(52, 152, 219, 0.12), transparent),
        radial-gradient(circle at bottom, rgba(231, 76, 60, 0.12), transparent),
        linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.35));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    position: relative;
    perspective: 700px;
    transform-style: preserve-3d;
}

#three-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 0, rgba(255, 255, 255, 0.12), transparent 55%),
        radial-gradient(circle at 90% 100%, rgba(46, 204, 113, 0.15), transparent 55%);
    mix-blend-mode: screen;
    pointer-events: none;
}

#chapter-3d-toggle {
    font-size: 0.95rem;
}

.nav-buttons {
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    gap: 1rem;
}

.nav-btn {
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-color);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    justify-content: center;
}

.nav-btn:hover,
.nav-btn:focus,
.nav-btn:focus-visible {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    text-decoration: none;
    outline: none;
}

.nav-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 0 0.5rem;
        margin: 0 auto;
    }

    header {
        padding: 0.8rem 0;
    }

    header a {
        font-size: 1.2rem;
    }

    body {
        font-size: 16px;
        line-height: 1.6;
    }

    .sidebar {
        width: 80%;
        max-width: 280px;
        transform: translateX(calc(-100% + 10px));
    }

    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 1.5rem;
    }

    .modal-chapter-list {
        grid-template-columns: 1fr;
    }

    .system-text {
        font-size: 0.95rem;
        padding: 0.4rem 0.6rem;
    }

    #header-novel-title .header-title-text {
        display: none;
    }

    .header-chapter-title {
        font-size: 0.95rem;
    }

    .nav-btn {
        padding: 0.5rem 0.9rem;
        border-radius: 24px;
    }

    .nav-btn .nav-text {
        display: inline;
    }

    .icon-only {
        width: 42px;
        height: 42px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes cardPulse {
    0% {
        box-shadow: 0 0 35px rgba(0, 255, 222, 0.15), inset 0 0 25px rgba(0, 128, 255, 0.1);
    }

    50% {
        box-shadow: 0 0 45px rgba(0, 255, 222, 0.25), inset 0 0 35px rgba(0, 128, 255, 0.18);
    }

    100% {
        box-shadow: 0 0 35px rgba(0, 255, 222, 0.15), inset 0 0 25px rgba(0, 128, 255, 0.1);
    }
}

@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

@media (max-width: 600px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 0.75rem;
        margin: 1.5rem auto;
    }

    header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem;
        align-items: center;
        text-align: center;
    }

    #header-novel-title {
        flex-basis: 100%;
        order: 1;
    }

    #header-novel-title .header-title-text {
        display: none;
    }

    .header-chapter-title {
        flex-basis: 100%;
        order: 2;
        font-size: 1rem;
        white-space: normal;
        word-break: break-word;
        line-height: 1.4;
        text-align: center;
    }

    .header-3d-btn {
        order: 2;
        padding: 0.45rem 0.9rem;
        margin: 0;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        order: 3;
        gap: 0.5rem;
    }

    .theme-toggle {
        position: relative;
    }

    #chapter-content {
        font-size: 1.05rem;
    }

    .nav-buttons {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .nav-buttons .nav-btn {
        flex: 1;
        min-width: 0;
        justify-content: center;
        padding: 0.65rem 0.8rem;
    }

    .nav-buttons .nav-text {
        display: inline;
        font-size: 0.9rem;
    }

    .nav-buttons .nav-icon {
        font-size: 1.3rem;
        margin-right: 0.3rem;
    }

    .icon-only {
        width: 42px;
        height: 42px;
    }

    .reader-3d-hud {
        width: 220px;
        height: 220px;
        right: 10px;
        bottom: 10px;
    }
}

/* 3D Reader Styles */
.reader-3d-wrapper {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.reader-3d-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.reader-3d-layer.css {
    pointer-events: none;
}

.reader-3d-layer.css>div {
    pointer-events: auto;
}

/* 3D Card - Deep Sci-Fi Style */
.reader-3d-card {
    width: 1200px;
    min-height: 800px;
    padding: 80px;
    background-color: rgba(0, 10, 20, 0.85);
    background-image:
        linear-gradient(rgba(0, 15, 30, 0.9), rgba(0, 15, 30, 0.9)),
        linear-gradient(0deg, transparent 24%, rgba(0, 255, 222, 0.03) 25%, rgba(0, 255, 222, 0.03) 26%, transparent 27%, transparent 74%, rgba(0, 255, 222, 0.03) 75%, rgba(0, 255, 222, 0.03) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 222, 0.03) 25%, rgba(0, 255, 222, 0.03) 26%, transparent 27%, transparent 74%, rgba(0, 255, 222, 0.03) 75%, rgba(0, 255, 222, 0.03) 76%, transparent 77%, transparent);
    background-size: 100% 100%, 30px 30px, 30px 30px;
    border: 1px solid rgba(0, 255, 222, 0.3);
    border-radius: 4px;
    /* Sharper corners for sci-fi look */
    box-shadow:
        0 0 20px rgba(0, 255, 222, 0.1),
        inset 0 0 60px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 56px;
    line-height: 1.8;
    color: #e0f0ff;
    box-sizing: border-box;
    overflow: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    position: relative;
}

/* Holographic Corner Brackets */
.reader-3d-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    background:
        linear-gradient(to right, #00ffde 2px, transparent 2px) top left,
        linear-gradient(to bottom, #00ffde 2px, transparent 2px) top left,
        linear-gradient(to left, #00ffde 2px, transparent 2px) top right,
        linear-gradient(to bottom, #00ffde 2px, transparent 2px) top right,
        linear-gradient(to right, #00ffde 2px, transparent 2px) bottom left,
        linear-gradient(to top, #00ffde 2px, transparent 2px) bottom left,
        linear-gradient(to left, #00ffde 2px, transparent 2px) bottom right,
        linear-gradient(to top, #00ffde 2px, transparent 2px) bottom right;
    background-size: 40px 40px;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.8;
}

/* Scanning Line Animation */
.reader-3d-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 20%;
    background: linear-gradient(to bottom, transparent, rgba(0, 255, 222, 0.2), transparent);
    animation: scanCard 6s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes scanCard {
    0% {
        top: -20%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 120%;
        opacity: 0;
    }
}

/* Tech Decoration Text */
.reader-3d-card .tech-deco {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(0, 255, 222, 0.4);
    pointer-events: none;
}

/* 3D Text - Enhanced with Gradient Glow */
.reader-3d-text {
    transform: translateZ(80px);
    background: linear-gradient(180deg, #ffffff 20%, #a0fff6 60%, #00ffde 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-weight: 800;
    text-shadow:
        -1px -1px 0 rgba(255, 255, 255, 0.9),
        1px 1px 0 #003f3a,
        2px 2px 0 #003540,
        3px 3px 0 #002a45,
        4px 4px 0 #00204a,
        5px 5px 0 #001550,
        0 0 10px rgba(0, 255, 222, 0.6),
        0 0 20px rgba(0, 128, 255, 0.4),
        0 0 40px rgba(128, 0, 255, 0.3);
    filter: contrast(1.1);
}

/* System Text - Embossed */
.reader-3d-text .system-text {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: initial;
    color: var(--system-text-color);
    /* 使用2D模式的橙色 */
    text-shadow:
        -1px -1px 1px rgba(255, 255, 255, 0.3),
        1px 1px 1px rgba(0, 0, 0, 0.8);
    filter: none;
    border-left: 3px solid var(--system-text-color);
    /* 边框也用橙色 */
}

/* Exit Button */
.reader-3d-exit-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    padding: 10px 24px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 222, 0.5);
    color: #00ffde;
    border-radius: 30px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    pointer-events: auto;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    z-index: 10000;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reader-3d-exit-btn:hover {
    background: rgba(0, 255, 222, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 222, 0.4);
    transform: scale(1.05);
}

/* Fullscreen Mode */
#three-container.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0;
    border-radius: 0;
    z-index: 9999;
    background: radial-gradient(circle at center, #1a2a3a 0%, #000000 100%);
}

#three-container.fullscreen-mode .reader-3d-hud {
    bottom: 40px;
    right: 40px;
}

.reader-3d-hud {
    position: absolute;
    width: 460px;
    height: 460px;
    bottom: 20px;
    right: 20px;
    opacity: 0.3;
    mix-blend-mode: screen;
    pointer-events: none;
}

#three-container.reader-3d-dragging {
    cursor: grabbing;
}

/* SVG Background Animations */
.svg-background {
    opacity: 0.8;
    mix-blend-mode: screen;
    z-index: 0 !important;
}

.floating-geo {
    will-change: transform;
    transform-origin: center;
}

.data-particle {
    filter: drop-shadow(0 0 3px rgba(0, 255, 222, 0.8));
}

.particle-star {
    will-change: opacity;
}

@keyframes floatRotate {
    0% {
        transform: rotate(0deg) translateY(0);
    }

    50% {
        transform: rotate(180deg) translateY(-2);
    }

    100% {
        transform: rotate(360deg) translateY(0);
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-left: 4px solid #2ecc71;
}

.toast.error {
    border-left: 4px solid #e74c3c;
}

.toast.info {
    border-left: 4px solid #3498db;
}

/* 3D 模式信息栏 */
#3d-info-bar {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10000;
    /* 高于 three-container 的 9999 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
}

.info-3d-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-3d-novel {
    font-weight: bold;
    color: var(--accent-color);
}

.info-3d-chapter {
    color: #fff;
}

.info-3d-progress {
    color: #aaa;
    font-size: 0.85rem;
}

.info-3d-separator {
    color: #666;
}

.btn-3d-catalog {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    margin-left: 1rem;
}

.btn-3d-catalog:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

/* 3D 目录面板 */
#3d-catalog-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    /* 高于信息栏 */
    display: none;
    align-items: center;
    justify-content: center;
}

.panel-3d-content {
    background: var(--header-bg);
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    width: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-3d-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-3d-header h3 {
    margin: 0;
    color: var(--text-color);
}

.panel-3d-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.panel-3d-close:hover {
    color: var(--accent-color);
}

.panel-3d-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

.panel-3d-list li {
    border-bottom: 1px solid var(--border-color);
}

.panel-3d-list li:last-child {
    border-bottom: none;
}

.panel-3d-list a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
}

.panel-3d-list a:hover {
    background: var(--bg-color);
    color: var(--accent-color);
}

.panel-3d-list li.active a {
    background: var(--accent-color);
    color: #fff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    #3d-info-bar {
        top: 60px;
        height: 45px;
        font-size: 0.8rem;
    }

    .info-3d-content {
        gap: 0.5rem;
    }

    .info-3d-novel,
    .info-3d-chapter {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .btn-3d-catalog {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* 3D Reader Container */
#three-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: #000;
    display: none;
    overflow: hidden;
}