/* =================================================================
   1. GLOBAL & RESET STYLES
   ================================================================= */
.container {
    padding: 15px 20px;
}

/* Màu chủ đạo cho các thẻ span nhấn mạnh */
.logo span, 
.footer-logo span, 
.section-title span {
    color: #e50914;
}

/* Ẩn thanh cuộn chung cho các thành phần trượt ngang */
.tags-inner::-webkit-scrollbar,
.nav-menu::-webkit-scrollbar {
    display: none;
}

/* =================================================================
   2. HEADER & NAVIGATION
   ================================================================= */
.site-header {
    background-color: #0b0b0b;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 20px;
}

.site-branding .custom-logo-link {
    display: inline-block;
    line-height: 0;
}

.site-branding .custom-logo {
    max-height: 45px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 1px;
}

/* Main Navigation */
.main-navigation {
    background: #141414;
    border-top: 1px solid #222;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 20px;
    list-style: none;
}

.nav-menu li a {
    display: block;
    padding: 6px 12px;
    background: #1f1f1f;
    border-radius: 4px;
    font-size: 14px;
    color: #eee;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.nav-menu li a:hover {
    background: #e50914;
    color: #fff;
}

/* Header Tags Bar */
.header-tags-bar {
    background: #0f0f0f;
    border-top: 1px solid #1c1c1c;
    padding: 8px 0;
}

.tags-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 20px;
    scrollbar-width: none;
}

.tags-label {
    font-size: 13px;
    color: #f5c518;
    font-weight: bold;
}

.tag-chip {
    font-size: 12px;
    color: #aaa;
    background: #1a1a1a;
    padding: 3px 10px;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid #2a2a2a;
    transition: color 0.2s, border-color 0.2s;
}

.tag-chip:hover {
    color: #fff;
    border-color: #e50914;
}

/* =================================================================
   3. SEARCH FORM
   ================================================================= */
.search-form {
    display: flex;
    background: #1f1f1f;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #333;
}

.search-field {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 12px;
    outline: none;
    min-width: 220px;
}

.search-submit {
    background: #e50914;
    color: #fff;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: bold;
}

/* =================================================================
   4. MOVIE GRID & CARDS (LƯỚI & THẺ PHIM)
   ================================================================= */
.home-section {
    margin-bottom: 40px;
}

.section-heading {
    margin: 20px 0;
    border-left: 4px solid #e50914;
    padding-left: 12px;
}

.section-heading-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 20px;
    text-transform: uppercase;
}

.archive-description {
    color: #999;
    font-size: 14px;
    margin-top: 5px;
}

.view-more-btn {
    font-size: 13px;
    color: #f5c518;
    text-decoration: none;
    font-weight: 600;
    background: #1f1f1f;
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid #333;
    transition: all 0.2s;
}

.view-more-btn:hover {
    background: #e50914;
    color: #fff;
    border-color: #e50914;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.movie-card {
    background: #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.movie-poster-wrap {
    position: relative;
    padding-top: 56.25%; /* Khung ngang 16:9 */
    overflow: hidden;
    background: #222;
}

.movie-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e50914;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 3px;
    z-index: 2;
}

.movie-views {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #f5c518;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 3px;
    z-index: 2;
}

.movie-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s;
}

.movie-card:hover .movie-play-overlay {
    opacity: 1;
}

.play-icon {
    width: 45px;
    height: 45px;
    background: #e50914;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.movie-info {
    padding: 10px;
}

