/* Reader / dark-mode styles used across truyen reading pages.
   Extracted from Views/Shared/_Header.cshtml inline <style> block so it is
   downloaded once and cached by the browser instead of being duplicated in
   every page response. */

/* Khung chứa tổng thể dạng hộp chìm xuống nền */

.vntq-reader-wrapper {
    --vntq-bg-light: #fbf7ee;
    --vntq-text-light: #111111;
    --vntq-shadow-light: rgba(0, 0, 0, 0.12) 0px 12px 28px, rgba(0, 0, 0, 0.06) 0px 4px 10px;
    /* ĐÃ SỬA: Hạ hẳn tông màu nền chế độ tối xuống để sâu hơn nền xám bên ngoài */
    --vntq-bg-dark: #121212;
    --vntq-text-dark: #cbd5e1;
    /* CHÌA KHÓA: Sử dụng đổ bóng INSET (hướng vào trong) tạo độ hút sâu như lòng hộp lún xuống */
    --vntq-shadow-dark: inset 0px 8px 24px rgba(0, 0, 0, 0.9), inset 0px 2px 8px rgba(0, 0, 0, 0.95);
    background-color: var(--vntq-bg-light);
    color: var(--vntq-text-light);
    box-shadow: var(--vntq-shadow-light);
    max-width: 97%;
    margin: 36px auto;
    padding: 18px;
    border-radius: 12px;
    overflow-x: hidden;
    border: 1px solid transparent; /* Khai báo viền mặc định để xử lý hiệu ứng mượt */
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, border-color 0.3s;
}

    /* Khi kích hoạt chế độ tối: Hộp sẽ lún sâu xuống */
    .vntq-reader-wrapper.vntq-dark-mode {
        background-color: var(--vntq-bg-dark);
        color: var(--vntq-text-dark);
        box-shadow: var(--vntq-shadow-dark);
        border-color: #050505; /* Đường viền đen sắc cạnh tạo vết cắt sâu xuống bề mặt nền */
    }

/* Điều chỉnh lại màu chữ các thông số thống kê trong chế độ tối để hài hòa độ chìm */
.vntq-dark-mode .vntq-stats-container {
    color: #8892b0;
}

.vntq-dark-mode .vntq-nav-top {
    border-bottom-color: #222222;
}

.vntq-dark-mode .vntq-nav-bottom {
    border-top-color: #222222;
}

/* Khối cấu trúc Tên tác giả trên tên truyện */
/* Định dạng Tên tác giả ở chế độ Sáng */
.vntq-author-top {
    font-family: tacgiavn, Arial, sans-serif !important;
    font-size: 1.8em !important;
    color: var(--vntq-text-main) !important;
    text-transform: capitalize !important;
    text-shadow: 4px 4px 4px var(--vntq-shadow-accent) !important;
    text-align: center !important;
    margin-bottom: 10px !important;
}

    /* Bắt buộc thẻ link <a> kế thừa màu của khối cha, không bị màu xanh mặc định đè lên */
    .vntq-author-top a {
        color: inherit !important;
        text-decoration: none;
    }

        .vntq-author-top a:hover {
            color: var(--vntq-hover-accent) !important; /* Đổi màu nâu cam khi rê chuột */
        }

/* Định dạng Tên tác giả ở chế độ Tối */
.vntq-dark-mode .vntq-author-top {
    color: #d8d8b2 !important; /* Chuyển sang màu xám vàng nhạt để nổi rõ trên nền đen */
    text-shadow: 3px 3px 4px #000000 !important; /* Đổi bóng đổ sang màu đen */
}

    .vntq-dark-mode .vntq-author-top a:hover {
        color: #ffca28 !important; /* Đổi màu vàng sáng khi rê chuột ở chế độ tối */
    }

/* Định dạng tên truyện ở chế độ Sáng */
.vntq-reader-title {
    font-family: tuadevn, "Times New Roman", serif !important;
    font-size: 40px !important;
    color: #004444 !important; /* Mã #044 */
    padding: 4px !important;
    margin: 3px 4px 15px 0 !important;
    line-height: 62px !important;
    text-shadow: 4px 4px 4px var(--vntq-shadow-accent) !important;
    text-align: center !important;
}

