/* Main Container */
.chapter-detail-space {
    width: calc(100% - 4.4rem);
    margin-left: 4.4rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    background-color: var(--second-page-bg-color);
}

/* Chapter Main Content Layout */
.chapter-main-content {
    display: flex;
    width: inherit;
    margin-left: inherit;
    align-items: flex-start;
    justify-content: center;
    overflow: clip;
    gap: 2rem;
}

/* Sidebar Styles */
.chapter-reader-sidebar {
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 70px;
    width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
}

/* Avatar Container */
.follow-avatar-container.chapter-detail-avatar-container {
    width: 100%;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.6rem;
}

.profile-avatar-edit.chapter-detail-avatar {
    width: 90px;
    height: 90px;
}

/* Author Username */
.chapter-author-username.chapter-detail-author-username {
    font-size: 0.95rem;
    text-align: center;
}

.chapter-author-username {
    color: #888;
    font-size: 1.1rem;
    font-weight: 400;
    text-align: center;
}

.chapter-author-username a {
    color: #ff8c00;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.chapter-author-username a:hover {
    color: #ffa500;
    text-decoration: underline;
}

.chapter-author-username a:visited {
    color: #ff8c00;
}

/* Follow and Tip Buttons */
.follow-btn.chapter-detail-follow-btn,
.tip-btn.chapter-detail-tip-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
}

/* Follower Stats */
.follower-container.chapter-detail-follower-container {
    gap: 0.5rem;
}

.Follow-stat-value.chapter-detail-stat-value {
    font-size: 0.9rem;
    text-align: center;
}

/* Share Section */
.chapter-sidebar-share {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chapter-sidebar-share-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ff8c00;
    margin: 0;
    text-align: center;
}

.chapter-share-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.chapter-share-btn {
    background: var(--footer-social-bg);
    color: var(--primary-color);
    border: 1px solid var(--footer-social-border);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.chapter-share-btn:hover {
    background: var(--primary-color);
    color: var(--footer-social-hover-text);
    transform: translateY(-2px);
    box-shadow: var(--footer-social-hover-shadow);
}

.chapter-copy-link {
    background-color: #666;
    color: #ffffff;
    border: 1px solid #777;
}

.chapter-copy-link:hover {
    background-color: #555;
    color: #ffffff;
    transform: initial;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.chapter-copy-link.copied {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* Main Content Container */
.chapter-detail-container {
    color: var(--text-secondary-color);
    width: 800px;
    padding: 0 2.5em 1.5em;
    border-inline: 2px solid var(--primary-color);
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    line-height: 1.8;
    font-size: 1.1rem;
    background-color: var(--chapter-detail-background-color);
}

/* Navigation Bar */
.chapter_map_guide {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted-color);
    padding: 0.75rem 0;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.875rem;
    white-space: nowrap;
}

.chapter-map {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.create-edit-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.chapter_map_guide a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.chapter_map_guide a:hover {
    text-decoration: underline;
    color: var(--primary-hover-color);
}

.chapter_map_guide span {
    padding: 0 0.25rem;
    font-size: 1rem;
    font-weight: 500;
    flex-shrink: 0;
}

.chapter_map_guide i {
    font-size: 1.5rem;
}

.chapter_map_guide .fa-home {
    font-size: 1rem;
}

.chapter_map_guide .ellipsis-none {
    overflow: visible !important;
}

.back-to-novel-link {
    font-weight: 500;
}

.map-chapter-list {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.map-chapter-list i {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: color 0.2s ease;
}

.map-chapter-list i:hover {
    color: var(--primary-hover-color);
}

.create-edit-container a,
.create-edit-container .copy-title-btn {
    color: var(--primary-color);
    margin-left: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: none;
}

.create-edit-container a:hover,
.create-edit-container .copy-title-btn:hover {
    color: var(--primary-hover-color);
}

/* Copy Title Button */
.copy-title-btn {
    transition: color 0.3s ease;
}

.copy-title-btn i {
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

/* Copy Success Effect */
.copy-title-btn.copy-success {
    color: var(--primary-color) !important;
}

/* Chapter Detail Mobile Tab Navigation */
.chapter_detail_mobile_tabs {
    display: none;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--chapter-detail-mobile-tab-border);
    margin-bottom: 1rem;
}

.chapter_detail_tab_button {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--chapter-detail-tab-bg);
    border: 1px solid var(--chapter-detail-mobile-tab-border);
    border-radius: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chapter_detail_tab_button:hover {
    background: var(--chapter-detail-tab-hover-bg);
    border-color: var(--primary-color);
}

.chapter_detail_tab_button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--chapter-detail-tab-active-text);
}

.chapter_detail_tab_button i {
    font-size: 1rem;
}

.chapter_detail_tab_chevron {
    transition: transform 0.3s ease;
    font-size: 0.75rem !important;
}

.chapter_detail_tab_button.active .chapter_detail_tab_chevron {
    transform: rotate(180deg);
}

/* Chapter Detail Mobile Tab Content */
.chapter_detail_tab_content {
    display: none;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--chapter-detail-tab-bg);
    border: 1px solid var(--chapter-detail-mobile-tab-border);
    border-radius: 0.5rem;
    animation: chapterDetailSlideDown 0.3s ease;
}

.chapter_detail_tab_content.active {
    display: block;
}

/* Chapter Detail Author Section */
.chapter_detail_author_section {
    padding: 1.25rem;
    border-bottom: none;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.chapter_detail_author_profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.chapter_detail_author_avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.chapter_detail_author_username {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted-color);
    font-weight: 400;
}

.chapter_detail_author_username a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.chapter_detail_author_username a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.chapter_detail_author_actions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.chapter_detail_profile_actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.chapter_detail_follow_btn,
.chapter_detail_tip_btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    background: var(--sidebar-secondary-bg-color);
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
    transition: all 0.2s ease;
}

