/*
Theme Name: Giao Dien 14
Theme URI: https://example.com
Author: Developer
Description: Dark theme with gradient accents for video streaming site
Version: 1.0.0
Text Domain: giaodien14
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* CSS Variables */
:root {
    --g14-accent-start: #66b3ea69;
    --g14-accent-end: #a24b4b;
    --g14-bg-primary: #222222;
    --g14-bg-secondary: #181818;
    --g14-bg-tertiary: #2a2a2a;
    --g14-text-primary: #ffffff;
    --g14-text-secondary: #ccc;
    --g14-text-muted: #aaa;
    --g14-border: #444;
    --g14-spacing-sm: 8px;
    --g14-spacing-md: 15px;
    --g14-spacing-lg: 20px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #222222;
    color: #ffffff;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Visually hidden - for SEO h1 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header */
.header {
    background-color: #222222;
    padding: 15px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.3s;
}


.logo-text {
    color: #fff;
}

.logo-number {
    background: linear-gradient(135deg, #66b3ea69 0%, #a24b4b 100%);
    color: #fff;
    padding: 2px 8px;
    margin: 0 2px;
    border-radius: 4px;
}

.logo-domain {
    color: #fff;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-form {
    position: relative;
    display: flex;
    width: 100%;
}

.search-input {
    width: 300px;
    padding: 10px 120px 10px 15px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
}

.search-input::placeholder {
    color: #aaa;
}

.search-btn {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 20px;
    background-color: #444;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.search-btn:hover {
    background-color: #555;
}

/* Navigation */
.navbar {
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

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

.nav-list li {
    display: inline-block;
}

.nav-list a {
    color: #ccc;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    font-weight: bold;
}

.nav-list a:hover {
    color: #fff;
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--g14-bg-tertiary, #2a2a2a);
    border: 1px solid var(--g14-border, #444);
    border-radius: 4px;
    padding: 10px 16px;
    color: var(--g14-text-primary, #fff);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    width: 100%;
    justify-content: center;
}

.menu-toggle:hover {
    background: var(--g14-bg-secondary, #181818);
}

.menu-toggle svg {
    flex-shrink: 0;
}

/* Banner quảng cáo */
.ad-banner {
    background-color: #181818;
    height: 100px;
    margin: 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 2px dashed #444;
    color: #666;
    font-size: 18px;
}

/* Main Layout */
.main {
    padding: 20px 0 0;
}

.main-wrapper {
    display: flex;
    gap: 20px;
}

.content {
    flex: 2.5;
}

.sidebar {
    flex: 1;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

/* Movie Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 30px;
}

.movie-item {
    transition: transform 0.3s;
}

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

.movie-card {
    display: block;
    border: 1px solid #272727;
    background: #181818;
    padding: 9px;
    padding-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
}

.movie-poster {
    position: relative;
    background-color: #2a2a2a;
    aspect-ratio: var(--fv-thumb-aspect-ratio, 16/9);
}

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

.movie-badge {
    position: absolute;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    z-index: 2;
}

.movie-info {
    padding: 3px;
}

.movie-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    margin: 8px 0 0 0;
    padding-left: 8px;
    line-height: 1.3;
    text-decoration: none;
    transition: color 0.3s;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-title:hover {
    color: #66b3ea;
}

.movie-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.views,
.likes {
    color: #aaa;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.page-btn {
    padding: 8px 14px;
    background-color: #181818;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover {
    background-color: #2a2a2a;
}

.page-btn.active {
    background: linear-gradient(135deg, #66b3ea69 0%, #a24b4b 100%);
    color: white;
}

/* Sidebar */
.sidebar-tags {
    background-color: #181818;
    padding: 20px;
    border-radius: 8px;
}

.sidebar-backlinks {
    margin-top: 15px;
}

.sidebar-tags h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #fff;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    background-color: #2a2a2a;
    color: #aaa;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s;
}

.tag:hover {
    color: #fff;
}

/* Video Player Page Styles */
.player-wrapper {
    background-color: #181818;
    padding: 20px;
    border-radius: 8px;
}

.movie-title-main {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin: 0 10px 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-player {
    position: relative;
    margin-bottom: 20px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: var(--fv-thumb-aspect-ratio, 16/9);
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-player .player-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-player video {
    width: 100%;
    height: auto;
    display: block;
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.server-buttons {
    display: flex;
    gap: 10px;
}

.server-btn {
    padding: 8px 16px;
    background-color: #2a2a2a;
    color: #ccc;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.server-btn:hover {
    background-color: #333;
}

.server-btn.active {
    background: linear-gradient(135deg, #66b3ea69 0%, #a24b4b 100%);
    color: white;
    border-color: transparent;
}

.movie-engagement {
    display: flex;
    gap: 10px;
    font-size: 14px;
}

.movie-engagement .views-btn,
.movie-engagement .like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.movie-engagement .views-btn {
    color: #66b3ea;
    cursor: default;
    border-color: #66b3ea;
}

.movie-engagement .views-btn .view-number {
    color: #66b3ea;
    font-weight: 600;
}

.movie-engagement .like-btn {
    color: #aaa;
    cursor: pointer;
}

.movie-engagement .like-btn:hover {
    background-color: #333;
    color: #ff6b6b;
}

.movie-description {
    margin-bottom: 25px;
}

.movie-description h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
}

.movie-description p {
    color: #ccc;
    line-height: 1.6;
    font-size: 15px;
}

.movie-description a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

/* Video Categories */
.movie-categories {
    margin-bottom: 25px;
}

.movie-categories h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, #66b3ea69 0%, #a24b4b 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.category-tag:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.movie-keywords h3 {
    font-size: 18px;
    color: #fff;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px;
}

.keyword {
    font-size: 14px;
    color: #fff;
    transition: all 0.3s;
    border: 1px solid white;
    padding: 4px 8px;
    border-radius: 4px;

}

.keyword:hover {
    color: #fff;
    border-bottom: 1px solid;
    border-image: linear-gradient(135deg, #66b3ea, #a24b4b) 1;
}

.keyword-separator {
    color: #fff;
    font-size: 28px;
}

.related-wrapper {
    max-width: 1000px;
    margin: 15px 0;
    background-color: #181818;
    padding: 15px;
    border-radius: 8px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;

}

.load-more-container {
    display: flex;
    justify-content: center;
    margin: 20px;
}

.load-more-btn {
    padding: 12px 30px;
    background-color: #2a2a2a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: linear-gradient(135deg, #66b3ea69 0%, #a24b4b 100%);
    border-color: transparent;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: #181818;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid #333;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    text-decoration: none;
    transition: opacity 0.3s;
}


.copyright {
    color: #888;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {

    /* Header relative để chứa menu-toggle absolute */
    .header .container {
        position: relative;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .search-container {
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    /* Navbar không có padding, chỉ chứa nav-list */
    .navbar {
        padding: 0;
        border-bottom: none;
    }

    .navbar .container {
        padding-top: 0;
    }

    /* Menu Toggle - position absolute ở góc phải header */
    .menu-toggle {
        display: flex;
        width: fit-content;
        margin: 0;
        position: absolute;
        top: 15px;
        right: 15px;
    }

    /* Nav List - hidden by default on mobile, show when active */
    .nav-list {
        display: none;
        gap: 10px;
        margin-top: 10px;
    }

    .nav-list.active {
        display: flex;
        flex-wrap: wrap;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .related-wrapper {
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .search-container {
        width: 100%;
        max-width: none;
    }

    .search-input {
        width: 100%;
    }

    .movie-grid {
        grid-template-columns: 1fr;
    }

    .movie-title-main {
        font-size: 22px;
    }

    .player-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .movie-engagement {
        width: 100%;
        justify-content: space-between;
    }

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

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--g14-bg-tertiary, #2a2a2a);
    border: 1px solid var(--g14-border, #444);
    border-radius: 4px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--g14-text-secondary, #ccc);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: var(--g14-bg-secondary, #181818);
    color: var(--g14-text-primary, #fff);
}

.autocomplete-item svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* Time Filter Buttons */
.time-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.time-btn {
    padding: 8px 16px;
    background: var(--g14-bg-tertiary, #2a2a2a);
    color: var(--g14-text-secondary, #ccc);
    border: 1px solid var(--g14-border, #444);
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.time-btn:hover {
    background: var(--g14-bg-secondary, #181818);
    color: var(--g14-text-primary, #fff);
}

.time-btn.active {
    background: linear-gradient(135deg, var(--g14-accent-start, #66b3ea69) 0%, var(--g14-accent-end, #a24b4b) 100%);
    color: white;
    border-color: transparent;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 0;
    font-size: 14px;
    color: var(--g14-text-muted, #aaa);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--g14-text-secondary, #ccc);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--g14-text-primary, #fff);
}

.breadcrumb svg {
    opacity: 0.5;
}



/* No Data State */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--g14-text-secondary, #ccc);
}

.no-data svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

/* 404 Page */
.error-main {
    padding: 60px 0;
}

.error-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.error-number {
    font-size: clamp(4rem, 15vw, 8rem);
    font-weight: bold;
    color: #fff;
    margin: 0;
    line-height: 1;
}

.error-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #fff;
    margin: 20px 0;
    font-weight: bold;
}

.error-description {
    color: #ccc;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 40px 0;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.error-btn {
    padding: 10px 20px;
    background-color: #444;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.error-btn:hover {
    background-color: #555;
}

.error-btn-primary {
    background-color: #2a2a2a;
}

.error-btn-primary:hover {
    background-color: #333;
}

/* Like Button */
.like-btn {
    background: none;
    border: 1px solid var(--g14-border, #444);
    border-radius: 4px;
    padding: 6px 12px;
    color: var(--g14-text-muted, #aaa);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.like-btn:hover {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.like-btn.liked {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.like-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}