/* Định dạng tên truyện ở chế độ Tối */
.vntq-dark-mode .vntq-reader-title {
    color: #80deea !important; /* Đổi sang xanh ngọc nhạt, dịu mắt không bị chói */
    text-shadow: 3px 3px 4px #000000 !important; /* Đổi bóng đổ sang đen để chữ nổi rõ trên nền tối */
}
/* Định dạng Tựa hồi ở chế độ Sáng */
.tuahoi_a {
    font-family: music, "Times New Roman", serif !important;
    color: var(--vntq-text-subtitle) !important;
    font-size: 1.8em !important;
    line-height: 1.8 !important;
    text-align: center !important;
    text-indent: 0 !important;
    text-shadow: 4px 4px 4px #9f9f90 !important;
    font-weight: bold !important;
    text-transform: capitalize !important;
    margin-bottom: 20px !important;
}

/* Định dạng Tựa hồi ở chế độ Tối */
.vntq-dark-mode .tuahoi_a {
    color: #c4c4a3 !important; /* Màu xanh xám nhạt sáng hơn để nổi trên nền đen */
    text-shadow: 3px 3px 4px #000000 !important; /* Đổi bóng đổ sang đen */
}

.vntq-reader-subtitle {
    font-family: "Times New Roman", Times, serif;
    font-size: 20px;
    font-style: italic;
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
    opacity: 0.8;
}

/* Ảnh bìa lớn khổ 80% */
.vntq-large-cover-box {
    text-align: center;
    width: 100%;
    margin: 0 0 25px 0;
}

    .vntq-large-cover-box img {
        width: 80%;
        max-width: 640px;
        height: auto;
        border-radius: 8px;
        box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    }

/* Khối hiển thị thông số và xếp hạng lai */
.vntq-stats-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin-bottom: 25px;
    color: #555;
}

.vntq-dark-mode .vntq-stats-container {
    color: #aaa;
}

.vntq-stats-info span {
    margin: 0 5px;
    font-weight: bold;
}

.vntq-rating-block {
    position: relative;
    display: inline-block;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.vntq-rating-static {
    color: #ddd;
    position: relative;
    display: inline-block;
    transition: opacity 0.2s;
}

.vntq-stars-inner {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    overflow: hidden;
    color: #ffca28;
    width: var(--percent);
}

.vntq-rating-input {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.2s;
}

.vntq-rating-block:hover .vntq-rating-input {
    opacity: 1;
}

.vntq-rating-block:hover .vntq-rating-static {
    opacity: 0.1;
}

.vntq-rating-stars-voter {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
}

    .vntq-rating-stars-voter input {
        display: none;
    }

    .vntq-rating-stars-voter label {
        color: #999;
        padding: 0 2px;
        transition: color 0.1s;
    }

        .vntq-rating-stars-voter label:hover,
        .vntq-rating-stars-voter label:hover ~ label,
        .vntq-rating-stars-voter input:checked ~ label {
            color: #ffca28 !important;
        }

/* Thanh điều hướng và nút tiến lùi */
.vntq-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin: 20px 0;
    font-family: Arial, sans-serif;
}

.vntq-nav-top {
    border-bottom: 1px solid #cccccc;
}

.vntq-nav-bottom {
    border-top: 1px solid #cccccc;
    margin-top: 40px;
}

.vntq-dark-mode .vntq-nav-top {
    border-bottom-color: #444;
}

.vntq-dark-mode .vntq-nav-bottom {
    border-top-color: #444;
}

.vntq-btn-nav {
    display: inline-block;
    text-decoration: none;
    padding: 6px 16px;
    background-color: #e9ecef;
    color: #495057 !important;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 15px;
}

    .vntq-btn-nav:hover {
        background-color: #dee2e6;
        color: #212529 !important;
    }

