.reading .reading-control .chapter-nav.scroll-to-fixed-fixed.scroll-up {
    visibility: visible !important;
    top: unset !important;
    bottom: 0px !important;
}

reading .reading-control .chapter-nav.scroll-to-fixed-fixed {
    background-color: rgba(255, 255, 255, 0.8);
}

.text-danger {
    color: red !important;
}

.text-success {
    color: #23a903 !important;
}

#comment_email,
.sort-comments {
    display: none;
}

/* Modal Content/Box */
.modal .modal-content {
    background-color: #fefefe;
    margin: 12% auto;
    /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    /* Could be more or less, depending on screen size */
}

/* The Close Button */
.modal .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.modal .close:hover,
.modal .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.dark .chapter a {
    color: #fff;
}

.dark .modal-content {
    background-color: #423e3e;
}

.h-auto,
.h-auto * {
    height: auto;
}

.h-auto {
    text-align: center;
}

.my-banner {
    text-align: center;
}

.my-banner * {
    max-width: 100%;
}

video {
    max-width: 100%;
}

.banner-ads {
    display: flex;
    flex-direction: column;
}

.banner-desktop.container img,
.banner-desktop-go88.container img,
.banner-desktop-yo88.container img,
.banner-desktop-gem.container img,
.banner-desktop-789.container img {
    width: 100%;
    aspect-ratio: 728 / 90;
}

.banner-desktop.container,
.banner-desktop-go88.container,
.banner-desktop-yo88.container,
.banner-desktop-gem.container,
.banner-desktop-789.container {
    max-width: 1030px
}

.textlink_home ul li a {
    border: solid 1px #f2f2f2;
    padding: 5px;
    white-space: nowrap;
    border-radius: 4px;
    color: #f2f2f2;
}

.textlink_home ul li {
    border-color: #f2f2f2;
    color: #f2f2f2;
}

.dark .textlink_home ul li {
    border-color: #303030;
    color: #303030;
}

.dark .textlink_home ul li a {
    border-color: #303030;
    color: #303030;
}

.textlink_home ul li {
    margin: 0;
    margin-right: 5px;
    line-height: 38px;
    list-style: none;
    display: inline-block;
}

.textlink_home ul {
    margin: 0;
    padding: 0;
}

.footer .link-footer {
    font-size: 10px;
}

.footer .link-footer ul li a,
.footer .link-footer ul li a:hover  {
    color: #252525;
    border-color: #252525;
    padding: 2px;
    border: none;
}

.footer .link-footer ul li {
    color: #252525;
    border-color: #252525;
    line-height: 10px;
    margin: 0;
}

#divcaptcha {
    width: 35%;
    display: inline-block;
    margin-right: 5px;
    margin-top: 5px;
    font-size: 18px;
    border-radius: 5px;
    border: 1px solid gainsboro;
    float: left;
    line-height: 30px;
    text-align: center;
    font-family: arial;
    color: #5fa6de;
    ;
    font-weight: bold;
}

.comment-info .regenerateCaptchaBtn {
    float: left;
    width: 32px;
    line-height: 30px;
    margin-top: 5px;
    border-radius: unset;
    background-color: #337ab7;
    border: none;
    color: white;
    text-decoration: none;
    cursor: pointer;
    border-radius: 5px;
    line-height: 32px;
    height: 32px;
}

#cpatchaTextBox {
    width: 35%;
    display: inline-block;
    margin-right: 5px;
    margin-top: 5px;
    font-size: 16px;
    margin-left: 5px;
    line-height: 29px;
    border-radius: 5px;
    border: 1px solid gainsboro;
}

.comment-wrapper .comment-info button {
    border-radius: 5px;
    line-height: 18px;
}

.cpatcha-warning {
    border-color: red !important;
}

