/*
Theme Name: 10. Scarlet Vision
Requires at least: 6.0
Tags: video, red, bold, high-contrast, streaming
Author URI: https://zenithstudios.io
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Version: 2.1.0
Description: Bold scarlet red commands attention across every element. High-contrast design optimized for visual content.
Author: Zenith Studios
*/

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

:root {
    --primary-red: #dc2626;
    --dark-red: #991b1b;
    --light-red: #ef4444;
    --black: #000000;
    --dark-gray: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --dark-bg: #0f0f0f;
    --header-bg: #1a1a1a;
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --dropdown-bg: rgba(0, 0, 0, 0.3);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --shadow-heavy: rgba(0, 0, 0, 0.5);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.2);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-faded: rgba(255, 255, 255, 0.7);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--white);
    background-color: var(--dark-bg);
}

/* 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: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px var(--shadow-heavy);
    border-bottom: 1px solid var(--border-light);
}

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

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

.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 5px;
}

.menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: 0.3s;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-red);
    text-decoration: none;
    display: inline-block;
}

.logo h1 {
    font-size: inherit;
    margin: 0;
}

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

.nav-desktop {
    flex: 1;
    margin: 0 30px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
    justify-content: center;
}

.nav-list a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-list a:hover {
    color: var(--primary-red);
}

.nav-list a.active {
    color: var(--primary-red);
    position: relative;
}

.nav-list a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-red);
    border-radius: 1px;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown .arrow {
    font-size: 10px;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--header-bg);
    box-shadow: 0 4px 6px var(--shadow-heavy);
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    min-width: 400px;
    border: 1px solid var(--border-light);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.dropdown-grid a {
    color: var(--white);
    text-decoration: none;
    padding: 5px 10px;
    transition: 0.3s;
    white-space: nowrap;
}

.dropdown-grid a:hover {
    background-color: rgba(220, 38, 38, 0.2);
    color: var(--primary-red);
    border-radius: 4px;
}

/* Search bar */
.search-bar-desktop {
    display: flex;
    background-color: var(--border-light);
    width: 250px;
    border: 1px solid var(--border-medium);
    position: relative;
}

.search-bar-desktop input {
    flex: 1;
    border: none;
    padding: 8px 15px;
    background: none;
    outline: none;
    color: var(--white);
}

.search-bar-desktop input::placeholder {
    color: var(--text-muted);
}

.search-bar-desktop button {
    background: none;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    color: var(--white);
}

.search-icon-mobile {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    color: var(--white);
}

.search-bar-mobile {
    display: none;
    padding: 10px 0;
    max-height: 0;
    overflow: visible;
    transition: max-height 0.3s ease;
    position: relative;
}

.search-bar-mobile.active {
    max-height: 60px;
    display: block;
}

.search-bar-mobile input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-medium);
    background-color: var(--border-light);
    outline: none;
    color: var(--white);
}

.search-bar-mobile input::placeholder {
    color: var(--text-muted);
}

.search-bar-mobile button {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--white);
}

/* Ad area */
.ad-area {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.ad-placeholder {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 2/1;
    background-color: var(--border-light);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 3px dashed var(--border-light);
}

/* Sidebar */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-bg);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--header-bg);
    z-index: 201;
    transition: 0.3s;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.sidebar-header .logo {
    margin-bottom: 15px;
    display: block;
}

.sidebar-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 28px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.sidebar-close:hover {
    color: var(--primary-red);
}

.sidebar-search {
    background-color: var(--border-light);
    border: 1px solid var(--border-medium);
    position: relative;
}

.sidebar-search form {
    display: flex;
    align-items: center;
    width: 100%;
}

.sidebar-search input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    background: none;
    outline: none;
    color: var(--white);
    min-width: 0;
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
}

.sidebar-search button {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav>ul>li>a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid var(--border-light);
    transition: 0.3s;
}

.sidebar-nav>ul>li>a:hover {
    background-color: rgba(220, 38, 38, 0.2);
    color: var(--primary-red);
}

.sidebar-nav>ul>li>a.active {
    background-color: var(--primary-red);
    color: var(--white);
    border-left: 4px solid var(--dark-red);
}

.sidebar-dropdown .dropdown-toggle {
    position: relative;
}

.sidebar-dropdown .arrow {
    position: absolute;
    right: 20px;
    transition: 0.3s;
}

.sidebar-dropdown .dropdown-toggle.active .arrow {
    transform: rotate(180deg);
}

.sidebar-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: 0.3s;
    background-color: var(--dropdown-bg);
}

.sidebar-dropdown-menu.active {
    max-height: 448px;
    overflow-y: auto;
}

.sidebar-dropdown-menu li a {
    display: block;
    padding: 10px 20px 10px 40px;
    color: var(--white);
    text-decoration: none;
    transition: 0.3s;
}

.sidebar-dropdown-menu li a:hover {
    background-color: rgba(220, 38, 38, 0.2);
    color: var(--primary-red);
}

/* Main content */
.wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 300px);
}

/* Main header */
.main-header {
    margin-bottom: 25px;
}