.vntq-btn-hidden {
    visibility: hidden;
    padding: 6px 16px;
}

.vntq-dark-mode .vntq-btn-nav {
    background-color: #333;
    color: #ccc !important;
    border-color: #555;
}

    .vntq-dark-mode .vntq-btn-nav:hover {
        background-color: #444;
        color: #fff !important;
    }

.vntq-select-chuong {
    max-width: 280px !important;
    text-overflow: ellipsis; /* Tạo dấu 3 chấm nếu tên tựa hồi quá dài */
    overflow: hidden;
    white-space: nowrap;
}

.vntq-dark-mode .vntq-select-chuong, .vntq-dark-mode .vntq-input-number, .vntq-dark-mode .vntq-btn-submit {
    background-color: #2a2a2a;
    color: #ccc;
    border-color: #555;
}

.vntq-input-number {
    width: 60px;
    text-align: center;
    padding: 5px;
}

.vntq-btn-submit {
    background-color: #007bff;
    color: #ffffff;
    border: none;
    cursor: pointer;
    padding: 5px 12px;
}

.vntq-jump-box {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: Arial, sans-serif;
}

/* Định dạng nội dung văn bản ở chế độ Sáng */
#vntqTextContent, .vntq-text-content, .truyen_text {
    font-family: Bookerly, "Times New Roman", serif !important;
    color: var(--vntq-text-main) !important;
    line-height: 150% !important;
    text-align: justify !important;
    padding-top: 10px !important;
}

    /* Ép màu cho cả các thẻ p bên trong để không bị CSS khác ghi đè */
    #vntqTextContent p, .vntq-text-content p, .truyen_text p {
        color: inherit !important;
    }

/* Định dạng nội dung văn bản ở chế độ Tối */
.vntq-dark-mode #vntqTextContent,
.vntq-dark-mode .vntq-text-content,
.vntq-dark-mode .truyen_text {
    color: #b3b3a1 !important; /* Xám vàng nhạt, dịu mắt, chống mỏi mắt ban đêm */
}
/* --- CHẾ ĐỘ SÁNG --- */

/* Thay vì dùng 2em (phụ thuộc vào cha), ép cứng kích thước tiêu đề bằng px */
.vntq-text-content h1 {
    color: var(--vntq-heading);
    font-family: tuadevn, serif !important;
    font-size: 32px !important; /* Đổi từ em sang px để không bị phóng to quá cỡ */
    font-weight: normal !important;
    text-align: center !important;
    text-shadow: 4px 4px 4px var(--vntq-shadow-accent) !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
}

    /* Chữ hoa đầu dòng ngay sau h1 */
    .vntq-text-content h1 + p:first-letter {
        font-family: chuhoa, serif !important;
        color: #004444 !important;
        font-size: 400% !important;
        margin: -0.1em 0.1em -0.1em 0 !important; /* Điều chỉnh lại lề margin để khớp với Bookerly */
        font-weight: normal !important;
        float: left !important;
        line-height: 1 !important;
    }

/* --- CHẾ ĐỘ TỐI --- */

/* Cấu trúc chuẩn khi vntq-dark-mode bọc ngoài vntq-text-content */
.vntq-dark-mode .vntq-text-content h1 {
    color: #cbd5e1 !important;
    text-shadow: 3px 3px 4px #000000 !important;
}

    .vntq-dark-mode .vntq-text-content h1 + p:first-letter {
        color: #80deea !important;
    }

/* Cấu trúc dự phòng nếu class vntq-dark-mode bị dính chặt vào thẻ nội dung */
.vntq-text-content.vntq-dark-mode h1 {
    color: #cbd5e1 !important;
    text-shadow: 3px 3px 4px #000000 !important;
}

    .vntq-text-content.vntq-dark-mode h1 + p:first-letter {
        color: #80deea !important;
    }


/* =========================================================
           CHẾ ĐỘ SÁNG (LIGHT MODE) - H2, H3, H4, H6
           ========================================================= */

