/**
 * Wiki Chuyển Âm - Stylesheet Chuyên Biệt (Kiến Trúc Module Độc Lập Như Kho Tải Phim)
 * - Tối ưu 100% không gian container rộng rãi, không lẫn lộn với phim.
 * - Loại bỏ hoàn toàn giật lag, xung đột truy vấn.
 * - Giao diện sáng sủa, thanh lịch, chuẩn mực cao cấp.
 */

/* ==========================================================================
   1. KHUNG CHỨA TOÀN TRANG (PAGE WRAPPER & CONTAINER)
   ========================================================================== */
.stp-wiki-page-wrapper {
    width: 100%;
    min-height: 60vh;
    background: #f8fafc;
    padding: 20px 0 90px 0;
    box-sizing: border-box;
}

.stp-wiki-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ==========================================================================
   2. BANNER TIÊU ĐỀ WIKI HIỆN ĐẠI (HEADER BANNER)
   ========================================================================== */
.stp-wiki-header-banner {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 26px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    margin-bottom: 20px;
}

.stp-wiki-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eb3941;
    color: #ffffff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(235, 57, 65, 0.25);
}

.stp-wiki-main-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.stp-wiki-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0 auto;
    max-width: 680px;
    line-height: 1.5;
}

/* ==========================================================================
   3. CARD BỘ LỌC & TÌM KIẾM ĐỘC LẬP (FILTER CARD)
   ========================================================================== */
.stp-wiki-filter-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    margin-bottom: 24px;
}

/* Ô TÌM KIẾM */
.stp-wiki-search-form {
    width: 100%;
    margin-bottom: 14px;
}

.stp-wiki-search-box-wrap {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 3px 4px 3px 14px;
    transition: all 0.2s;
}

.stp-wiki-search-box-wrap:focus-within {
    background: #ffffff;
    border-color: #eb3941;
    box-shadow: 0 0 0 3px rgba(235, 57, 65, 0.12);
}

.stp-wiki-search-icon {
    color: #eb3941;
    font-size: 15px;
    margin-right: 10px;
}

.stp-wiki-search-box-wrap input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #1e293b;
    padding: 8px 0;
}

.stp-wiki-search-box-wrap input::placeholder {
    color: #94a3b8;
}

.stp-wiki-clear-btn {
    color: #94a3b8;
    padding: 4px 10px;
    font-size: 18px;
    text-decoration: none;
    line-height: 1;
}

.stp-wiki-clear-btn:hover {
    color: #eb3941;
}

.stp-wiki-btn-submit {
    background: #eb3941;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 9px 20px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.stp-wiki-btn-submit:hover {
    background: #c92a31;
}

/* THANH QUICK TABS PHÂN LOẠI */
.stp-wiki-filter-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.stp-wiki-count-badge-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 20px;
}

.stp-wiki-pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    display: inline-block;
}

.stp-wiki-quick-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.stp-wiki-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.stp-wiki-pill-btn:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #eb3941;
}

.stp-wiki-pill-btn.active {
    background: #101121;
    color: #ffffff;
    border-color: #101121;
    box-shadow: 0 2px 6px rgba(16, 17, 33, 0.15);
}

/* BREAK DÒNG TABS TRÊN MOBILE */
.stp-wiki-tabs-break {
    display: none;
}

/* ==========================================================================
   RESPONSIVE CHO THANH TABS TRÊN MOBILE:
   - KHI KHÔNG TÌM KIẾM (4 NÚT): Hiển thị trọn vẹn trên 1 hàng duy nhất vừa khít, không bị ẩn mép.
   - KHI TÌM KIẾM (5 NÚT): Hiển thị 3 nút hàng trên, 2 nút hàng dưới căn giữa đều đẹp.
   ========================================================================== */
