/*
 * Vung Theme - Modern Cinema UI
 * Visual refresh only. Existing PHP/HTML structure and functionality are preserved.
 */

:root {
    --bg: #07090f;
    --bg-soft: #0d111b;
    --surface: #111724;
    --surface-2: #161e2e;
    --surface-3: #1c2638;
    --text: #f7f8fb;
    --muted: #98a2b3;
    --muted-2: #c0c7d2;
    --primary: #e50914;
    --primary-hover: #ff2632;
    --accent: #f4b400;
    --success: #22c55e;
    --border: rgba(255, 255, 255, .08);
    --shadow: 0 18px 45px rgba(0, 0, 0, .35);
    --radius: 14px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.body-page {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(229, 9, 20, .12), transparent 28%),
        radial-gradient(circle at 90% 18%, rgba(45, 76, 135, .13), transparent 30%),
        var(--bg);
    font-family: "Roboto Condensed", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.body-page a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

body.body-page img { max-width: 100%; }

body.body-page ::selection {
    color: #fff;
    background: var(--primary);
}

/* Header */
.navbar.navbar-default {
    position: sticky;
    top: 0;
    z-index: 999;
    min-height: 70px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: rgba(7, 9, 15, .9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .24);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.navbar-top {
    width: min(1440px, calc(100% - 32px));
    min-height: 70px;
    margin: 0 auto;
    padding: 0;
}

.navbar-default .navbar-brand {
    display: flex;
    align-items: center;
    height: 70px;
    padding: 10px 24px 10px 0;
}

.navbar-default .navbar-brand img {
    width: auto !important;
    max-width: 158px;
    max-height: 46px;
    padding: 0 !important;
    object-fit: contain;
}

.navbar-default .navbar-nav > li > a {
    display: flex;
    align-items: center;
    min-height: 70px;
    padding: 0 14px;
    color: #d8dde7;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;
    text-transform: none;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
    color: #fff;
    background: rgba(255, 255, 255, .04);
}

.navbar-default .navbar-nav > li > a::after {
    position: absolute;
    right: 14px;
    bottom: 14px;
    left: 14px;
    height: 2px;
    content: "";
    background: var(--primary);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.navbar-default .navbar-nav > li > a:hover::after,
.navbar-default .navbar-nav > .open > a::after { transform: scaleX(1); }

.navbar-default .dropdown-menu {
    min-width: 210px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(17, 23, 36, .98);
    box-shadow: var(--shadow);
}

.navbar-default .dropdown-menu > li > a {
    padding: 10px 12px;
    color: #d8dde7;
    border-radius: 8px;
}

.navbar-default .dropdown-menu > li > a:hover,
.navbar-default .dropdown-menu > li > a:focus {
    color: #fff;
    background: rgba(229, 9, 20, .15);
}

.navbar-form {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 70px;
    margin: 0;
    padding: 0;
}

.navbar-form .form-group { display: block; }

.navbar-form .form-control {
    width: 245px;
    height: 42px;
    padding: 9px 46px 9px 16px;
    color: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    outline: 0;
    background: rgba(255, 255, 255, .055);
    box-shadow: none;
}

.navbar-form .form-control::placeholder { color: #8993a4; }

.navbar-form .form-control:focus {
    border-color: rgba(229, 9, 20, .7);
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 0 0 4px rgba(229, 9, 20, .11);
}

.navbar-form .btn {
    position: absolute;
    right: 4px;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #fff;
    border: 0;
    border-radius: 50%;
    background: var(--primary);
}

.navbar-form .btn:hover { background: var(--primary-hover); }

.navbar-default .navbar-toggle {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}
.navbar-default .navbar-toggle .icon-bar { background: #fff; }
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus { background: var(--surface-2); }

/* Main layout */
.container.khoi-body {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
    padding: 26px 0 50px;
}

.khoi-trai { padding-right: 22px; }
.khoi-phai { padding-left: 4px; }

/* Section heading */
.group-film {
    position: relative;
    clear: both;
    margin-bottom: 34px;
}

.group-film > h2,
.group-film > h1,
.group-film-category > h1 {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    padding: 0 0 11px;
    color: #fff;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: .25px;
    line-height: 1.25;
    text-transform: none;
}

.group-film > h2::after,
.group-film > h1::after,
.group-film-category > h1::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 54px;
    height: 3px;
    content: "";
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), #ff626b);
}

.group-film > h2 a:hover { color: var(--primary-hover); }
.group-film h1 i, .group-film h2 i { color: var(--primary); font-size: 16px; }
.group-film .line-ngang { display: none; }

/* Movie grid */
.group-film-small.row,
.group-film-small {
    margin-right: -8px;
    margin-left: -8px;
}

.film-small {
    display: block;
    padding: 0 8px;
    margin-bottom: 22px;
}

.poster-film-small {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 2 / 3;
    height: auto !important;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--surface);
    background-position: center;
    background-size: cover;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
    transform: translateZ(0);
}

.poster-film-small::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(180deg, transparent 48%, rgba(3, 5, 10, .32) 72%, rgba(3, 5, 10, .9) 100%);
    opacity: .75;
    transition: opacity .25s ease;
}

.film-small:hover .poster-film-small {
    border-color: rgba(255, 255, 255, .18);
    box-shadow: 0 18px 34px rgba(0, 0, 0, .42);
    transform: translateY(-5px);
}

.film-small:hover .poster-film-small::before { opacity: 1; }

.poster-film-small .play,
.phimdecu-slider .play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 56px;
    height: 56px;
    margin: -28px 0 0 -28px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    background: rgba(229, 9, 20, .88) url('../img/play.png') center / 18px auto no-repeat;
    box-shadow: 0 10px 28px rgba(229, 9, 20, .35);
    opacity: 0;
    transform: scale(.78);
    transition: opacity .22s ease, transform .22s ease, background-color .22s ease;
}