.chapter_detail_follow_btn:hover:not(.following), 
.chapter_detail_tip_btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--chapter-detail-tab-active-text);
}

.chapter_detail_follow_btn.following {
    background: var(--primary-hover-color) !important;
}

.chapter_detail_tip_section {
    display: flex;
}

.chapter_detail_followers_container {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--chapter-detail-follower-text);
    align-items: center;
}

.chapter_detail_follower_count,
.chapter_detail_following_count {
    font-weight: 500;
    color: var(--chapter-detail-follower-count-text);
}

/* Chapter Detail Share Section */
.chapter_detail_share_section {
    padding: 1.25rem;
}

.chapter_detail_share_buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.chapter_detail_share_btn {
    padding: 0.75rem;
    background: var(--chapter-detail-share-btn-bg);
    border: 1px solid var(--chapter-detail-share-btn-border);
    border-radius: 0.5rem;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chapter_detail_share_btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--chapter-detail-tab-active-text);
    transform: translateY(-2px);
}

.chapter_detail_share_btn.chapter_detail_copy_link{
    background-color: var(--chapter-detail-copy-link-bg);
    color: var(--chapter-detail-copy-link-text);
    border: 1px solid var(--chapter-detail-copy-link-border);
}

.chapter_detail_share_btn.chapter_detail_copy_link:hover {
    background-color: var(--chapter-detail-copy-link-hover-bg);
    color: var(--chapter-detail-copy-link-text);
    transform: initial;
    border-color: var(--chapter-detail-copy-link-hover-bg);
    box-shadow: 0 4px 8px var(--chapter-detail-copy-link-shadow);
}

.chapter_detail_share_btn.chapter_detail_copy_link.copied {
    background-color: var(--primary-color);
    color: var(--text-color);
}

/* Chapter Header */
.chapter-header {
    padding: 1.2rem 0;
    position: relative;
}

.chapter-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.chapter-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.chapter-header h1 {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--chapter-title-text);
    text-align: center;
    border-bottom: none;
    padding: 0;
    margin-bottom: 0;
}

.adult-title-end-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.adult_content-indicator {
    background-color: var(--error-color);
    color: white;
    font-size: 0.5em;
    padding: 3px 8px;
    border-radius: 40px;
    text-transform: uppercase;
    font-weight: bold;
    vertical-align: middle;
    display: inline-block;
}