@media (max-width: 640px) {
    .stp-wiki-filter-card {
        padding: 12px 10px;
    }
    .stp-wiki-filter-bottom-bar {
        padding-top: 10px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        overflow: visible;
    }

    /* ĐẨY HÀNG 2 XUỐNG KHI CÓ TÌM KIẾM */
    .stp-wiki-tabs-break {
        display: block;
        flex-basis: 100%;
        width: 100%;
        height: 0;
        margin: 0;
        padding: 0;
    }

    /* 1. KHI KHÔNG TÌM KIẾM (4 NÚT): VỪA KHÍT 1 HÀNG DUY NHẤT, KHÔNG CẮT CHỮ */
    .stp-wiki-quick-tabs.is-default-layout {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 4px;
    }
    .stp-wiki-quick-tabs.is-default-layout .stp-wiki-pill-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 6px 3px;
        font-size: 11px;
        gap: 3px;
        border-radius: 16px;
        white-space: nowrap;
        justify-content: center;
        text-align: center;
    }
    .stp-wiki-quick-tabs.is-default-layout .stp-wiki-pill-btn i {
        font-size: 10px;
        margin-right: 1px;
    }

    /* 2. KHI TÌM KIẾM (5 NÚT): 3 NÚT HÀNG TRÊN, 2 NÚT HÀNG DƯỚI CĂN GIỮA */
    .stp-wiki-quick-tabs.is-search-layout {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        width: 100%;
        gap: 7px 8px;
    }
    .stp-wiki-quick-tabs.is-search-layout .stp-wiki-pill-btn {
        padding: 6px 12px;
        font-size: 11.5px;
        gap: 4px;
        border-radius: 18px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .stp-wiki-quick-tabs.is-search-layout .stp-wiki-pill-btn i {
        font-size: 10.5px;
    }
}

@media (max-width: 400px) {
    .stp-wiki-filter-card {
        padding: 10px 8px;
    }
    .stp-wiki-quick-tabs.is-default-layout {
        gap: 3px;
    }
    .stp-wiki-quick-tabs.is-default-layout .stp-wiki-pill-btn {
        padding: 5.5px 1px;
        font-size: 10.5px;
        gap: 2px;
        border-radius: 14px;
    }
    .stp-wiki-quick-tabs.is-default-layout .stp-wiki-pill-btn i {
        font-size: 9.5px;
    }
    .stp-wiki-quick-tabs.is-search-layout {
        gap: 6px 6px;
    }
    .stp-wiki-quick-tabs.is-search-layout .stp-wiki-pill-btn {
        padding: 5.5px 9px;
        font-size: 11px;
    }
}

/* ==========================================================================
   4. LƯỚI BÀI VIẾT WIKI (CARDS GRID RỘNG RÃI 5 CỘT)
   ========================================================================== */
.stp-wiki-cards-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 36px;
    clear: both;
}