.join-comment {
    border-top: 2px solid #721799 !important;
    color: #555;
    background-color: #fff;
    border: 1px solid #ddd;
    border-bottom-color: transparent;
    cursor: default;
    margin-right: 2px;
    line-height: 1.42857143;
    padding: 10px 15px;
    display: block;
    position: relative;
    text-decoration: none;
    cursor: pointer;
    margin-top: 10px;
    text-decoration: none !important;
}

.follow-link_a {
    white-space: nowrap;
    color: #d9534f;
    float: right;
}

.follow-url[style*="pointer-events: none"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.darkBox ul li .point-total {
    font-size: 11px;
    border: 1px solid red;
    text-align: center;
    white-space: nowrap;
    display: inline-block;
    border-radius: 3px;
    padding: 1px 4px;
}

.avatar-wrap {
    height: auto !important;
    position: relative;
}

.avatar-wrap .point-total {
    display: block;
    white-space: nowrap;
    font-size: 10px;
    /* font-weight: 700; */
    text-align: center;
    border: 1px solid red;
}

.account-info .info-detail .forminput .avatar {
    width: 80px;
}

.text_link_iwin_club a{
    color: black;
}

.text_link_iwin_club a:hover {
    text-decoration: none;
}

.popup_report {
    display: none;
    position: absolute;
    top: -103px;
    right: 0;
    z-index: 1000;
}

.popup_report #popup_content:after {
    content: '';
    background-color: #000;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    opacity: .5;
}

.popup_report .popup_center_important {
    left: 50% !important;
    top: 50% !important;
    position: fixed !important;
    transform: translate(-50%, -50%) !important;
}

.popup_report .popup_content {
    width: 430px;
    padding: 15px 20px;
    left: 50%;
    top: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding-bottom: 25px;
}

.popup_report .popup_content h2 {
    font-size: 20px;
    text-align: center;
    margin: 10px 0 20px;
    font-weight: 600;
    text-transform: uppercase;
}

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

.popup_report .popup_content ul li {
    margin-bottom: 15px;
    position: relative;
}

.popup_report .popup_content ul li p {
    font-size: 14px;
    font-weight: 500;
    line-height: 30px;
}

.popup_report .popup_content ul li select {
    margin: 0;
    border: 1px solid #ccc;
    width: 100%;
    height: 49px;
    border-radius: 5px;
    padding: 0 15px;
    font-size: 15px;
    color: #354052;
    cursor: pointer;
}

.popup_report .popup_content ul li select:focus-visible {
    outline: none;
}

.popup_report .popup_content ul li p span.note {
    color: red;
}

.popup_report .popup_content ul li p span.empty_error {
    color: red;
    display: none;
}

.popup_report .popup_content ul li textarea {
    margin: 0;
    border: 1px solid #ccc;
    width: 100% !important;
    height: 49px;
    border-radius: 5px;
    padding: 5px 15px;
    font-size: 15px;
    color: #354052;
}
.popup_report .yes_no .no {
    background-color: #3f94d5;
}

.popup_report .yes_no button {
    padding: 0 10px;
    border: none;
    border-radius: 5px;
    line-height: 35px;
    color: #fff;
    font-size: 13px;
    min-width: 50px;
    cursor: pointer;
    margin-left: 5px;
    background-color: #f18121;
    font-weight: 600;
}

.popup_report .yes_no {
    float: right;
}

.popup_report textarea:focus, button:focus {
    outline: none;
}

.report_success, .report_fail {
    text-align: center;
    display: none;
}



.container_btn_ok {
    display: flex;
    justify-content: center;
    display: none;
}

.btn_ok {
    width: 100%;
    color: white;
    background: #5cb85c;
    outline: none;
    border: 0;
}

@media (max-width: 575px) {
    .popup_report .popup_content {
        width: 280px;
    }
}

.banner-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media screen and (max-width: 768px) {
    .banner-container {
        flex-direction: column;
    }

    /* Special class for adcash banner only */
    .layout-banner-adcash {
        width: 100%;
        height: auto;
    }
}

.banner-adu {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px;
    overflow: hidden;
    border: 1px solid rgb(194, 194, 194, 0.6);
}