.vntq-text-content h6 {
    color: var(--vntq-heading);
    font-family: tuadevn, serif !important;
    font-size: 36px !important; /* Đổi từ 2.3em sang px */
    font-weight: normal !important;
    text-align: center !important;
    margin-bottom: 15px !important;
}

.vntq-text-content h3 {
    color: #004444;
    font-family: tacgiavn, sans-serif !important;
    font-size: 34px !important; /* Đổi từ 2.3em sang px */
    line-height: 1.3 !important;
    text-align: center !important;
    margin-bottom: 15px !important;
}

.vntq-text-content h2 {
    color: #a6a364;
    font-family: tuahoi2, serif !important;
    font-size: 28px !important; /* Ép cứng kích thước px */
    margin: 0.5em 0 15px 0 !important;
    padding-bottom: 10px !important;
    background: url(/images/gachngangtrangchinhH2.png) no-repeat left bottom;
    clear: both;
}

.vntq-text-content h4 {
    background: url(/images/gachgiua.png) no-repeat center;
    margin: 24px auto;
    width: 100%;
    height: 6px;
    clear: both;
}

    /* Chữ hoa đầu dòng (Dropcap) sau H2, H3, H4 */
    .vntq-text-content h2 + p:first-letter,
    .vntq-text-content h3 + p:first-letter,
    .vntq-text-content h4 + p:first-letter {
        font-family: chuhoa, serif !important;
        color: #004444 !important;
        font-size: 400% !important;
        margin: -0.1em 0.1em -0.1em 0 !important;
        font-weight: normal !important;
        float: left !important;
        line-height: 1 !important;
    }

/* =========================================================
       TẠO CHỮ TO ĐẦU DÒNG (CHẶN TUYỆT ĐỐI NẾU ĐÃ CÓ ẢNH ĐỒ HỌA)
       ========================================================= */
.vntq-text-content:not(.has-graphic-dropcap) p:first-of-type:first-letter,
.vntq-text-content:not(.has-graphic-dropcap) .chuhoavn p:first-of-type:first-letter {
    font-family: chuhoa, serif !important;
    color: #004444 !important;
    font-size: 400% !important;
    margin: -0.1em 0.1em -0.1em 0 !important;
    font-weight: normal !important;
    float: left !important;
    line-height: 1 !important;
}

/* Khử thụt lề cho đoạn văn đầu tiên */
.vntq-text-content p:first-of-type,
.chuhoavn p:first-of-type {
    text-indent: 0 !important;
}

/* =========================================================
       MÀU CHỮ TO Ở CHẾ ĐỘ TỐI (CHẶN NẾU CÓ ẢNH)
       ========================================================= */
.vntq-dark-mode .vntq-text-content:not(.has-graphic-dropcap) p:first-of-type:first-letter,
.vntq-text-content.vntq-dark-mode:not(.has-graphic-dropcap) p:first-of-type:first-letter {
    color: #80deea !important;
}


/* =========================================================
           CHẾ ĐỘ TỐI (DARK MODE) - CẤU TRÚC CHUẨN (CHA - CON)
           ========================================================= */

.vntq-dark-mode .vntq-text-content h6 {
    color: #cbd5e1 !important;
}

.vntq-dark-mode .vntq-text-content h3 {
    color: #80deea !important; /* Xanh ngọc nhạt dịu mắt */
}

.vntq-dark-mode .vntq-text-content h2 {
    color: #c2c08d !important;
    text-shadow: 2px 2px 3px #000000 !important;
}

    .vntq-dark-mode .vntq-text-content h2 + p:first-letter,
    .vntq-dark-mode .vntq-text-content h3 + p:first-letter,
    .vntq-dark-mode .vntq-text-content h4 + p:first-letter {
        color: #80deea !important;
    }


/* =========================================================
           CHẾ ĐỘ TỐI (DARK MODE) - CẤU TRÚC DỰ PHÒNG (TRÊN CÙNG THẺ DỰ ÁN)
           ========================================================= */

