/* ============================================
   VLXX.COM - Main Stylesheet
   Clone giao diện gốc: dark theme, sát lề, grid chặt
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #1c1c1c;
    color: #d0d0d0;
    line-height: 1.4;
    min-height: 100vh;
}

a {
    color: #d0d0d0;
    text-decoration: none;
}

a:hover {
    color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === Container === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

/* === Header === */
.site-header {
    background: #111;
    padding: 12px 0 8px;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: #cc0000 !important;
    letter-spacing: 2px;
    font-style: italic;
    text-transform: uppercase;
    font-family: 'Times New Roman', serif;
}

.logo:hover {
    color: #e60000 !important;
}

/* === Navigation — 1 dòng, compact === */
.site-nav {
    background: #1c1c1c;
    padding: 6px 0 0;
}

.nav-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    color: #ccc;
    font-size: 13px;
    font-weight: 400;
    border: 1px solid #444;
    border-radius: 3px;
    margin-right: 4px;
    margin-bottom: 4px;
    background: transparent;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-link:hover {
    color: #fff;
    background: #333;
}

.nav-link.active {
    background: #cc0000;
    border-color: #cc0000;
    color: #fff;
}

.nav-icon {
    font-size: 12px;
}

.nav-row-2 {
    margin-bottom: 0;
}

/* === Search Bar Section — PHIM SEX MỚI + search trên 1 dòng === */
.search-bar-section {
    background: #1c1c1c;
    padding: 8px 0 4px;
}

.search-bar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: #d0d0d0;
    text-transform: uppercase;
    word-break: break-word;
    line-height: 1.4;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 350px;
    width: 100%;
}

.search-input-wrap {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #777;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 6px 10px 6px 28px;
    background: #2a2a2a;
    border: 1px solid #555;
    border-right: none;
    border-radius: 3px 0 0 3px;
    color: #d0d0d0;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.search-input:focus {
    border-color: #888;
}

.search-input::placeholder {
    color: #666;
    font-size: 12px;
}

.search-btn {
    padding: 6px 14px;
    background: #cc0000;
    color: #fff;
    border: 1px solid #cc0000;
    border-radius: 0 3px 3px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.search-btn:hover {
    background: #e60000;
}

/* === Movie Grid — 5 cột, gap nhỏ, sát nhau === */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 4px 0;
}

.movie-card {
    position: relative;
    overflow: hidden;
}

.movie-card a {
    display: block;
    color: inherit;
}

.movie-thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 68%; /* tỉ lệ khớp giao diện gốc */
    overflow: hidden;
    background: #2a2a2a;
}

.movie-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.movie-card:hover .movie-thumb {
    transform: scale(1.04);
}

/* Quality Badge */
.quality-badge {
    position: absolute;
    top: 8px;
    left: 0;
    padding: 3px 7px 3px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    z-index: 2;
    background: rgba(0, 0, 0, 0.7);
    border-left: 3px solid #ff3333;
    border-radius: 0 4px 4px 0;
    letter-spacing: 0.3px;
}

/* Movie title */
.movie-title {
    padding: 6px 2px 10px;
    font-size: 13px;
    color: #bbb;
    line-height: 1.35;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card:hover .movie-title {
    color: #fff;
}

/* === Video Player Page === */
.player-container {
    width: 100%;
    background: #000;
    margin-bottom: 5px;
}

.player-iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

/* Source Tabs */
.source-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
}

.source-tab {
    display: inline-block;
    padding: 5px 12px;
    background: #333;
    color: #ccc;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.source-tab:hover {
    background: #444;
    color: #fff;
}

.source-tab.active {
    background: #cc0000;
    border-color: #cc0000;
    color: #fff;
}

/* Video Stats */
.video-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding: 6px 0;
    color: #999;
    font-size: 13px;
    border-bottom: 1px solid #333;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 3px;
}