.final-chapter-indicator {
    background-color: var(--primary-color);
    color: white;
    font-size: 0.5em;
    padding: 3px 8px;
    border-radius: 40px;
    text-transform: uppercase;
    font-weight: bold;
    vertical-align: middle;
    display: inline-block;
}

.draft-badge, .modal-draft-badge {
    background-color: var(--sidebar-secondary-bg-color);
    color: var(--text-color);
    font-size: 0.5em;
    padding: 3px 8px;
    border-radius: 40px;
    text-transform: uppercase;
    font-weight: bold;
    vertical-align: middle;
    display: inline-block;
    position: relative;
    border: 2px solid var(--primary-color);
}

.draft-badge {
    margin-left: 10px;
    top: -3px;
}

/* Chapter Navigation */
.chapter-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
}

.chapter-navigation.top {
    border-bottom: 1px solid var(--input-border-color);
}

.chapter-navigation.bottom {
    border-top: 1px solid var(--input-border-color);
}

.chapter-navigation a {
    background-color: var(--chapter-nav-button-bg);
    color: var(--text-color);
    border: 1px solid var(--input-border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.chapter-navigation a:hover:not(.disabled) {
    background-color: var(--chapter-nav-button-hover);
    color: var(--text-color);
}

.chapter-navigation .disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--chapter-nav-disabled-bg);
    color: var(--text-muted-color);
    border: 1px solid var(--input-border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    box-shadow: none;
}

.chapter-navigation i {
    color: var(--text-secondary-color);
}

/* Chapter Content */
.chapter-content {
    position: relative;
    color: var(--chapter-text);
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: break-word;
    word-break: break-word;
    margin-top: calc(-0.6em); 
}

.chapter-content.with-border {
    border-bottom: solid 1px var(--input-border-color);
    margin-bottom: 2rem;
}

.formatted-content strong {
    font-weight: bold;
}

.formatted-content em {
    font-style: italic;
}

.chapter-ad-banner {
    width: 100%;
    border-top: 1px solid #333; 
    border-bottom: 1px solid #333;
    background-color: rgba(255, 255, 255, 0.02);
    padding: 0.5rem 0;
    margin: 1rem 0;
}

/* Author Notes */
.author_note {
    position: relative;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    padding: 15px 35px 35px 35px;
    background-color: var(--sidebar-secondary-bg-color);
    display: block;
    margin-bottom: 2rem;
    border: 1px solid var(--input-border-color);
}

.author_note.active {
    display: none;
}

.author_note::before {
    content: "“";
    position: absolute;
    top: -20px;
    left: 10px;
    font-size: 4em;
    color: var(--author-note-quote-color);
    z-index: 1;
}

.author_note::after {
    content: "”";
    position: absolute;
    bottom: -60px;
    right: 10px;
    font-size: 4em;
    color: var(--author-note-quote-color);
    z-index: 1;
}

.author_note_avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.note_avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
}

.note_title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    z-index: 2;
}

.note_content {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    font-weight: bold;
    white-space: pre-line;
    overflow-wrap: break-word;
    word-break: break-word;
    z-index: 2;
    position: relative;
}

/* Comment Section */
.comment-section {
    border-top: 1px solid var(--input-border-color);
    padding-top: 1rem;
    font-family: Arial, sans-serif;
}

.comment-section h2 {
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    font-size: 1.5rem;
}

/* Comment Form */
#comment-form {
    margin-bottom: 1.5rem;
}

.comment-form {
    margin: 1rem 0;
}