.vntq-text-content.vntq-dark-mode h6 {
    color: #cbd5e1 !important;
}

.vntq-text-content.vntq-dark-mode h3 {
    color: #80deea !important;
}

.vntq-text-content.vntq-dark-mode h2 {
    color: #c2c08d !important;
    text-shadow: 2px 2px 3px #000000 !important;
}

    .vntq-text-content.vntq-dark-mode h2 + p:first-letter,
    .vntq-text-content.vntq-dark-mode h3 + p:first-letter,
    .vntq-text-content.vntq-dark-mode h4 + p:first-letter {
        color: #80deea !important;
    }

/* =========================================================
       CHẾ ĐỘ SÁNG (LIGHT MODE)
       (Màu văn bản thường mặc định: var(--vntq-text-main))
       ========================================================= */
.vntq-text-content b {
    color: #9c4200 !important; /* Màu nâu hổ phách đậm để làm nổi bật khối chữ đậm */
}

.vntq-text-content i {
    color: #005555 !important; /* Màu xanh teal đậm để phân biệt khối chữ nghiêng */
}

    /* Trường hợp chữ vừa đậm vừa nghiêng (bọc lẫn nhau) */
    .vntq-text-content b i,
    .vntq-text-content i b {
        color: #b32400 !important; /* Tông đỏ đất để nhấn mạnh đặc biệt */
    }


/* =========================================================
       CHẾ ĐỘ TỐI (DARK MODE) - CẤU TRÚC CHUẨN (CHA - CON)
       (Màu văn bản thường mặc định: #b3b3a1)
       ========================================================= */
.vntq-dark-mode .vntq-text-content b {
    color: #e0af68 !important; /* Màu vàng cam ấm, dịu mắt và nổi bật trên nền tối */
}

.vntq-dark-mode .vntq-text-content i {
    color: #80deea !important; /* Màu xanh ngọc nhạt, đồng bộ với màu tiêu đề tối */
}

    .vntq-dark-mode .vntq-text-content b i,
    .vntq-dark-mode .vntq-text-content i b {
        color: #ff9e80 !important; /* Màu cam san hô dịu cho nhấn mạnh đặc biệt */
    }


/* =========================================================
       CHẾ ĐỘ TỐI (DARK MODE) - CẤU TRÚC DỰ PHÒNG (TRÊN CÙNG THẺ)
       ========================================================= */
.vntq-text-content.vntq-dark-mode b {
    color: #e0af68 !important;
}

.vntq-text-content.vntq-dark-mode i {
    color: #80deea !important;
}

    .vntq-text-content.vntq-dark-mode b i,
    .vntq-text-content.vntq-dark-mode i b {
        color: #ff9e80 !important;
    }

/* Khối trượt tác phẩm cùng tác giả */
.vntq-author-works {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 2px solid #ddd;
    position: relative;
}

.vntq-dark-mode .vntq-author-works {
    border-top-color: #444;
}

.vntq-author-works h3 {
    font-size: 20px;
    margin-bottom: 15px;
    font-family: Arial, sans-serif;
}

    .vntq-author-works h3 a {
        color: #007bff;
        text-decoration: none;
    }

.vntq-dark-mode .vntq-author-works h3 a {
    color: #64b5f6;
}

.vntq-author-works h3 a:hover {
    text-decoration: underline;
}

.vntq-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
}

.vntq-carousel-track {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    width: 100%;
    padding: 10px 0;
}

    .vntq-carousel-track::-webkit-scrollbar {
        display: none;
    }

.vntq-work-item {
    flex: 0 0 calc(20% - 12px);
    text-align: center;
    text-decoration: none;
    color: inherit;
    font-family: Arial, sans-serif;
}

    .vntq-work-item img {
        width: 100%;
        aspect-ratio: 2/3;
        object-fit: cover;
        border-radius: 4px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        margin-bottom: 8px;
        transition: transform 0.2s;
    }

    .vntq-work-item:hover img {
        transform: scale(1.03);
    }

    .vntq-work-item span {
        display: block;
        font-size: 14px;
        font-weight: bold;
        line-height: 1.3;
    }

    .vntq-work-item:hover span {
        color: #007bff;
    }