.film-small:hover .play,
.phimdecu-slider .item:hover .play { opacity: 1; transform: scale(1); }

.poster-film-small .sotap,
.phimdecu-slider .sotap {
    position: absolute;
    right: 9px;
    bottom: 9px;
    z-index: 3;
    max-width: calc(100% - 18px);
    padding: 5px 8px;
    overflow: hidden;
    color: #fff;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 7px;
    background: rgba(7, 9, 15, .82);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.poster-film-small .tag-film,
.phimdecu-slider .tag-film {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 3;
    margin: 0;
    padding: 0;
    list-style: none;
}

.poster-film-small .tag-film .hd,
.phimdecu-slider .tag-film .hd {
    padding: 5px 8px;
    color: #fff;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--primary), #ff4e58);
    box-shadow: 0 6px 16px rgba(229, 9, 20, .28);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.title-film-small { padding: 11px 3px 0; }

.title-film-small .title-film {
    display: block;
    overflow: hidden;
    color: #f7f8fb;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.film-small:hover .title-film-small .title-film { color: var(--primary-hover); }

.title-film-small p {
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Featured slider */
.phimdecu-slider { margin: 0 -6px; }
.phimdecu-slider .item { padding: 0 6px; }
.phimdecu-slider .item > a {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 360px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.phimdecu-slider .item > a::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(180deg, transparent 30%, rgba(5, 8, 14, .25) 52%, rgba(5, 8, 14, .96) 100%);
}

.phimdecu-slider .black-gradient {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    padding: 54px 18px 18px;
    background: none;
}

.phimdecu-slider .black-gradient .title-film {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 20px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phimdecu-slider .black-gradient p {
    margin: 5px 0 0;
    overflow: hidden;
    color: #c5cbd5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Breadcrumb */
.path-folder-film {
    margin-top: 0 !important;
    margin-bottom: 18px;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(17, 23, 36, .72);
}
.path-folder-film ul { margin: 0; padding: 0; }
.path-folder-film li { color: var(--muted); }
.path-folder-film a:hover { color: var(--primary-hover); }
.path-folder-film .active { color: #fff; }

/* Filter */
.locphim-category {
    margin: 0 0 22px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.form-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.form-filter li { float: none; margin: 0; }
.form-filter select,
.locphim-category select,
.locphim-category .form-control {
    min-width: 145px;
    height: 40px;
    padding: 7px 32px 7px 11px;
    color: #dbe0e9;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background-color: var(--surface-2);
    box-shadow: none;
}
.form-filter select:focus { border-color: rgba(229, 9, 20, .65); }
.submit-filter {
    height: 40px;
    padding: 0 18px;
    color: #fff;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    font-weight: 700;
}
.submit-filter:hover { background: var(--primary-hover); }

/* Search suggestions */
#result {
    top: 58px;
    right: 0;
    width: min(430px, 90vw);
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(17, 23, 36, .98);
    box-shadow: var(--shadow);
}
#rowsearch { min-height: 68px; background: transparent; border-bottom: 1px solid var(--border); }
#rowsearch:last-child { border-bottom: 0; }
#rowsearch:hover { background: rgba(229, 9, 20, .12); }
#result a { color: #fff; }
.column { padding: 8px; }
.left { width: 20%; }
.right { width: 80%; }

/* Sidebar */
.topphim-ngang,
.khoi-phai > div,
.widget {
    overflow: hidden;
    margin-bottom: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(17, 23, 36, .8);
    box-shadow: 0 12px 28px rgba(0,0,0,.18);
}

.topphim-ngang > h3,
.khoi-phai .widget-title {
    margin: 0;
    padding: 15px 16px;
    color: #fff;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(229,9,20,.16), transparent);
    font-size: 18px;
    font-weight: 700;
}

.topphim-ngang ul { margin: 0; padding: 6px 12px; }
.topphim-ngang ul li { border-bottom: 1px solid var(--border); }
.topphim-ngang ul li:last-child { border-bottom: 0; }
.topphim-ngang ul li > a {
    display: flex;
    align-items: center;
    min-height: 84px;
    padding: 10px 0;
}
.topphim-ngang .image {
    flex: 0 0 58px;
    width: 58px;
    height: 76px;
    border-radius: 8px;
    background-position: center;
    background-size: cover;
}
.topphim-ngang .info { min-width: 0; padding: 0 10px; }
.topphim-ngang .info b {
    display: block;
    overflow: hidden;
    color: #f5f7fa;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topphim-ngang .info p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.topphim-ngang .imdb {
    order: 3;
    margin-left: auto;
    padding: 5px 7px;
    color: #111;
    border-radius: 7px;
    background: var(--accent);
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
}
.topphim-ngang li:hover .info b { color: var(--primary-hover); }

/* Movie detail */
.group-detail {
    overflow: hidden;
    margin-bottom: 24px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(22, 30, 46, .96), rgba(13, 17, 27, .96));
    box-shadow: var(--shadow);
}

.big-img-film-detail {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(0,0,0,.35);
}
.big-img-film-detail::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.42));
}
.big-img-film-detail i {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    color: #fff;
    font-size: 72px;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,.5));
    transform: translate(-50%, -50%);
    transition: color .2s ease, transform .2s ease;
}
.big-img-film-detail:hover i { color: var(--primary-hover); transform: translate(-50%, -50%) scale(1.08); }

.title-film-detail-1,
.title-film-film-1 {
    margin-top: 0;
    color: #fff;
    font-size: clamp(25px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.18;
}
.title-film-detail-2,
.title-film-film-2 {
    color: var(--muted-2);
    font-size: 17px;
    font-weight: 400;
}

.play-film,
.play-trailer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    margin: 12px 8px 14px 0;
    padding: 0 17px;
    color: #fff !important;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 700;
}
.play-film { background: var(--primary); box-shadow: 0 8px 20px rgba(229,9,20,.22); }
.play-film:hover { background: var(--primary-hover); transform: translateY(-1px); }
.play-trailer { border-color: var(--border); background: var(--surface-3); }
.play-trailer:hover { border-color: rgba(255,255,255,.18); background: #263248; }

.infomation-film {
    margin: 8px 0 20px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(7, 9, 15, .3);
}
.infomation-film li {
    padding: 10px 13px;
    color: #b8c0cc;
    border-bottom: 1px solid var(--border);
}
.infomation-film li:last-child { border-bottom: 0; }
.infomation-film li.title {
    color: #fff;
    background: rgba(229,9,20,.11);
    font-size: 17px;
    font-weight: 700;
}
.infomation-film li span,
.infomation-film li a { color: #eef1f5; }
.infomation-film li a:hover { color: var(--primary-hover); }

.content-film {
    color: #c6ccd6 !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.8 !important;
}
.content-film h2, .content-film h3 { color: #fff; }

.lichchieu {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255,255,255,.035);
}

/* Watch/player area */
#player-wrapper,
.player-wrapper,
.embed-responsive,
.player-film {
    overflow: hidden;
    border-radius: 14px;
    background: #000;
    box-shadow: 0 18px 44px rgba(0,0,0,.45);
}

.episode-film { margin-top: 18px; }
.episode-film .text-success {
    display: block;
    margin: 0 0 9px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}
.episode-main ul { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; padding: 0; }
.episode-main li { margin: 0; }
.episode-main li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 36px;
    padding: 0 11px;
    color: #d5dbe5;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
}
.episode-main li a:hover,
.episode-main li a.active {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: 0 6px 16px rgba(229,9,20,.2);
}

/* Comments and modal */
.fb-comment-wrap,
.fbchat {
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}
.fb-comment-title { margin: 0 0 14px; color: #151923; }
.modal-content {
    color: #e8ebf0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.modal-header { border-bottom-color: var(--border); }
.modal-content .close { color: #fff; opacity: .8; }
.modal-content .form-control {
    color: #fff;
    border-color: var(--border);
    background: var(--surface-2);
}

/* Pagination */
.pagination > li > a,
.pagination > li > span {
    margin: 0 3px;
    color: #dbe0e9;
    border: 1px solid var(--border);
    border-radius: 8px !important;
    background: var(--surface);
}
.pagination > li > a:hover,
.pagination > .active > a,
.pagination > .active > span {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

/* Footer */
footer,
.footer,
.widget-footer {
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: #080b12;
}

/* 404 and generic content */
.khoi-trai > article,
.khoi-trai > .page-content {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

/* Responsive */
@media (max-width: 1199px) {
    .navbar-form .form-control { width: 190px; }
    .navbar-default .navbar-nav > li > a { padding-right: 10px; padding-left: 10px; font-size: 14px; }
    .khoi-trai { padding-right: 15px; }
}

@media (max-width: 991px) {
    .navbar.navbar-default { position: relative; }
    .navbar-top { width: calc(100% - 24px); }
    .navbar-collapse {
        border-top: 1px solid var(--border) !important;
        background: rgba(7,9,15,.98);
        box-shadow: none !important;
    }
    .navbar-default .navbar-nav > li > a { min-height: 46px; padding: 0 8px; }
    .navbar-default .navbar-nav > li > a::after { display: none; }
    .navbar-form { min-height: 58px; width: 100%; }
    .navbar-form .form-group { width: 100%; }
    .navbar-form .form-control { width: 100%; }
    .navbar-right { margin-right: 0; margin-left: 0; }
    .container.khoi-body { width: calc(100% - 24px); padding-top: 18px; }
    .khoi-trai, .khoi-phai { width: 100%; padding: 0; }
    .khoi-phai { margin-top: 10px; }
    .phimdecu-slider .item > a { min-height: 320px; }
}

@media (max-width: 767px) {
    .navbar-default .navbar-brand { padding-left: 4px; }
    .container.khoi-body { width: calc(100% - 20px); }
    .group-film { margin-bottom: 26px; }
    .group-film > h2, .group-film > h1, .group-film-category > h1 { font-size: 20px; }
    .film-small { padding: 0 5px; margin-bottom: 18px; }
    .group-film-small.row, .group-film-small { margin-right: -5px; margin-left: -5px; }
    .poster-film-small { border-radius: 11px; }
    .poster-film-small .play { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
    .title-film-small { padding-top: 8px; }
    .title-film-small .title-film { font-size: 14px; }
    .title-film-small p { font-size: 12px; }
    .poster-film-small .sotap { right: 6px; bottom: 6px; max-width: calc(100% - 12px); padding: 4px 6px; font-size: 10px; }
    .poster-film-small .tag-film { top: 6px; left: 6px; }
    .poster-film-small .tag-film .hd { padding: 4px 6px; font-size: 10px; }
    .phimdecu-slider .item > a { min-height: 290px; border-radius: 14px; }
    .phimdecu-slider .black-gradient { padding: 45px 14px 14px; }
    .phimdecu-slider .black-gradient .title-film { font-size: 17px; }
    .group-detail { padding: 14px; border-radius: 14px; }
    .title-film-detail-1, .title-film-film-1 { font-size: 25px; }
    .form-filter { display: grid; grid-template-columns: 1fr 1fr; }
    .form-filter li, .form-filter select, .locphim-category select, .locphim-category .form-control, .submit-filter { width: 100%; min-width: 0; }
}

@media (max-width: 479px) {
    .form-filter { grid-template-columns: 1fr; }
    .phimdecu-slider .item > a { min-height: 255px; }
    .fb-comment-wrap, .fbchat { padding: 10px; }
}