.main-header h2 {
    color: var(--white);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    text-align: center;
    position: relative;
}

.main-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--dark-red));
    border-radius: 2px;
}

/* Video Meta (Categories & Keywords) */
.video-meta {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--header-bg);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.meta-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.meta-label {
    font-weight: 600;
    color: var(--primary-red);
    white-space: nowrap;
    min-width: 80px;
    padding-top: 8px;
}

.meta-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.category-btn {
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-dark);
    filter: brightness(1.1);
}

/* Keywords */
.keywords {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.keyword-btn {
    background-color: var(--dark-gray);
    color: var(--white);
    border: 1px solid var(--border-medium);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
    border-radius: 4px;
}

.keyword-btn:hover {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    transform: translateY(-2px);
}

.keyword-btn.active {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
}

/* Time filters */
.time-filters {
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

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

.movie-card {
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.movie-poster {
    position: relative;
    width: 100%;
    aspect-ratio: var(--fv-thumb-aspect-ratio, 16/9);
    overflow: hidden;
    margin-bottom: 10px;
}

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

.badge-ribbon {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 75px;
    height: 75px;
    overflow: hidden;
}

.badge-ribbon span {
    position: absolute;
    display: block;
    width: 100px;
    background-color: var(--primary-red);
    box-shadow: 0 2px 4px var(--shadow-dark);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    transform: rotate(45deg);
    top: 15px;
    right: -30px;
}

.badge-ribbon::before {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    z-index: -1;
    border-left: 3px solid var(--dark-red);
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-top: 3px solid var(--dark-red);
}

.badge-ribbon::after {
    content: '';
    position: absolute;
    right: 0;
    top: 100%;
    z-index: -1;
    border-left: 3px solid transparent;
    border-right: 3px solid var(--dark-red);
    border-bottom: 3px solid transparent;
    border-top: 3px solid var(--dark-red);
}

.movie-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

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

.page-btn {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 8px 12px;
    min-width: 35px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.page-btn:hover {
    background-color: var(--dark-red);
    color: var(--white);
}

.page-btn.active {
    background-color: var(--dark-red);
    color: var(--white);
}

.dots {
    padding: 0 10px;
    color: var(--gray);
}

/* Footer */
.footer {
    background-color: var(--header-bg);
    color: var(--white);
    padding: 30px 0 20px;
}

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

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
}

.footer-nav a {
    color: var(--white);
    text-decoration: none;
    transition: 0.3s;
}

.footer-nav a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    gap: 4rem;
}

.footer-bottom .logo {
    font-size: 20px;
    display: inline-block;
}

.copyright {
    font-size: 14px;
    color: var(--text-faded);
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px var(--shadow-light);
    transition: 0.3s;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--dark-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 8px var(--shadow-medium);
}

/* Video player */
.video-section {
    margin-bottom: 30px;
}

.video-container {
    position: relative;
    aspect-ratio: var(--fv-thumb-aspect-ratio, 16/9);
    background-color: var(--black);
    overflow: hidden;
    max-width: 900px;
    margin: 20px auto;
}

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

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

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.server-btn {
    background-color: var(--dark-gray);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.server-btn:hover {
    background-color: var(--primary-red);
}

.server-btn.active {
    background-color: var(--primary-red);
}

.video-stats {
    display: flex;
    gap: 15px;
    align-items: center;
}

.like-btn,
.view-count {
    background-color: var(--dark-gray);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.like-btn:hover,
.view-count:hover {
    background-color: var(--primary-red);
}

.like-btn.active,
.like-btn.liked {
    background-color: var(--primary-red);
    color: var(--white);
}

.like-btn.active svg,
.like-btn.liked svg {
    fill: var(--white);
}

.view-count {
    cursor: default;
}

/* Video description */
.video-description {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--header-bg);
    border-radius: 8px;
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 14px;
}

.video-description p {
    margin: 0;
}

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

.video-description a:hover {
    text-decoration: underline;
}

/* Load more button */
.load-more {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.load-more-btn {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: 0.3s;
}

.load-more-btn:hover {
    background-color: var(--dark-red);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .header-main {
        position: relative;
    }

    .menu-btn {
        display: flex;
    }

    .header-main .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-desktop,
    .search-bar-desktop {
        display: none;
    }

    .search-icon-mobile {
        display: block;
    }

    .search-bar-mobile {
        display: none;
        position: relative;
    }

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

@media (max-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .dropdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wrapper {
        padding: 30px 15px;
    }
}

@media (max-width: 480px) {
    .keywords {
        justify-content: center;
    }

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

    .pagination {
        flex-wrap: wrap;
    }

    .footer-nav {
        gap: 15px;
        font-size: 14px;
    }

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

}

/* Autocomplete dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--header-bg);
    border: 1px solid var(--border-light);
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

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

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: rgba(220, 38, 38, 0.2);
}

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

/* Autocomplete scrollbar styling */
.autocomplete-dropdown {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-red) var(--dark-gray);
}

.autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: var(--dark-gray);
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 3px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--dark-red);
}