.vntq-carousel-btn {
    position: absolute;
    z-index: 10;
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.vntq-btn-prev {
    left: -15px;
}

.vntq-btn-next {
    right: -15px;
}

/* CẤU HÌNH TỰ ĐỘNG CO GIÃN THÔNG MINH CHO THIẾT BỊ DI ĐỘNG */
@media (max-width: 768px) {
    /* Tối ưu khung chứa wrapper */
    .vntq-reader-wrapper {
        padding: 9px;
        max-width: 100%;
        margin: 15px auto;
    }
    /* Thu nhỏ ảnh bìa */
    .vntq-large-cover-box img {
        width: 95%;
    }
    /* ==============================================
                   BỔ SUNG: KHỬ LỖI TRANH CHẤP DIỆN TÍCH THANH ĐIỀU HƯỚNG
                   ============================================== */
    .vntq-nav-bar {
        gap: 4px;
        padding: 8px 0;
        margin: 15px 0;
    }
    /* Thu nhỏ nút Tiến / Lùi để vừa vặn ngón tay mà không thô */
    .vntq-btn-nav {
        padding: 5px 10px;
        font-size: 13px;
        border-radius: 3px;
    }

    .vntq-btn-hidden {
        padding: 5px 10px;
    }
    /* Thu hẹp Menu thả chọn chương */
    .vntq-select-chuong {
        padding: 5px 8px;
        font-size: 13px;
        min-width: 100px;
        max-width: 120px;
    }
    /* Tối ưu hóa ô nhảy chương ở chân trang */
    .vntq-jump-box {
        gap: 4px;
    }
        /* Ẩn chữ "Chương:" trên mobile để lấy không gian cho 2 nút Tiến Lùi không bị đẩy tràn viền */
        .vntq-jump-box span {
            display: none;
        }

    .vntq-input-number {
        width: 45px;
        padding: 4px;
        font-size: 13px;
    }

    .vntq-btn-submit {
        padding: 4px 8px;
        font-size: 13px;
    }
    /* Thu nhỏ danh sách tác phẩm chạy ngang */
    .vntq-work-item {
        flex: 0 0 calc(33.333% - 10px);
    }

    .vntq-btn-prev {
        left: 0;
    }

    .vntq-btn-next {
        right: 0;
    }
}
/* =========================================================
           CHẾ ĐỘ SÁNG (LIGHT MODE)
           ========================================================= */
.chuongso_a {
    font-family: tuahoi2, "Times New Roman", serif !important;
    color: var(--vntq-text-subtitle) !important;
    font-size: 1.8em !important;
    text-align: center !important;
    text-indent: 0 !important;
    text-shadow: 4px 4px 4px var(--vntq-shadow-accent) !important;
    line-height: 1.5 !important;
    margin-bottom: 10px !important;
}

/* =========================================================
           CHẾ ĐỘ TỐI (DARK MODE)
           ========================================================= */
/* Cấu trúc chuẩn khi vntq-dark-mode bọc ngoài wrapper */
.vntq-dark-mode .chuongso_a {
    color: #c2c08d !important; /* Nâng sáng tông màu vàng xám gốc để đọc rõ trên nền tối */
    text-shadow: 3px 3px 4px #000000 !important; /* Đổi bóng đổ sang màu đen để tạo độ nổi khối */
}

/* Cấu trúc dự phòng nếu class tối nằm trên cùng thẻ nội dung */
.vntq-text-content.vntq-dark-mode .chuongso_a {
    color: #c2c08d !important;
    text-shadow: 3px 3px 4px #000000 !important;
}
/* Thêm một breakpoint nhỏ hơn cho điện thoại màn hình hẹp hẳn (< 480px) */
@media (max-width: 480px) {
    .vntq-reader-title {
        font-size: 26px;
    }

    .vntq-text-content {
        font-size: 19px;
    }
    /* Hạ bớt 1 size chữ trên đt nhỏ để cân đối tỷ lệ */
    .vntq-work-item {
        flex: 0 0 calc(50% - 8px);
    }
}

/* CSS cho các hàng ký tự đặc biệt (***, ---, △△△) */
.vntq-separator {
    text-align: center !important;
    text-indent: 0 !important;
    letter-spacing: 5px; /* Giãn các ký tự ra cho thoáng */
    color: #888;
    margin: 30px 0 !important;
    font-weight: bold;
}

/* Đảm bảo chế độ tối hàng phân cách không bị chói */
.vntq-dark-mode .vntq-separator {
    color: #555;
}

/* CSS canh giữa và hiển thị đẹp cho thẻ Img trong truyện */
.vntq-img-center {
    text-align: center !important;
    margin: 25px 0;
}

    .vntq-img-center img {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* Tạo viền đổ bóng nhẹ để ảnh nổi bật trên nền giấy */
    }

.vntq-dark-mode .vntq-img-center img {
    box-shadow: 0 4px 10px rgba(255,255,255,0.05); /* Đổ bóng sáng nhẹ trong chế độ tối */
}

.vntq-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Thay đổi số này để tăng giảm khoảng cách giữa 3 nút */
    margin-bottom: 20px;
    text-align: center;
}
/* Khối lịch sử đọc dở dang dạng danh sách chữ */
.vntq-reading-history {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid #ddd;
}