.stat-like { color: #4CAF50; }
.stat-dislike { color: #f44336; }
.stat-heart { color: #e91e63; }
.stat-views { color: #999; }

/* Video Info */
.video-info {
    padding: 10px 0;
}

.video-code {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
    word-break: break-all;
}

.video-code a {
    color: #cc0000;
}

.video-description {
    font-size: 13px;
    color: #bbb;
    line-height: 1.65;
    margin: 10px 0;
}

.video-actors {
    margin: 8px 0;
    padding: 6px 0;
    border-top: 1px solid #2a2a2a;
}

.actor-name {
    display: inline-block;
    padding: 3px 10px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 2px;
    color: #ccc;
    font-size: 13px;
    margin: 2px;
}

.actor-name:hover {
    background: #3a3a3a;
    color: #fff;
}

/* Genre Tags */
.genre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px 0;
}

.genre-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 2px;
    color: #ccc;
    font-size: 13px;
}

.genre-tag:hover {
    background: #3a3a3a;
    color: #fff;
}

.genre-tag-icon {
    color: #888;
    font-size: 11px;
}

/* Related Movies Section */
.related-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #333;
}

.related-title {
    font-size: 14px;
    font-weight: 600;
    color: #d0d0d0;
    margin-bottom: 8px;
}

/* === Pagination === */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 20px 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 34px;
    padding: 0 8px;
    background: transparent;
    border: 1px solid #555;
    border-radius: 3px;
    color: #ccc;
    font-size: 13px;
    font-weight: 500;
}

.page-link:hover {
    background: #333;
    color: #fff;
}

.page-link.active {
    background: #cc0000;
    border-color: #cc0000;
    color: #fff;
}

.page-dots {
    color: #666;
    padding: 0 3px;
}

/* === Footer === */
.site-footer {
    background: #141414;
    border-top: 1px solid #2a2a2a;
    padding: 20px 0 15px;
    margin-top: 20px;
}

.top-search {
    margin-bottom: 15px;
}

.top-search-title {
    font-size: 14px;
    font-weight: 700;
    color: #d0d0d0;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.keyword-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 2px;
    color: #aaa;
    font-size: 12px;
}

.keyword-tag:hover {
    background: #3a3a3a;
    color: #fff;
}

.disclaimer {
    margin: 15px 0;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
}

.disclaimer p {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 3px;
}

.text-red {
    color: #cc0000 !important;
}

.text-red:hover {
    color: #ff2222 !important;
}

.copyright {
    padding-top: 10px;
    border-top: 1px solid #2a2a2a;
}

.copyright p {
    font-size: 12px;
    color: #555;
}

/* === Empty / 404 === */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #666;
}

.empty-state h2 {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: #555;
}

.page-404 {
    text-align: center;
    padding: 60px 20px;
}

.page-404 h1 {
    font-size: 3.5rem;
    color: #cc0000;
    margin-bottom: 8px;
}

.page-404 p {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.page-404 a {
    display: inline-block;
    padding: 8px 20px;
    background: #cc0000;
    color: #fff;
    border-radius: 3px;
    font-weight: 600;
}

.page-404 a:hover {
    background: #e60000;
    color: #fff;
}

/* ============================================
   RESPONSIVE — Tablet
   ============================================ */
@media (max-width: 1100px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 6px;
    }

    .site-header {
        padding: 8px 0 6px;
    }

    .logo {
        font-size: 1.6rem;
    }

    .nav-link {
        padding: 5px 8px;
        font-size: 12px;
    }

    .search-bar-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .search-form {
        max-width: 100%;
    }

    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .movie-title {
        font-size: 12px;
        padding: 4px 2px 8px;
    }

    .video-stats {
        flex-wrap: wrap;
        justify-content: center;
        font-size: 12px;
        gap: 8px;
    }

    .pagination {
        gap: 3px;
    }

    .page-link {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .keyword-tag {
        font-size: 11px;
        padding: 3px 7px;
    }
}

@media (max-width: 400px) {
    .logo {
        font-size: 1.3rem;
    }

    .nav-link {
        padding: 4px 6px;
        font-size: 11px;
    }
}