@media (max-width: 1300px) {
    .stp-wiki-cards-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1050px) {
    .stp-wiki-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 800px) {
    .stp-wiki-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 550px) {
    .stp-wiki-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* THẺ CARD CHUNG */
.stp-wiki-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.stp-wiki-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.stp-wiki-card a {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
}

/* 4.1. THẺ POSTER PHIM (TỶ LỆ 1 : 1.37) */
.stp-card-poster {
    display: flex;
    flex-direction: column;
}

.stp-card-media-poster {
    width: 100%;
    aspect-ratio: 1 / 1.37;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.stp-card-media-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.stp-card-poster:hover .stp-card-media-poster img {
    transform: scale(1.05);
}

/* THẺ TO CHO THƯƠNG HIỆU: KÍCH THƯỚC VUÔNG 1:1 VỪA KHÍT LOGO (CHIỀU NGANG BẰNG PHIM, KHÔNG BỊ KÉO DÀI) */
.stp-card-poster.cat-thuong-hieu .stp-card-media-poster {
    aspect-ratio: 1 / 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stp-card-poster.cat-thuong-hieu .stp-card-media-poster img {
    object-fit: contain;
    padding: 0;
    background: #ffffff;
    width: 100%;
    height: 100%;
}

.stp-card-poster.cat-thuong-hieu .stp-card-title {
    text-align: center;
}

.stp-card-placeholder-poster {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: #f8fafc;
    gap: 6px;
    font-size: 12px;
}

.stp-card-placeholder-poster i {
    font-size: 32px;
    color: #cbd5e1;
}

.stp-card-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 17, 33, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.stp-card-poster:hover .stp-card-hover-overlay {
    opacity: 1;
}

.stp-btn-view-quick {
    background: #eb3941;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stp-card-poster .stp-card-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.stp-card-poster .stp-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stp-card-poster .stp-card-meta {
    font-size: 11.5px;
    color: #64748b;
}

.stp-card-poster .stp-meta-views i {
    color: #eb3941;
}

/* 4.2. THẺ VUÔNG NHỎ (1:1) CHO THƯƠNG HIỆU / LỒNG TIẾNG / THUYẾT MINH */
.stp-card-square {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 22px 14px 14px 14px;
    background: #ffffff;
}

.stp-card-square .stp-card-media-square {
    width: 105px;
    height: 105px;
    margin: 0 auto 12px auto;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    background: #f8fafc;
    flex-shrink: 0;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.stp-card-square.cat-thuong-hieu .stp-card-media-square {
    border-radius: 12px;
    width: 115px;
    height: 95px;
}

.stp-card-square:hover .stp-card-media-square {
    transform: scale(1.05);
    border-color: #eb3941;
}

.stp-square-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stp-card-placeholder-square {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 34px;
}

.stp-card-square .stp-card-info {
    display: flex;
    flex-direction: column;
    flex: initial;
    justify-content: flex-start;
    margin-top: 4px;
}

.stp-card-square .stp-card-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stp-card-square:hover .stp-card-title {
    color: #eb3941;
}

.stp-card-square .stp-card-meta {
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: auto;
}

/* ==========================================================================
   5. PHÂN TRANG (PAGINATION)
   ========================================================================== */
.stp-wiki-pagination {
    margin: 20px 0 10px 0;
    text-align: center;
}

.stp-wiki-pagination ul.page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
}

.stp-wiki-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #334155;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.stp-wiki-pagination .page-numbers:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #eb3941;
}

.stp-wiki-pagination .page-numbers.current {
    background: #eb3941;
    color: #ffffff;
    border-color: #eb3941;
}

/* ==========================================================================
   6. TRANG CHI TIẾT BÀI VIẾT (SINGLE POST ĐỘC LẬP)
   ========================================================================== */
.stp-wiki-nav-bar {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    padding: 9px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.stp-wiki-nav-bar a {
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}

.stp-wiki-nav-bar a:hover {
    color: #eb3941;
}

.stp-wiki-nav-bar .sep {
    color: #cbd5e1;
}

.stp-wiki-nav-bar .current {
    color: #0f172a;
    font-weight: 600;
}

.stp-wiki-detail-header-wrap {
    margin-bottom: 20px;
}

.stp-wiki-detail-title {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.stp-wiki-meta-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.stp-meta-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.stp-badge-cat {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stp-badge-cat.badge-phim { background: #eb3941; }
.stp-badge-cat.badge-thuong-hieu { background: #0284c7; }
.stp-badge-cat.badge-long-tieng { background: #8b5cf6; }
.stp-badge-cat.badge-thuyet-minh { background: #f59e0b; }

.stp-badge-view, .stp-badge-date {
    font-size: 12.5px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.stp-btn-fandom-src {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.stp-btn-fandom-src:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #eb3941;
}

/* NÚT LÙI LẠI (BACK NAVIGATION) */
.stp-wiki-back-nav {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

.stp-wiki-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: #ffffff;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.2;
}

.stp-wiki-back-btn i {
    font-size: 12.5px;
    transition: transform 0.2s ease;
}

.stp-wiki-back-btn:hover {
    color: #eb3941;
    border-color: #fca5a5;
    background: #fff5f5;
    transform: translateX(-3px);
    box-shadow: 0 3px 10px rgba(235, 57, 65, 0.12);
}

.stp-wiki-back-btn:hover i {
    transform: translateX(-2px);
}

/* PROFILE HERO */
.stp-wiki-profile-hero {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 26px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 0;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

@media (max-width: 991px) {
    .stp-wiki-profile-hero {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

.stp-profile-intro-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .stp-profile-intro-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.stp-profile-avatar-wrap {
    flex-shrink: 0;
}

.is-poster-profile .stp-profile-avatar {
    width: 160px;
    aspect-ratio: 1 / 1.37;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.cat-thuong-hieu.is-poster-profile .stp-profile-avatar {
    width: 150px;
    height: 150px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #ffffff;
    padding: 0;
}

.is-square-profile .stp-profile-avatar {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #f1f5f9;
}

.stp-profile-placeholder {
    width: 140px;
    height: 140px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    color: #cbd5e1;
    border: 1px dashed #cbd5e1;
}

.stp-intro-heading {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 14px 0;
    line-height: 1.3;
}

.stp-intro-excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
}

.stp-intro-excerpt p {
    margin: 0 0 10px 0;
}

.stp-intro-excerpt strong, .stp-intro-excerpt b {
    color: #0f172a;
}

/* INFOBOX CHI TIẾT (BẢN TIẾNG VIỆT) */
.stp-wiki-infobox-table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    align-self: flex-start;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.stp-infobox-header {
    background: #f1f5f9;
    padding: 10px 14px;
    border-bottom: 2px solid #eb3941;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.stp-infobox-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.3px;
}

.stp-infobox-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.stp-infobox-table th, .stp-infobox-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.5;
}

.stp-infobox-table tr:last-child th, .stp-infobox-table tr:last-child td {
    border-bottom: none;
}

.stp-infobox-lbl {
    width: 38%;
    background: #fafbfc;
    color: #475569;
    font-weight: 600;
    text-align: left;
    border-right: 1px solid #f1f5f9;
    vertical-align: top;
}

.stp-infobox-val {
    color: #0f172a;
    font-weight: 500;
}

.stp-infobox-val a {
    color: #2563eb;
    text-decoration: none;
}

.stp-infobox-val a:hover {
    color: #eb3941;
    text-decoration: underline;
}

/* THÂN BÀI VIẾT & BẢNG VAI DIỄN */
.stp-wiki-article-body {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 26px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.stp-wiki-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    margin: 12px 0 24px 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

.stp-wiki-table-wrap::-webkit-scrollbar {
    height: 6px;
}

.stp-wiki-table-wrap::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 4px;
}

.stp-wiki-table-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.stp-wiki-table-wrap::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* TIÊU ĐỀ PHÂN MỤC TRÊN ĐẦU MỖI BẢNG WIKI (VD: Phim truyện, Phim hoạt hình...) */
.stp-wiki-table-subheading {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 24px 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e2e8f0;
}

.stp-wiki-table-block:first-child .stp-wiki-table-subheading {
    margin-top: 0;
}

.stp-wiki-table-subheading .stp-subheading-tag {
    background: #fee2e2;
    color: #dc2626;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stp-wiki-table-subheading .stp-subheading-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 9px;
    border-radius: 12px;
}

/* BẢNG WIKI CÓ ĐƯỜNG GẠCH CHẶN GIỮA CÁC CỘT (CHIA 2 BÊN NHƯ FANDOM) */
.stp-wikitable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    background: #ffffff;
}

.stp-wikitable th,
.stp-wikitable td {
    border: 1px solid #cbd5e1; /* Đường gạch viền dọc & ngang tạo ô chặn chuẩn MediaWiki / Fandom */
    padding: 10px 14px;
    line-height: 1.5;
    vertical-align: middle;
    font-weight: 400;
    color: #334155;
}

.stp-wikitable th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.stp-wikitable td.stp-col-first {
    font-weight: 600;
    color: #1e293b;
}

.stp-wikitable td[rowspan] {
    background: #ffffff;
}

.stp-wikitable tr:nth-child(even) td {
    background: #fafbfc;
}

.stp-wikitable tr:hover td {
    background: #f1f5f9;
}

/* LIÊN KẾT BẢNG & BÁCH KHOA TOÀN THƯ WIKI */
.stp-wikitable a,
.stp-wiki-cell-link,
.stp-wiki-auto-link {
    color: #eb3941 !important;
    text-decoration: none !important;
    border-bottom: none !important;
    font-weight: 600;
    font-style: normal;
    padding: 0 1px;
    transition: color 0.15s ease;
}

.stp-wikitable a:hover,
.stp-wiki-cell-link:hover,
.stp-wiki-auto-link:hover {
    color: #b91c1c !important;
    text-decoration: none !important;
    border-bottom: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* BÀI VIẾT LIÊN QUAN */
.stp-wiki-related-section {
    margin-top: 35px;
    margin-bottom: 30px;
    clear: both;
}

.stp-wiki-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eb3941;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stp-wiki-section-title > span {
    color: #0f172a;
}

.stp-wiki-section-title i {
    color: #eb3941;
    font-size: 16px;
}

.stp-wiki-section-title .highlight {
    color: #eb3941;
}

/* TRẠNG THÁI TRỐNG (EMPTY STATE) */
.stp-wiki-empty-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    color: #64748b;
    margin: 20px 0;
}

.stp-empty-icon {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 14px;
}

.stp-wiki-empty-box h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.stp-wiki-empty-box p {
    font-size: 14px;
    margin: 0 0 18px 0;
}

.stp-btn-all-wiki {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eb3941;
    color: #ffffff;
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.stp-btn-all-wiki:hover {
    background: #c92a31;
}