.vntq-dark-mode .vntq-reading-history {
    border-top-color: #444;
}

.vntq-reading-history h3 {
    font-size: 20px;
    margin-bottom: 15px;
    font-family: Arial, sans-serif;
}

.vntq-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 5px 0;
    font-family: Arial, sans-serif;
}

.vntq-history-item-text {
    font-size: 16px;
}

    .vntq-history-item-text a {
        text-decoration: none;
        color: #0056b3;
        font-weight: bold;
    }

.vntq-dark-mode .vntq-history-item-text a {
    color: #64b5f6;
}

.vntq-history-item-text a:hover {
    text-decoration: underline;
}

.vntq-history-chap {
    font-weight: normal;
    font-style: italic;
    color: #666;
    margin-left: 5px;
}

.vntq-dark-mode .vntq-history-chap {
    color: #aaa;
}
/* CSS bổ sung hỗ trợ giao diện tối cho phần giới thiệu */
.vntq-dark-mode {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

    .vntq-dark-mode .vntq-metadata-header h1 {
        color: #80deea !important;
    }

    .vntq-dark-mode .vntq-metadata-header p {
        color: #aaa !important;
    }

    .vntq-dark-mode .vntq-intro-box {
        background-color: #2a2a2a !important;
        border-left-color: #80deea !important;
    }

    .vntq-dark-mode .vntq-intro-text {
        color: #ccc !important;
    }

    .vntq-dark-mode .vntq-intro-box h3 {
        color: #80deea !important;
    }


@media (max-width: 768px) {
    .vntq-pdf-viewer-box {
        height: 600px !important;
    }

    .vntq-title {
        font-size: 22px !important;
    }
}

@media (max-width: 768px) {
    /* 1. Ẩn menu trợ giúp/giới thiệu */
    .top-menu {
        display: none !important;
    }
    /* 2. Ép khung cha và logo tuân thủ canh lề trái tuyệt đối */
    #logo-events {
        display: flex !important;
        justify-content: flex-start !important; /* Trị hệ thống Flexbox mới */
        text-align: left !important; /* Trị hệ thống căn chữ cũ */
    }

    .site-logo {
        text-align: left !important;
        float: left !important; /* Trị hệ thống float cũ nếu có */
        margin-left: 0 !important; /* Phá bỏ lệnh margin tự động căn giữa */
        margin-right: auto !important; /* Đẩy toàn bộ khoảng trống thừa về bên phải */
    }

        .site-logo a {
            display: inline-block !important;
            text-align: left !important;
        }
}