.comment-form .form-group {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.comment-form [name="content"] {
    color: var(--text-color);
    border-radius: 0 12px 12px 0;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--chapter-border-color);
    background-color: var(--chapter-text-area);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form .form-group-btn {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.btn-submit {
    background-color: var(--primary-color);
    color: var(--text-dark-light-color);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--primary-hover-color);
}

.chapter-auth-prompt {
    margin: 1rem 0;
    font-size: 1rem;
}

.chapter-auth-link {
    color: #ffa617;
}

/* Comments Display */
.comment {
    background-color: var(--comment-bg-color);
    border: 1px solid var(--input-border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.3rem;
}

.comment-avatar-container {
    height: 40px;
    width: 40px;
}

.comment-avatar {
    margin-right: 0.7rem;
    max-height: 40px;
    max-width: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-meta {
    flex-grow: 1;
}

.comment-username {
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 0.2rem;
}

.comment-timestamp {
    font-size: 0.8rem;
    color: var(--text-muted-color);
}

.comment-content {
    color: var(--secondary-color);
    padding: 0.5rem 0.8rem 0 0.8rem;
    line-height: 1.4;
    font-size: 1rem;
    white-space: pre-line;
    overflow-wrap: break-word;
    word-break: break-word;
}

.highlight-comment {
    animation: chapter-highlight-fade 2s ease-in-out;
}

/* Comment Actions */
.comment-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.btn-like, .btn-dislike, .btn-reply, .btn-edit, .btn-delete, .btn-cancel, .btn-reply-reply {
    background-color: transparent;
    color: var(--intraction-button-color);
    border: none;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    gap: 0.3rem;
    align-items: center;
    font-size: 0.9rem;
}

.btn-like:hover, .btn-dislike:hover, .btn-reply:hover, .btn-edit:hover, .btn-reply-reply:hover {
    color: var(--primary-color);
}

.btn-delete:hover {
    color: var(--error-color);
}

.btn-like.liked, .btn-dislike.disliked {
    color: var(--primary-color);
}

.btn-cancel {
    background-color: var(--cancel-btn-bg);
    color: var(--text-secondary-color);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1.05rem;
    margin: 0;
    transition: background-color 0.3s ease;
}

.btn-cancel:hover {
    background-color: var(--cancel-btn-hover-bg);
}

/* Replies */
.replies {
    margin-left: 3rem;
    margin-top: 1rem;
}

.reply {
    background-color: var(--reply-bg-color);
    border: 1px solid var(--sidebar-secondary-bg-color);
    border-radius: 8px;
    padding: 0.8rem;
    margin-top: 0.8rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.reply-form-container {
    margin-left: 1rem;
}

.replies-wrapper {
    margin-top: 0.5rem;
}

.toggle-replies-btn, .load-more-replies-btn {
    border: none;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    border-radius: 1rem;
    background: transparent;
    font-size: 1rem;
    font-weight: inherit;
    color: var(--primary-color);
    margin-left: 0.3rem;
    transition: all 0.1s ease-in-out;
}

.load-more-replies-btn {
    margin-top: 0.5rem;
}

.toggle-replies-btn:hover, .load-more-replies-btn:hover {
    background: var(--primary-color);
    color: var(--about-button-text-color);
}

.arrow-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.toggle-replies-btn.open .arrow-icon {
    transform: rotate(180deg);
}

.edit-form-container {
    margin-top: 1rem;
}

/* Chapter List Modal */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    width: 450px;
    background-color: var(--modal-overlay-bg);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: var(--box-shadow);
    opacity: 0;
    z-index: 1000;
    overscroll-behavior: contain;
}

.modal.show {
    display: block;
    animation: chapter-modalFadeIn 0.3s ease forwards;
    overscroll-behavior: contain;
}

.modal.hide {
    animation: chapter-modalFadeOut 0.3s ease forwards;
}

.modal-content {
    background-color: var(--modal-content-bg);
    border: 1px solid var(--input-border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.close {
    color: var(--text-secondary-color);
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.modal-content h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.modal-content ul {
    list-style-type: none;
    padding: 0;
    max-height: 300px;
    overscroll-behavior: contain;
    overflow-y: auto;
}

.modal-content ul::-webkit-scrollbar {
    width: 6px;
}

.modal-content ul::-webkit-scrollbar-track {
    background: var(--sidebar-secondary-bg-color);
}

.modal-content ul::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.modal-content ul::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover-color);
}

.modal-content li {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--text-third-color);
    padding: 10px 0;
    max-width: 95%;
}

.modal-content li a {
    color: var(--text-third-color);
    text-decoration: none;
}

.modal-content li a:hover {
    text-decoration: underline;
}

.modal-content li.current-chapter a {
    color: var(--text-color);
    font-weight: bold;
    border-left: 4px solid #ffa500;
    padding-left: 5px;
}

/* Adult Content Warning Modal */
.adult-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.adult-modal-content {
    background-color: var(--background-color);
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--box-shadow);
    border-left: 5px solid var(--error-color);
}

.adult-warning-icon {
    color: var(--error-color);
    font-size: 3rem;
    margin-bottom: 15px;
}

.adult-modal-content h2 {
    color: var(--error-color);
    margin-bottom: 15px;
}

.adult-modal-content p {
    margin-bottom: 15px;
    color: var(--text-secondary-color);
}

.adult-modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.adult-btn-back {
    padding: 10px 20px;
    background-color: var(--sidebar-secondary-bg-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.adult-btn-proceed {
    padding: 10px 20px;
    background-color: var(--error-color);
    color: var(--text-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.adult-btn-back:hover {
    background-color: var(--filter-tab-hover-bg);
}

.adult-btn-proceed:hover {
    background-color: var(--primary-color);
}

.blurred {
    filter: blur(5px);
}

/* Author Feedback */
.author-feedback {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed var(--primary-color);
    color: var(--primary-color);
}

.author-feedback:hover::after,
.author-feedback.active::after {
    content: attr(data-note);
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%); 
    background: var(--comment-bg-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    max-width: 300px;
    width: max-content;
    white-space: pre-line;
    overflow-wrap: break-word;
    word-break: break-word;
    word-wrap: break-word;
    z-index: 999;
    box-shadow: var(--box-shadow);
    pointer-events: none;
}

.author-feedback.active::after {
    display: block;
}

/* Keyframe Animations */
@keyframes chapter-modalFadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes chapter-modalFadeOut {
    from { opacity: 1; transform: translate(-50%, -50%); }
    to { opacity: 0; transform: translate(-50%, -60%); }
}

@keyframes chapter-highlight-fade {
    0% { background-color: var(--highlight-fade-start); }
    100% { background-color: var(--comment-bg-color); }
}

@keyframes chapterDetailSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

/* Tablet and Mobile */
@media (max-width: 1200px) {
    .chapter_detail_mobile_tabs {
        display: flex;
    }
    
    .chapter_detail_desktop_container {
        display: none;
    }
    
    .chapter-main-content {
        margin-left: 0;
    }
    
    .chapter-reader-sidebar {
        display: none;
    }
}

@media (max-width: 1024px) {
    .chapter-main-content {
        margin-left: inherit;
    }

    .chapter-detail-space {
        width: 100%;
        margin-left: 0;
    }
    
    .chapter-detail-container {
        width: inherit;
        max-width: 800px;
    }
    
    .chapter-header h1 {
        font-size: 1.3rem;
    }
    
    .adult-title-end-container h1::before {
        left: -1.5rem;
    }

    .adult-title-end-container h1::after {
        right: -1.5rem;
    }
    
    .chapter-navigation {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.3rem;
    }
    
    .chapter-navigation button {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
    
    .modal {
        width: 60%;
        transform: none;
    }
    
    .comment-section {
        padding: 0.8rem 0;
    }
    
    .comment-section h2 {
        font-size: 1.3rem;
    }
    
    #comment-form button,
    .reply-form button,
    .comment-actions button,
    .form-group-btn button,
    .btn-reply-reply {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .comment-header {
        align-items: flex-start;
    }
    
    .comment-form textarea {
        font-size: 16px;
    }
    
    .replies {
        margin-left: 1.5rem;
    }
    
    .reply-form-container {
        margin-left: 1.5rem;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .chapter_detail_tab_button {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .chapter_detail_tab_button span {
        display: none;
    }
    
    .chapter_detail_tab_button i {
        font-size: 1.1rem;
    }
    
    .chapter_detail_share_buttons {
        gap: 0.75rem;
    }
    
    .chapter_detail_share_btn {
        min-width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    .chapter_detail_author_section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .chapter_detail_author_profile {
        align-self: stretch;
        justify-content: flex-start;
    }
    
    .chapter_detail_author_actions {
        align-self: stretch;
        align-items: stretch;
        gap: 1rem;
    }
    
    .chapter_detail_profile_actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .chapter_detail_follow_btn,
    .chapter_detail_tip_btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
        padding: 0.65rem 1rem;
    }
    
    .chapter_detail_followers_container {
        justify-content: center;
        gap: 2rem;
        padding-top: 0.5rem;
        border-top: 1px solid #333;
    }
    
    .chapter-detail-container {
        padding: 0 1rem 0.8rem;
        border-top: 1px solid var(--input-border-color);
        max-width: 100%;
        min-width: 100%;
        border-inline: none;
    }
    
    .chapter-header h1 {
        font-size: 1.5rem;
    }
    
    .adult-title-end-container::before {
        left: -1.3rem;
    }
    
    .adult-title-end-container::after {
        right: -1.3rem;
    }
    
    .edit-chapter-icon {
        top: 0.3rem;
        right: 0.3rem;
    }
    
    .chapter-content {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .chapter-ad-banner {
        margin: 0.7rem 0;
    }
    
    .chapter-navigation {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav_butt_hide {
        display: none;
    }
    
    .chapter-navigation a, .chapter-navigation .disabled {
        flex: 0 0 auto;
        width: 45px;
        height: 45px;
        border-radius: 50%;
        padding: 0;
        margin: 0 0.3rem;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 0.9rem;
    }
    
    .modal {
        width: 90%;
        max-width: none;
    }
    
    .modal-content {
        padding: 0.8em;
    }
    
    .modal-content h2 {
        font-size: 1.3em;
    }
    
    .modal-content ul {
        max-height: 60vh;
    }
    
    .comment-section {
        padding: 1em 0 0 0;
    }
    
    .comment-section h2 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }
    
    .comment {
        padding: 0.5rem;
    }
    
    .comment-form textarea {
        border-radius: 8px;
        font-size: 16px;
    }
    
    .btn-submit, .btn-cancel {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .comment-username {
        font-size: 1rem;
    }
    
    .comment-timestamp {
        font-size: 0.8rem;
    }
    
    .comment-content {
        font-size: 0.95rem;
        padding: 0.4em 0.8rem 0 0.8rem;
    }
    
    .comment-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-like, .btn-dislike, .btn-reply, .btn-edit, .btn-delete {
        padding: 0.4em 0.8rem;
        font-size: 0.85rem;
    }
    
    .btn-delete:hover {
        color: inherit;
    }
    
    .toggle-replies-btn:hover, .load-more-replies-btn:hover {
        background: inherit;
        color: var(--primary-color);
    }
    
    .replies {
        margin-left: 1.5rem;
        padding-left: 0;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .chapter_detail_mobile_tabs {
        gap: 0.5rem;
    }
    
    .chapter_detail_tab_button {
        padding: 0.5rem;
        border-radius: 0.375rem;
    }
    
    .chapter_detail_author_section {
        padding: 0.875rem;
    }
    
    .chapter_detail_share_section {
        padding: 0.875rem;
    }
    
    .chapter_detail_share_buttons {
        gap: 0.5rem;
    }
    
    .chapter_detail_share_btn {
        min-width: 2.25rem;
        height: 2.25rem;
        font-size: 0.9rem;
    }
    
    .chapter_detail_profile_actions {
        gap: 0.75rem;
    }
    
    .chapter_detail_follow_btn,
    .chapter_detail_tip_btn {
        min-width: 100px;
        padding: 0.4rem 0.8rem;
    }
    
    .chapter_detail_followers_container {
        gap: 1.5rem;
        font-size: 0.75rem;
    }
    
    .chapter-header h1 {
        font-size: 1.3rem;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .chapter_map_guide {
        font-size: 0.8rem;
    }
    
    .adult-title-end-container::before {
        left: -1rem;
    }
    
    .adult-title-end-container::after {
        right: -1rem;
    }
    
    .comment-section h2 {
        font-size: 1.2rem;
    }
    
    .comment-content {
        padding: 0.3rem 0.5rem 0 0.5rem;
    }
    
    .btn-like, .btn-dislike, .btn-reply, .btn-edit, .btn-delete, .btn-reply-reply {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .btn-delete:hover {
        color: inherit;
    }
}

/* Extra Small Mobile Styles */
@media (max-width: 390px) {    
    .chapter_map_guide {
        font-size: 0.7rem;
    }
    
    .chapter-content {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .note_content {
        font-size: 1rem;
        line-height: 1.3;
    }
}