/* NetTruyen clone - match nettruyen.works layout */
:root {
    --nt-primary: #f36621;
    --nt-primary-dark: #d94e0e;
    --nt-header: #2c1d5a;
    --nt-link: #495057;
    --nt-link-hover: #f36621;
    --nt-bg: #ebebeb;
    --nt-card: #ffffff;
    --nt-border: #dee2e6;
    --nt-muted: #6c757d;
}
html, body { background: var(--nt-bg); color: #212529; font-family: 'Poppins', Tahoma, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0; }
a { text-decoration: none; color: var(--nt-link); }
a:hover { color: var(--nt-link-hover); }
.container-main { max-width: 1200px; margin: 0 auto; padding: 0 8px; }

.fs-14 { font-size: 14px !important; } .fs-13 { font-size: 13px !important; } .fs-12 { font-size: 12px !important; } .fs-11 { font-size: 11px !important; }
.text-orange { color: var(--nt-primary) !important; }
.bg-orange { background: var(--nt-primary) !important; color: #fff; }

/* Header */
.nt-header { background: var(--nt-header); color: #fff; padding: 12px 0; }
.nt-header .header-inner { display: flex; align-items: center; gap: 16px; }
.nt-brand { display: flex; align-items: center; flex: 0 0 auto; }
.nt-brand img { height: 42px; width: auto; display: block; }
.nt-brand-logo { height: 38px; width: auto; display: block; }
.footer-logo { height: 36px; width: auto; display: block; }
.footer-brand { display: inline-block; }
.nt-brand-text { color: #fff; font-weight: 700; font-size: 26px; letter-spacing: -0.5px; text-decoration: none; }
.nt-brand-text b { color: #fff; }
.nt-brand-text span { color: var(--nt-primary); }
.nt-brand-text:hover { color: #fff; }
.nt-search { flex: 1; max-width: 560px; position: relative; }
.nt-search form { display: flex; background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid #ddd; }
.nt-search input { flex: 1; border: 0; padding: 9px 18px; outline: none; font-size: 14px; color: #333; background: #fff; }
.nt-search button { border: 0; background: var(--nt-primary); color: #fff; padding: 0 20px; cursor: pointer; font-size: 15px; }
.nt-header-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.nt-header-actions a, .nt-header-actions button {
    color: #fff; padding: 7px 14px; border-radius: 18px; font-size: 13px;
    border: 1px solid rgba(255,255,255,.3); background: transparent; cursor: pointer; font-weight: 500;
}
.nt-header-actions a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nt-header-actions .account-btn { background: var(--nt-primary); border-color: var(--nt-primary); }
.nt-header-actions .account-btn:hover { background: var(--nt-primary-dark); }

/* Navbar */
.nt-nav { background: #fff; border-bottom: 1px solid #e5e5e5; box-shadow: 0 2px 4px rgba(0,0,0,.04); }
.nt-nav .nav-inner { display: flex; align-items: stretch; position: relative; }
.nt-nav ul { list-style: none; display: flex; padding: 0; margin: 0; flex-wrap: wrap; }
.nt-nav ul > li { position: relative; }
.nt-nav ul > li > a {
    color: #444; padding: 12px 16px; display: flex; align-items: center; gap: 5px;
    font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .3px;
    border-right: 1px solid #f0f0f0;
}
.nt-nav ul > li > a:hover, .nt-nav ul > li.active > a { color: var(--nt-primary); background: #fafafa; }
.nt-nav ul > li.home > a { color: var(--nt-primary); font-size: 18px; padding: 10px 18px; }
.nt-nav .has-mega .megamenu {
    display: none; position: absolute; top: 100%; left: 0;
    background: #fff; color: #333; min-width: 720px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    border-radius: 0 0 6px 6px; padding: 18px; z-index: 1000;
    border-top: 3px solid var(--nt-primary);
}
.nt-nav .has-mega:hover .megamenu { display: block; }
.mega-title { font-weight: 700; margin: 0 0 10px; color: var(--nt-primary); font-size: 13px; text-transform: uppercase; }
.mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px 14px; margin: 0; padding: 0; list-style: none; }
.mega-grid a { font-size: 13px; color: #444; padding: 4px 0; display: block; }
.mega-grid a:hover { color: var(--nt-primary); }
.nav-mobile-btns { display: none; }

/* Page title like "Truyện đề cử" */
.nt-page-title { display: flex; align-items: center; gap: 6px; padding: 10px 4px 8px; font-size: 18px; font-weight: 700; color: #2c3e50; }
.nt-page-title a { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.nt-page-title a:hover { color: var(--nt-primary); }
.nt-page-title .more { font-size: 13px; color: var(--nt-muted); margin-left: auto; font-weight: 400; }
.nt-page-title .more:hover { color: var(--nt-primary); }

/* Featured carousel */
.featured-slide { background: #fff; border-radius: 6px; padding: 10px 24px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); position: relative; }
.featured-slide .owl-carousel .item { padding: 0; }
.featured-slide .owl-carousel .item .fs-thumb { display: block; background: #eee; overflow: hidden; border-radius: 3px; aspect-ratio: 2/3; position: relative; }
.featured-slide .owl-carousel .item .fs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.featured-slide .owl-carousel .item:hover .fs-thumb img { transform: scale(1.06); }
.featured-slide .slide-caption { padding: 6px 2px 2px; }
.featured-slide .slide-caption h3 {
    font-size: 12px; font-weight: 600; margin: 0 0 4px; line-height: 1.3;
    height: 2.6em; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.featured-slide .slide-caption h3 a { color: #111; }
.featured-slide .slide-caption h3 a:hover { color: var(--nt-primary); }
.featured-slide .fs-chap-row { display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: 11px; color: #444; }
.featured-slide .fs-chap-row .chap { color: #111; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
.featured-slide .fs-chap-row .time { color: var(--nt-muted); font-size: 10px; white-space: nowrap; flex-shrink: 0; }
.featured-slide .fs-chap-row .time i { font-size: 10px; margin-right: 2px; }
.featured-slide .owl-carousel { position: relative; }
.featured-slide .owl-nav { position: static !important; margin: 0 !important; }
.featured-slide .owl-nav button.owl-prev,
.featured-slide .owl-nav button.owl-next {
    display: flex !important; align-items: center; justify-content: center;
    position: absolute !important; top: 38% !important; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50% !important;
    background: #fff !important; color: #333 !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.18) !important;
    font-size: 18px !important; line-height: 1;
    opacity: .95; z-index: 10; cursor: pointer;
    margin: 0 !important; padding: 0 !important;
}
.featured-slide .owl-nav button.owl-prev { left: -16px; }
.featured-slide .owl-nav button.owl-next { right: -16px; }
.featured-slide .owl-nav button:hover { background: var(--nt-primary) !important; color: #fff !important; border-color: var(--nt-primary) !important; }
.featured-slide .owl-nav button i { font-size: 16px; line-height: 1; }

/* Main content box */
.nt-content-box { background: var(--nt-card); border-radius: 6px; padding: 14px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.nt-content-box .nt-content-title { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; margin-bottom: 12px; font-size: 18px; font-weight: 700; color: #2c3e50; border-bottom: 2px solid #f36621; }
.nt-content-box .nt-content-title .icon { color: var(--nt-primary); }
.nt-content-box .nt-content-title .filter-icon { margin-left: auto; color: var(--nt-primary); font-size: 14px; }

/* Main comic items grid - match nettruyen.works */
.items-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.items-row .item figure { margin: 0; }
.items-row .item .image { position: relative; overflow: hidden; border-radius: 4px; background: #f5f5f5; aspect-ratio: 2/3; }
.items-row .item .image > a { display: block; width: 100%; height: 100%; }
.items-row .item .image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.items-row .item:hover .image img { transform: scale(1.05); }
.items-row .item .image .view {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,.65); color: #fff;
    padding: 4px 8px; font-size: 12px;
}
.items-row .item .image .view span { display: flex; gap: 10px; align-items: center; }
.items-row .item .image .view i { font-size: 11px; margin-right: 3px; color: var(--nt-primary); }
.items-row .item figcaption { padding: 8px 0 2px; }
.items-row .item figcaption h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; line-height: 1.35; height: 2.7em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.items-row .item figcaption h3 a { color: #111; }
.items-row .item:hover figcaption h3 a { color: var(--nt-primary); }
.items-row .item .comic-item { list-style: none; margin: 0; padding: 0; }
.items-row .item .comic-item .chapter {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 0; border-top: 1px dashed #eee; font-size: 12px;
}
.items-row .item .comic-item .chapter a { color: #444; }
.items-row .item .comic-item .chapter a:hover { color: var(--nt-primary); }
.items-row .item .comic-item .chapter .time { color: var(--nt-muted); font-size: 11px; font-style: normal; white-space: nowrap; margin-left: 8px; }

/* Ribbon badge on thumb */
.ribbon { position: absolute; top: 6px; left: 0; z-index: 3; background: var(--nt-primary); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; text-transform: uppercase; letter-spacing: .3px; }
.ribbon.completed { background: #16a34a; }
.ribbon.coming { background: #6c757d; }

/* Top Tháng/Tuần/Ngày sidebar widget */
.top-widget-tabs { display: flex; border-bottom: 2px solid var(--nt-primary); margin-bottom: 10px; }
.top-widget-tabs .tab {
    flex: 1; text-align: center; padding: 10px; cursor: pointer; font-weight: 600;
    background: #f5f5f5; color: #555; font-size: 13px; border: 0;
}
.top-widget-tabs .tab.active { background: var(--nt-primary); color: #fff; }
.top-widget-tabs .tab:first-child { border-top-left-radius: 4px; }
.top-widget-tabs .tab:last-child { border-top-right-radius: 4px; }
.top-list { list-style: none; padding: 0; margin: 0; }
.top-list .top-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #eee; align-items: center; }
.top-list .top-row:last-child { border-bottom: 0; }
.top-num { flex: 0 0 32px; font-weight: 700; font-size: 22px; line-height: 1; text-align: center; }
.top-num.n1 { color: #d4af37; }
.top-num.n2 { color: #20a020; }
.top-num.n3 { color: #e74c3c; }
.top-num.n4, .top-num.n5, .top-num.n6, .top-num.n7, .top-num.n8, .top-num.n9, .top-num.n10 { color: #999; }
.top-thumb { flex: 0 0 48px; }
.top-thumb img { width: 48px; height: 64px; object-fit: cover; border-radius: 3px; display: block; }
.top-info { flex: 1; min-width: 0; font-size: 12px; }
.top-info a.name { font-size: 13px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #111; }
.top-info a.name:hover { color: var(--nt-primary); }
.top-info small { display: block; color: var(--nt-muted); font-size: 11px; margin-top: 3px; }
.top-info .chap { color: var(--nt-primary); font-size: 11px; font-weight: 600; }

/* Detail */
.comic-detail-row { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
@media (max-width: 768px) { .comic-detail-row { grid-template-columns: 1fr; } }
.comic-detail-row img { width: 100%; border-radius: 4px; }
.comic-detail-meta h1 { font-size: 22px; margin: 0 0 8px; color: #111; }
.meta-row { display: flex; padding: 6px 0; border-bottom: 1px solid #f2f2f2; font-size: 13px; }
.meta-row dt { width: 130px; color: var(--nt-muted); font-weight: 500; margin: 0; }
.meta-row dd { margin: 0; flex: 1; color: #333; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 14px; background: #f1f3f5; color: #444; font-size: 12px; margin: 1px 2px; border: 1px solid #e5e5e5; }
.chip:hover { background: var(--nt-primary); color: #fff; border-color: var(--nt-primary); }

/* Buttons */
.btn-nt { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 20px; font-weight: 600; font-size: 13px; cursor: pointer; border: 0; text-decoration: none; transition: background .15s; }
.btn-nt-orange { background: var(--nt-primary); color: #fff; }
.btn-nt-orange:hover { background: var(--nt-primary-dark); color: #fff; }
.btn-nt-navy { background: var(--nt-header); color: #fff; }
.btn-nt-navy:hover { background: #1d1340; color: #fff; }
.btn-nt-outline { background: transparent; border: 1px solid #ddd; color: #333; }

/* Chapter list */
.chapter-box { background: #fff; border-radius: 6px; padding: 14px; margin-top: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.chapter-box-head { font-weight: 700; font-size: 14px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 2px solid var(--nt-primary); text-transform: uppercase; color: #2c3e50; }
.chapter-rows { max-height: 520px; overflow-y: auto; }
.chapter-rows .row-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 13px; }
.chapter-rows .row-item a { flex: 1; color: #212529; }
.chapter-rows .row-item a:hover { color: var(--nt-primary); }
.chapter-rows .row-item .t { color: var(--nt-muted); font-size: 11px; white-space: nowrap; }

/* Reader */
.reader-toolbar { background: #fff; border-radius: 6px; padding: 10px 12px; margin: 10px 0; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.reader-pages { text-align: center; background: #000; border-radius: 4px; overflow: hidden; }
.reader-pages img { display: block; max-width: 100%; margin: 0 auto; width: 100%; max-width: 800px; }

/* Pagination (legacy bootstrap) */
.pagination { display: flex; gap: 4px; justify-content: center; padding: 14px 0; flex-wrap: wrap; list-style: none; }
.page-item .page-link { padding: 6px 12px; border: 1px solid var(--nt-border); border-radius: 4px; font-size: 13px; color: #333; background: #fff; }
.page-item.active .page-link { background: var(--nt-primary); color: #fff; border-color: var(--nt-primary); }
.page-item.disabled .page-link { color: #ccc; }
.page-item .page-link:hover { background: var(--nt-primary); color: #fff; border-color: var(--nt-primary); }

/* NetTruyen custom pagination */
.nt-pagination { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0 10px; }
.nt-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.nt-pager li { display: inline-flex; }
.nt-pager-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    border: 1px solid var(--nt-border); border-radius: 8px;
    background: #fff; color: #444;
    font-size: 13px; font-weight: 600; line-height: 1;
    text-decoration: none;
    transition: all .15s ease;
}
.nt-pager-btn:hover:not(.active):not(.disabled):not(.ellipsis) {
    background: var(--nt-primary); color: #fff; border-color: var(--nt-primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,.08);
}
.nt-pager-btn.active {
    background: var(--nt-primary); color: #fff; border-color: var(--nt-primary);
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    cursor: default;
}
.nt-pager-btn.disabled {
    color: #c7c7c7; background: #fafafa; border-color: #eee;
    cursor: not-allowed; pointer-events: none;
}
.nt-pager-btn.ellipsis {
    color: #aaa; background: transparent; border-color: transparent;
    min-width: 24px; padding: 0 4px; cursor: default;
}
.nt-pager-btn i { font-size: 14px; }
.nt-pager-info { font-size: 13px; color: #666; }
.nt-pager-info strong { color: var(--nt-primary); font-weight: 700; }
.nt-pager-info .sep { margin: 0 8px; color: #ccc; }
@media (max-width: 480px) {
    .nt-pager-btn { min-width: 32px; height: 32px; padding: 0 8px; font-size: 12px; }
    .nt-pager-info { font-size: 12px; }
}

/* Drawer */
.drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 2000; }
.drawer { position: fixed; top: 0; left: -320px; width: 300px; height: 100vh; background: #fff; z-index: 2001; padding: 16px; overflow-y: auto; transition: left .3s; }
.drawer.open { left: 0; }
.drawer-overlay.open { display: block; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--nt-primary); }
.drawer-close { background: none; border: 0; font-size: 24px; cursor: pointer; color: #333; }
.drawer ul { list-style: none; padding: 0; margin: 0; }
.drawer ul li a { display: block; padding: 10px 0; border-bottom: 1px solid #eee; color: #212529; }

/* Footer */
.nt-footer { background: var(--nt-header); color: #ccc; padding: 28px 0 14px; margin-top: 30px; }
.nt-footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
@media (max-width: 768px) { .nt-footer .footer-grid { grid-template-columns: 1fr; } }
.nt-footer h5 { color: #fff; font-size: 14px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .5px; }
.nt-footer a { color: #bbb; font-size: 13px; padding: 3px 0; display: block; }
.nt-footer a:hover { color: var(--nt-primary); }
.nt-footer .footer-bottom { text-align: center; border-top: 1px solid #3a2a6e; padding-top: 10px; margin-top: 16px; font-size: 12px; opacity: .8; }

/* Responsive */
@media (max-width: 1024px) { .items-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
    .nt-header { display: none; }
    .nt-nav .nav-inner ul:not(.nav-mobile-btns) { display: none; }
    .nav-mobile-btns { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; flex: 1; color: #444; }
    .items-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .comic-detail-row { grid-template-columns: 1fr; }
}

main { padding: 14px 0; min-height: 400px; }

/* Detail page specifics */
.comic-detail-title { font-size: 22px; font-weight: 700; margin: 0; color: #111; text-transform: uppercase; }
.comic-updated-time { font-size: 12px; color: var(--nt-muted); font-style: italic; margin-top: 4px; }
.comic-section-head { font-size: 14px; font-weight: 700; margin: 0; padding: 8px 0; color: #111; text-transform: uppercase; border-bottom: 2px solid var(--nt-primary); }
.comic-section-head i { color: var(--nt-primary); margin-right: 6px; }
.breadcrumbs a { color: var(--nt-muted); }
.breadcrumbs a:hover { color: var(--nt-primary); }

.meta-row dt i { color: var(--nt-muted); margin-right: 6px; }
.chip-link { color: #337ab7 !important; background: transparent !important; border: 0 !important; padding: 2px 4px !important; }
.chip-link:hover { color: var(--nt-primary) !important; background: transparent !important; }

.follow-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-follow { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 20px; background: #e74c3c; color: #fff; font-weight: 600; font-size: 13px; border: 0; text-decoration: none; cursor: pointer; }
.btn-follow:hover { background: #c0392b; color: #fff; }
.follow-count { font-size: 13px; color: var(--nt-muted); }
.follow-count strong { color: var(--nt-primary); font-weight: 700; }

/* Chapter table */
.chapter-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.chapter-table thead th { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--nt-primary); color: #666; font-weight: 600; font-size: 13px; background: #fafafa; }
.chapter-table thead th:nth-child(2), .chapter-table thead th:nth-child(3) { text-align: right; }
.chapter-table tbody tr { border-bottom: 1px dashed #eee; }
.chapter-table tbody tr:hover { background: #fafafa; }
.chapter-table tbody td { padding: 10px 8px; }
.chapter-table tbody td.t { color: var(--nt-muted); font-size: 12px; text-align: right; white-space: nowrap; }
.chapter-table tbody td a { color: #212529; }
.chapter-table tbody td a:hover { color: var(--nt-primary); }