.movie-title {
    font-size: 15px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.movie-origin-title {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =================================================================
   5. SINGLE MOVIE (TRANG XEM PHIM)
   ================================================================= */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-container iframe,
.video-container video,
.player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.player-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.player-tip-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1c1414;
    border: 1px dashed #e50914;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #e0e0e0;
    font-size: 14px;
}

.player-tip-box .tip-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.player-tip-box .tip-text strong {
    color: #f5c518;
}

.episodes-section {
    background: #1c1c1c;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.server-title {
    font-size: 15px;
    margin-bottom: 10px;
    color: #f5c518;
}

.episode-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.ep-btn {
    background: #2b2b2b;
    color: #ddd;
    border: 1px solid #3d3d3d;
    padding: 7px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.ep-btn:hover,
.ep-btn.active {
    background: #e50914;
    color: #fff;
    border-color: #e50914;
}

.movie-detail-box {
    display: flex;
    gap: 25px;
    background: #181818;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.detail-poster {
    width: 220px;
    flex-shrink: 0;
}

.detail-poster img {
    width: 100%;
    border-radius: 6px;
}

.detail-title {
    font-size: 24px;
    color: #e50914;
}

.detail-origin {
    font-size: 16px;
    color: #999;
    margin-bottom: 15px;
}

.meta-list {
    list-style: none;
    margin-bottom: 15px;
    padding: 0;
}

.meta-list li {
    margin-bottom: 6px;
    color: #ccc;
}

.meta-list a {
    color: #f5c518;
    text-decoration: none;
}

.badge-inline {
    background: #e50914;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* =================================================================
   6. SEO, ADS & PAGINATION
   ================================================================= */
.seo-home-banner {
    background: #161616;
    border: 1px solid #262626;
    border-left: 4px solid #f5c518;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 15px 0 20px 0;
}

.seo-h1-title {
    font-size: 16px;
    font-weight: 700;
    color: #f5c518;
    margin: 0;
}

.ad-slot {
    width: 100%;
    margin: 15px 0;
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ad-slot img,
.ad-slot iframe,
.ad-slot video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}

.pagination {
    margin: 35px 0;
    display: flex;
    justify-content: center;
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination .page-numbers {
    background: #1f1f1f;
    color: #ccc;
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #333;
    transition: all 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: #e50914;
    color: #fff;
    border-color: #e50914;
}

.no-results-box {
    background: #181818;
    border: 1px solid #2a2a2a;
    padding: 40px 20px;
    text-align: center;
    border-radius: 6px;
    color: #aaa;
}

/* =================================================================
   7. FOOTER
   ================================================================= */
.site-footer {
    background: #0f0f0f;
    border-top: 2px solid #222;
    margin-top: 50px;
    padding: 40px 0 20px;
    color: #999;
    font-size: 14px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #1f1f1f;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 22px;
}

.footer-logo img {
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.footer-seo-desc {
    line-height: 1.6;
    color: #aaa;
    margin-bottom: 12px;
}

.footer-contact {
    color: #f5c518;
    font-size: 13px;
}

.footer-heading {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-left: 3px solid #e50914;
    padding-left: 10px;
}

.footer-cat-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0;
    margin: 0;
}

.footer-cat-list li a {
    color: #aaa;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-cat-list li a:hover {
    color: #e50914;
}

.disclaimer-text {
    font-size: 13px;
    line-height: 1.6;
    color: #777;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    font-size: 13px;
    color: #666;
}

.back-to-top {
    background: #1f1f1f;
    color: #ccc;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    border: 1px solid #333;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.back-to-top:hover {
    background: #e50914;
    color: #fff;
    border-color: #e50914;
}

/* =================================================================
   8. RESPONSIVE (MOBILE DEVICES)
   ================================================================= */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
    }

    .site-branding {
        text-align: center;
    }

    .search-field {
        width: 100%;
        min-width: 0;
    }

    /* Menu thể loại trượt ngang mượt trên điện thoại */
    .nav-menu {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px 12px;
        scrollbar-width: none;
    }

    /* Lưới phim chia 2 cột cân đối */
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .movie-title {
        font-size: 13px;
    }

    .movie-badge {
        font-size: 10px;
        padding: 2px 5px;
    }

    .section-title {
        font-size: 16px;
    }

    .movie-detail-box {
        flex-direction: column;
    }

    .detail-poster {
        width: 160px;
        margin: 0 auto;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}