.layout-stable-300x250 {
    min-width: 300px;
    min-height: 250px; 
}

.layout-stable-300x100 {
    min-width: 300px;
    min-height: 100px; 
}

.show-sps {
    margin-top: 25px;
    position: relative;
    height: fit-content;
    width: fit-content;
    margin-inline: auto;
}

a.show-sps {
    display: inline-block;
}

.show-sps::after {
    content: var(--ads-text-sps);
    position: absolute;
    left: 0;
    top: -25px;
    height: 25px;
    width: 100%;
    font-size: 12px;
    font-weight: 500;
    align-items: center;
    color: white;
    background-color: #5d5d5d;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Customize Notification Box */

.notify_block.desktop {
    display: block !important;
}
.notify_block.mobile {
    display: none !important;
}

@media screen and (max-width: 768px) {
    .notify_block.desktop {
        display: none !important;
    }
    .notify_block.mobile {
        display: block !important;
    }
}

/* Facebook Customize Frame Box */
.facebook-frame-container {
    overflow: hidden;
    max-width: 100%;
}

.facebook-frame-container iframe {
    max-width: 100%;
}

/* Box auth NetTruyen Web Team */
.author-container {
    max-width: 100%;
    background: #394467;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    margin-top: 20px;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.author-name {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    color: rgb(198, 198, 198);
}

.author-description {
    font-size: 16px;
    color: rgb(198, 198, 198);
    margin: 10px 0;
    text-align: justify;
}

.author-links a {
    display: inline-block;
    margin-right: 10px;
    text-decoration: none;
    color: while;
}

.author-links a:hover {
    text-decoration: underline;
}

@media screen and (max-width:768px) {
    .author-avatar {
        width: 120px;
        height: 120px;
    }

    .author-name {
        font-size: 16px;
    }

    .author-links img {
        width: 40px !important;
        height: 40px !important;
    }

    p.author-description {
        font-size: 14px;
    }
}

#back-to-top {
    z-index: 100001;
}

/* Bottom text toggle */
#ctl00_bottomText.bottom-text-collapsed {
    --clamp-lines: 15; /* Default: 15 lines */
    max-height: calc(var(--clamp-lines) * 1.5em); /* 1.5em per line (line-height) */
    overflow: hidden;
    position: relative;
    line-height: 1.5em;
}

#ctl00_bottomText.bottom-text-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 96px;
    background: linear-gradient(180deg, rgba(233, 233, 233, 0), rgba(233, 233, 233, 1));
    pointer-events: none;
}

#ctl00_bottomText.bottom-text-collapsed.bg-white::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

#ctl00_bottomText.category h2 {
    font-size: 20px!important;
    margin-top: 24px;
}

#ctl00_bottomText.category h3 {
    font-size: 18px!important;
    margin: 16px 0;
}

.bottom-text-toggle-container {
    text-align: center;
    margin: 1rem 0;
}

.bottom-text-toggle {
    margin-top: 0.75rem;
    background: none;
    border: none;
    color: #0457d6;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    font-size: 16px;
}

.bottom-text-toggle:hover {
    text-decoration: underline;
}

.bottom-text-toggle:focus-visible {
    outline: 2px solid #0457d6;
    outline-offset: 2px;
}

/* Content backlink text colors for light/dark theme */
.ct-blink-item {
    color: var(--text-color, inherit);
}
body.dark .ct-blink-item {
    color: var(--text-color-dark, var(--text-color, inherit));
}
.ct-blink-item a {
    color: inherit!important;
}

/* Content backlink Toggle button styles */
.ct-blink-collapsible {
    margin: -10px 0;
    display: flex;
    flex-direction: column;
    align-items: end;
}
.ct-blink-toggle {
    background: none;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.2s;
    border: none;
    outline: none;
}
body.dark .ct-blink-toggle {
    color: var(--btn-text-color-dark, inherit);
}
/* ===== Genres Sidebar (shared - v1.1) ===== */
.genres-sidebar {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0;
}
.genres-sidebar .ModuleContent { padding: 0; }
.genres-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    padding: 9px 14px;
    margin: 0;
    background: #f5f5f5;
    border-bottom: 2px solid #da0000;
}
.nav-genres-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.nav-genres-list li {
    border-bottom: 1px solid #efefef;
}
.nav-genres-list li a {
    display: block;
    padding: 4px 10px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}
