/*
Theme Name: 15. Carbon Slate
Tested up to: 6.5
License: GPL v2 or later
Requires at least: 5.9
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Requires PHP: 7.4
Author: ThemeForge Studio
Version: 1.0.2
Description: Industrial strength meets refined design. Carbon-toned neutrals for professional, no-nonsense video platforms.
Author URI: https://themeforge.dev
Tags: video, gray, industrial, professional, neutral
*/

/* Reset và base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* Autocomplete Dropdown Styles */
.search-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #444;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

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

/* Custom scrollbar for autocomplete */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 107, 0.3);
    border-radius: 3px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 107, 0.5);
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
    /* Button reset styles */
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    font-family: inherit;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: rgba(255, 107, 107, 0.2);
}

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

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

.time-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.time-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
}

.time-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 h1 {
    font-size: 120px;
    color: #ff6b6b;
    margin-bottom: 20px;
    line-height: 1;
}

.error-404 p {
    color: #ccc;
    margin-bottom: 30px;
    font-size: 18px;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #1b1b1b;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 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 Styles */
.header {
    padding: 20px 0;
}

.logo-section {
    text-align: left;
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 2.5rem;
    color: #ff6b6b;
    margin-bottom: 5px;
    border-bottom: 1px solid #333;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.logo a:hover h1 {
    color: #ee5a24;
}

.logo p {
    color: #ccc;
    font-size: 0.9rem;
    max-width: 400px;
}

.search-section {
    margin-top: 15px;
    width: 100%;
}

.search-wrapper {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: none;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #444;
    border-radius: 10px 0 0 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    border-right: none;
}

.search-input:focus {
    border-color: #ff6b6b;
    background: rgba(255, 255, 255, 0.15);
}

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

.search-btn {
    padding: 12px 20px;
    background: #ff6b6b;
    border: 2px solid #ff6b6b;
    border-radius: 0px 10px 10px 0px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

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

/* Genres Navigation */
.genres-nav {
    margin-bottom: 20px;
}

.genres-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
}

.genre-link {
    display: block;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.genre-link:hover,
.genre-link.active {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
}

/* Studios Navigation */
.studios-nav {
    margin-bottom: 15px;
}

.studios-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.studio-btn {
    display: block;
    padding: 10px 20px;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.studio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* VPN Notice */
.vpn-notice {
    margin-bottom: 15px;
    padding: 12px 16px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    text-align: center;
}

.vpn-notice p {
    margin: 0;
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
}

.vpn-link {
    color: #ff4757;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.vpn-link:hover {
    color: #ff3742;
    text-decoration: underline;
}

.download-link {
    color: #ffc107;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.download-link:hover {
    color: #ffb300;
    text-decoration: underline;
}

.vlxx-text {
    color: #ff4757;
    font-weight: bold;
}

/* Main Content */
.main-content {
    padding-bottom: 40px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* Content Header */
.content-header {
    margin-bottom: 30px;
}

.content-header h2 {
    color: #ff6b6b;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    text-align: left;
}

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}


.movie-poster {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: var(--fv-thumb-aspect-ratio, 4/3);
    overflow: hidden;
    border-radius: 10px;
    text-decoration: none;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vietsub-badge {
    font-size: 10px;
    position: absolute;
    top: 0;
    left: 0;
    border-left: 3px solid #ea4335;
    border-radius: 0 4px 4px 0;
    background: none repeat scroll 0 0 rgba(17, 17, 17, 0.6);
    padding: 2px 4px;
    margin-top: 2px;
    margin-left: 7px;
    color: #fff;
    z-index: 10;
}

.movie-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    margin: 5px 5px 20px 5px;
    line-height: 1.4;
    transition: color 0.3s ease;
    text-align: center;
}

.movie-title:hover {
    color: #ff6b6b;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    line-height: 1;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
}

.pagination-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-dots {
    color: #aaa;
    padding: 0 10px;
}

/* Footer */
.footer {
    padding: 20px 0 20px;
    border-top: 1px solid #333;
}

.keywords-section {
    margin-bottom: 30px;
}

.keywords-section h3 {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 20px;
}

.keywords-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.keyword-tag {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.keyword-tag:hover {
    background: rgba(255, 107, 107, 0.2);
    color: white;
    border-color: #ff6b6b;
}

.copyright {
    text-align: center;
    color: #888;
    font-size: 14px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.copyright p {
    margin-bottom: 5px;
}

/* Responsive Design */

/* Tablet - 3 cột (max-width: 768px) */
@media (max-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .search-section {
        width: 100%;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .genres-list {
        justify-content: left;
    }

    .container {
        padding: 0 15px;
    }

    .main-content {
        padding: 30px 0;

    }
}

/* Mobile - 2 cột (max-width: 425px) */
@media (max-width: 425px) {
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .logo p {
        font-size: 0.85rem;
    }

    .search-input {
        padding: 10px 14px;
        font-size: 14px;
    }

    .search-btn {
        padding: 10px 16px;
        font-size: 16px;
    }


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


    .pagination-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .keyword-tag {
        padding: 5px 10px;
        font-size: 12px;
    }

    .container {
        padding: 0 10px;
    }

    .main-content {
        padding: 20px 0;
    }

    .footer {
        padding: 30px 0 15px;
    }
}

/* Extra small screens */
@media (max-width: 320px) {
    .movie-title {
        font-size: 13px;
    }

    .pagination {
        gap: 5px;
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Video Page Styles */
.video-section {
    margin-bottom: 15px;
}

.movie-title-main {
    color: #fff;
    font-size: 20px;
    margin-bottom: 15px;
    text-align: left;
}

.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

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

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

/* Video Controls */
.video-controls {
    margin-bottom: 15px;
}

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

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

.server-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #444;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.server-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
}

.server-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
}

.stats-buttons {
    display: flex;
    gap: 4px;
}

.stat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.stat-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #555;
}

.stat-btn .icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stat-btn .icon svg {
    stroke: currentColor;
}

.stat-btn .count {
    font-weight: 500;
}

/* Liked state - nút like chuyển màu đỏ khi đã like */
.stat-btn.liked {
    color: #ff6b6b;
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

.stat-btn.liked .icon svg {
    stroke: #ff6b6b;
    fill: #ff6b6b;
}

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

.movie-info-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.info-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid #333;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.info-btn:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: #ff6b6b;
}

.info-btn .label {
    color: #ccc;
}

.info-btn .value {
    font-weight: 500;
}

/* Movie Description */
.movie-description {
    margin-bottom: 15px;
}

.description-content p {
    color: #ddd;
    line-height: 1.7;
    font-size: 16px;
}

/* Fix nolink color - should match description text */
.description-content strong {
    color: inherit;
    font-weight: 600;
}

.description-content a {
    color: #ddd;
    transition: color 0.3s ease;
}

.description-content a:hover {
    color: #ff6b6b;
}

/* Cast Section */
.cast-section {
    margin-bottom: 15px;
}

.cast-toggle {
    display: inline-flex;
    font-size: 14px;
    padding: 5px;
    margin-top: 5px;
    white-space: nowrap;
    background: #2b2b2b;
    border-radius: 0 4px 4px 0;
    border-left: 3px solid #ff9900;
}

/* Movie Genres/Categories */
.movie-genres {
    margin-bottom: 15px;
}

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

.movie-genres .genre-link {
    padding: 6px 14px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.movie-genres .genre-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* Movie Keywords */
.movie-keywords {
    margin-bottom: 10px;
}

.movie-keywords h3 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.movie-keywords .keyword {
    padding: 6px 12px;
    background: rgba(255, 107, 107, 0.15);
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
}

.movie-keywords .keyword:hover {
    background: rgba(255, 107, 107, 0.25);
    border-color: #ff6b6b;
}

/* Related Movies */
.related-movies {
    margin-bottom: 40px;
}

.related-movies h3 {
    color: #ff6b6b;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

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


    .cast-list {
        justify-content: center;
    }


    .video-player {
        min-height: 250px;
    }
}

@media (max-width: 425px) {

    .stats-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }

    .stat-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .info-btn {
        justify-content: center;
    }



    .movie-description h2 {
        font-size: 20px;
    }

    .video-player {
        min-height: 200px;
    }
}

/* Load More Button */
.load-more-wrap {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn svg {
    transition: transform 0.3s ease;
}

.load-more-btn:hover svg {
    transform: translateY(2px);
}