@charset "utf-8";


        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            line-height: 1.5;
            background: #f5f5f5;
        }
        .container {
            width: 100%;
            max-width: 100%;
            margin: 0 auto;
            padding: 0;
        }
        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
            display: flex;
            align-items: center;
            padding: 10px;
            background: rgba(255, 255, 255, 0.95);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            backdrop-filter: blur(5px);
        }
        .back-btn {
            padding: 8px 15px;
            background: #6c757d;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            margin-right: 15px;
        }
        .title {
            font-size: 16px;
            font-weight: bold;
            flex: 1;
            text-align: center;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .content {
            margin-top: 60px;
        }
        .image-container {
            width: 100%;
            max-width: 800px;
            margin: 0 auto;
            padding: 0;
            line-height: 0;
        }
        .image-container img {
            max-width: 100%;
            height: auto;
            display: block;
            opacity: 1;
            transition: opacity 0.3s ease;
            vertical-align: top;
            width: 100%;
        }
        .loading-spinner {
            text-align: center;
            padding: 20px;
            color: transparent;
            background: transparent;
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            pointer-events: none;
            z-index: 99;
        }
        .loading-spinner::after {
            content: '';
            display: inline-block;
            width: 30px;
            height: 30px;
            border: 2px solid #ddd;
            border-top-color: #666;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            opacity: 0.5;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        #loadMore {
            display: none;
            width: 100%;
            padding: 15px;
            background: #007bff;
            color: white;
            border: none;
            border-radius: 4px;
            margin: 10px 0;
            cursor: pointer;
        }
        .error {
            padding: 20px;
            color: red;
            text-align: center;
        }
        @media screen and (min-width: 800px) {
            .image-container {
                max-width: 800px;
                margin: 0 auto;
            }
        }
        .related-section {
            margin: 20px auto;
            padding: 15px;
            max-width: 800px;
            background: #fff;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .related-header {
            display: flex;
            align-items: center;
            cursor: pointer;
            user-select: none;
        }
        
        .related-header h3 {
            font-size: 18px;
            margin-bottom: 0;
            color: #333;
            padding-left: 10px;
            border-left: 4px solid #007bff;
            flex: 1;
        }
        
        .related-toggle {
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s ease;
        }
        
        .related-toggle::after {
            content: '▼';
            font-size: 12px;
        }
        
        .related-toggle.collapsed::after {
            transform: rotate(-90deg);
        }
        
        .related-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 15px;
            margin-top: 15px;
            display: none; /* 默认隐藏 */
        }
        
        .related-item {
            padding: 10px 15px;
            background: #f8f9fa;
            border-radius: 6px;
            text-decoration: none;
            color: #333;
            transition: all 0.3s ease;
            position: relative; /* 作为角标定位容器 */
        }

        /* VIP 角标样式 */
        .vip-badge {
            position: absolute;
            top: 0;
            right: 0;
            width: 31px;
            height: 30px;
            object-fit: contain;
            pointer-events: none;
            z-index: 1;
        }
        
        .related-item:hover {
            background: #e9ecef;
            transform: translateY(-2px);
        }
        
        .related-title {
            font-size: 14px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        /* 添加新的样式 */
        .list-btn {
            padding: 8px 15px;
            background: #6c757d;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            margin-left: 15px;
            cursor: pointer;
        }
        
        .sidebar {
            position: fixed;
            top: 0;
            left: -300px;
            width: 300px;
            height: 100vh;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(5px);
            z-index: 200;
            transition: left 0.3s ease;
            box-shadow: 2px 0 4px rgba(0,0,0,0.1);
            display: flex;
            flex-direction: column;
        }
        
        .sidebar.active {
            left: 0;
        }
        
        .sidebar-header {
            padding: 15px;
            border-bottom: 1px solid #eee;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .sidebar-title {
            font-size: 18px;
            font-weight: bold;
            color: #333;
        }
        
        .close-btn {
            cursor: pointer;
            padding: 5px;
            font-size: 20px;
        }
        
        .sidebar-content {
            height: 80vh;
            overflow-y: auto;
            padding: 15px;
            -webkit-overflow-scrolling: touch;
        }
        
        .related-item {
            padding: 12px 15px;
            border-bottom: 1px solid #eee;
            text-decoration: none;
            color: #333;
            display: block;
            white-space: normal;
            line-height: 1.4;
        }
        
        .related-item:hover {
            background: #f8f9fa;
        }
        
        .related-title {
            font-size: 14px;
            line-height: 1.4;
            white-space: normal;
            word-break: break-all;
        }
        
        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 199;
            display: none;
        }
        
        @media screen and (max-width: 768px) {
            .sidebar {
                width: 70%;
                left: -80%;
            }
        }

        /* 邀请码弹窗样式 */
        .invite-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .invite-modal {
            background: white;
            border-radius: 12px;
            max-width: 400px;
            width: 100%;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            animation: modalSlideIn 0.3s ease-out;
        }

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

        .invite-modal-header {
            padding: 24px 24px 16px;
            text-align: center;
            border-bottom: 1px solid #eee;
        }

        .invite-modal-header h3 {
            margin: 0 0 8px;
            font-size: 20px;
            color: #333;
            font-weight: 600;
        }

        .invite-modal-header p {
            margin: 0;
            color: #666;
            font-size: 14px;
        }

        .invite-modal-body {
            padding: 24px;
        }

        .invite-form {
            margin-bottom: 16px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #333;
        }

        .form-group input {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            transition: border-color 0.2s;
            box-sizing: border-box;
        }

        .form-group input:focus {
            outline: none;
            border-color: #007bff;
        }

        .form-actions {
            display: flex;
            gap: 12px;
            flex-direction: row; /* 确保左右布局 */
        }

        .btn-primary, .btn-secondary {
            flex: 1;
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-primary {
            background: #007bff;
            color: white;
        }

        .btn-primary:hover {
            background: #0056b3;
        }

        .btn-primary:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        .btn-secondary {
            background: #f8f9fa;
            color: #666;
            border: 1px solid #ddd;
        }

        .btn-secondary:hover {
            background: #e9ecef;
        }

        .form-footer {
            margin-top: 16px;
            text-align: center;
        }

        .invite-modal .btn-get-code {
            width: 100% !important;
            padding: 12px 20px !important;
            background: #28a745 !important;
            color: white !important;
            border: none !important;
            border-radius: 8px !important;
            font-size: 16px !important;
            font-weight: 500 !important;
            cursor: pointer !important;
            transition: all 0.2s ease !important;
            box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2) !important;
            outline: none !important;
        }

        .invite-modal .btn-get-code:hover {
            background: #218838 !important;
            transform: translateY(-1px) !important;
            box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3) !important;
        }

        .invite-modal .btn-get-code:active {
            transform: translateY(0) !important;
            box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2) !important;
        }

        .invite-modal .btn-get-code:disabled {
            background: #6c757d !important;
            cursor: not-allowed !important;
            transform: none !important;
            box-shadow: none !important;
        }

        .invite-message {
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 14px;
            text-align: center;
        }

        .invite-message.success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        .invite-message.error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .invite-message.loading {
            background: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }

        /* 移动端优化 */
        @media (max-width: 480px) {
            .invite-modal {
                margin: 0 16px;
            }
            
            .invite-modal-header,
            .invite-modal-body {
                padding: 20px;
            }
            
            /* 保持验证和取消按钮的左右布局，不改为垂直布局 */
            .form-actions {
                flex-direction: row; /* 移动端也保持左右布局 */
                gap: 8px; /* 移动端减少间距 */
            }
            
            .btn-primary, .btn-secondary {
                flex: 1; /* 保持等宽 */
                padding: 10px 16px; /* 移动端减少内边距 */
                font-size: 14px; /* 移动端稍微减小字体 */
            }
        }

/* 章节导航按钮样式 */
.chapter-navigation {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chapter-navigation.show {
    opacity: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: transparent;
    color: #000 !important;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease;
    border: none;
    min-width: 100px;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-btn:active {
    transform: translateY(0);
}

.nav-icon {
    white-space: nowrap;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .chapter-navigation {
        bottom: 40px;
        gap: 100px;
    }
    
    .nav-btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 100px;
    }
    
}

@media (max-width: 480px) {
    .chapter-navigation {
        bottom: 40px;
        gap: 100px;
    }
    
    .nav-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .nav-text {
        display: none;
    }
    
}