.nav-genres-list li a:hover { color: #da0000; }
.nav-genres-list li.active a { color: #da0000; font-weight: 600; }
/* Dark mode */
.dark .genres-sidebar { border-color: #333; }
.dark .genres-title { background: #222; color: #fff; }
.dark .nav-genres-list li a { color: #ddd; }
.dark .nav-genres-list li { border-color: #333; }

/* ===== Story Item Card (shared - v1.2) ===== */
/* Tên truyện: tối đa 2 dòng */
.item figcaption h3 {
    margin: 6px 0 4px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}
.item figcaption h3 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #222;
    text-decoration: none;
    word-break: break-word;
}
.item figcaption h3 a:hover { color: #da0000; }

/* Danh sách chương */
.item .comic-item {
    list-style: none;
    padding: 0;
    margin: 0;
}
.item .comic-item li.chapter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 12px;
    gap: 4px;
}
/* Tên chương: 1 dòng, truncate */
.item .comic-item li.chapter a {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #555;
    text-decoration: none;
    min-width: 0;
}
.item .comic-item li.chapter a:hover { color: #da0000; }
/* Thời gian */
.item .comic-item li.chapter .time {
    flex-shrink: 0;
    color: #aaa;
    font-size: 11px;
    white-space: nowrap;
}
/* Dark mode */
.dark .item figcaption h3 a { color: #eee; }
.dark .item .comic-item li.chapter { border-color: #333; }
.dark .item .comic-item li.chapter a { color: #bbb; }
.dark .item .comic-item li.chapter .time { color: #777; }

/* ===== List Chapter (detail page - shared v1.3) ===== */
.list-chapter { margin-top: 15px; }
.list-chapter .list-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #da0000;
    padding-bottom: 8px;
    margin-bottom: 0;
}
.list-chapter .heading {
    background: #f5f5f5;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    padding: 6px 0;
    border-bottom: 1px solid #e0e0e0;
    margin: 0;
}
#chapter_list { list-style: none; padding: 0; margin: 0; }
#chapter_list > li {
    border-bottom: 1px solid #f0f0f0;
    padding: 6px 0;
    font-size: 13px;
}
#chapter_list .chapter a {
    color: #333;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#chapter_list .chapter a:hover { color: #da0000; }
.dark #chapter_list .chapter a { color: #ddd; }
.dark .list-chapter .heading { background: #222; color: #999; border-color: #333; }
.dark #chapter_list > li { border-color: #2a2a2a; }

/* ===== Related section (shared v1.3) ===== */
.related-section { margin-top: 25px; }
.related-section .list-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #da0000;
    padding-bottom: 8px;
    margin-bottom: 15px;
}
.dark .related-section .list-title { color: #eee; }

/* ===== Detail info (shared v1.3) ===== */
.list-info { list-style: none; padding: 0; margin: 0 0 10px; }
.list-info li {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}
.list-info li .name { color: #666; font-weight: 600; margin: 0; }
.list-info li p { margin: 0; }
.list-info li a { color: #da0000; }
.dark .list-info li { border-color: #2a2a2a; }
.dark .list-info li .name { color: #999; }

/* Read / Follow buttons (shared v1.3) */
.btn-warning {
    background-color: #f0a500;
    color: #fff !important;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
}
.btn-warning:hover { background-color: #d4900a; }
.btn-danger {
    background-color: #da0000;
    color: #fff !important;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-danger:hover { background-color: #b50000; }

/* Load-more shared button */
.load-more-btn {
    background: #da0000;
    color: #fff;
    border: none;
    padding: 9px 30px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
}
.load-more-btn:hover { background: #b50000; }
.load-more-btn:disabled { background: #aaa; cursor: not-allowed; }

/* ===== STORY ITEM CARD — DEFINITIVE FIX (v2.0) ===== */
/* Grid: item đã có col-xs-6 col-sm-4 col-md-3 từ Blade */
.items .item {
    margin-bottom: 15px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    float: left;
}

/* Ảnh bìa */
.items .item .image {
    position: relative;
    height: 200px !important;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    background: #f5f5f5;
}
.items .item .image a {
    display: block;
    height: 100%;
}
.items .item .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    vertical-align: middle;
}

/* Thống kê view/comment/heart */
.items .item .image .view {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: auto;
    line-height: 22px;
    padding: 2px 5px;
    font-size: 11px;
    color: #fff;
    background: rgba(0,0,0,0.65);
}

/* Badge Full */
.items .item .label-full {
    position: absolute;
    top: 5px; right: 5px;
    background: #da0000;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 2px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Tên truyện — tối đa 2 dòng */
.items .item figcaption { padding: 4px 2px 0; }
.items .item figcaption h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 4px 0 4px;
    line-height: 1.35;
}
.items .item figcaption h3 a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #222;
    text-decoration: none;
    word-break: break-word;
}
.items .item figcaption h3 a:hover { color: #da0000; }

/* Danh sách chương */
.items .item .comic-item {
    list-style: none;
    padding: 0;
    margin: 0;
}
.items .item .comic-item li.chapter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 4px;
    font-size: 12px;
    overflow: hidden;
}
/* Tên chương — 1 dòng, truncate */
.items .item .comic-item li.chapter a {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #555;
    text-decoration: none;
}
.items .item .comic-item li.chapter a:hover { color: #da0000; }
/* Thời gian */
.items .item .comic-item li.chapter .time {
    flex-shrink: 0;
    color: #aaa;
    font-size: 11px;
    white-space: nowrap;
}

/* Dark mode */
.dark .items .item .image { border-color: #333; background: #1a1a1a; }
.dark .items .item figcaption h3 a { color: #eee; }
.dark .items .item .comic-item li.chapter { border-color: #2a2a2a; }
.dark .items .item .comic-item li.chapter a { color: #bbb; }
.dark .items .item .comic-item li.chapter .time { color: #666; }

/* Mobile: 2 cột, ảnh nhỏ hơn */
@media (max-width: 480px) {
    .items .item .image { height: 160px !important; }
    .items .item figcaption h3 { font-size: 12px; }
}

/* ===== STORY GRID — FIX FLOAT CASCADE (v2.1) ===== */
/* Chuyển .items .row sang flexbox để item luôn align đúng hàng */
.items .row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -5px !important;
    margin-right: -5px !important;
}

/* Xóa float, dùng flex item */
.items .row .item {
    float: none !important;
    display: flex !important;
    flex-direction: column;
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin-bottom: 15px;
    box-sizing: border-box;
}

/* Figure chiếm đầy chiều cao item để cards align */
.items .row .item figure {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
}

/* figcaption co giãn */
.items .row .item figcaption {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 4px 2px 0;
}

/* comic-item list ở cuối figcaption */
.items .row .item .comic-item {
    margin-top: auto;
}

/* Bootstrap clearfix không cần trên flexbox */
.items .row::before,
.items .row::after {
    display: none !important;
}

/* ===== Main content spacing (v1.4) ===== */
/* Khoảng cách giữa navigation và nội dung trang */
main.main {
    padding-top: 12px;
}

/* Breadcrumb spacing */
.breadcrumb {
    margin-top: 8px !important;
    margin-bottom: 10px !important;
    padding: 6px 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    font-size: 13px;
}
.breadcrumb > li + li::before {
    content: "›";
    padding: 0 5px;
    color: #999;
}
.breadcrumb > li a { color: #da0000; }
.breadcrumb > li.active { color: #666; }
