/*
Theme Name: VLX69 - AI Video Theme
Theme URI: https://example.com/
Author: JC
Author URI: https://example.com/
Description: Ultra-fast, lightweight, zero-bloat WordPress AI video & cinema theme with Video Posters, 2026 SEO, Schema JSON-LD, Breadcrumb, and Native Lazy Loading.
Version: 1.0.0
Text Domain: vlx69
*/

:root {
    --bg-main: #0c0d14;
    --bg-surface: #151622;
    --bg-surface-hover: #1e2030;
    --bg-header: rgba(15, 16, 26, 0.95);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent: #ff3b5c;
    --accent-hover: #e02847;
    --badge-bg: rgba(0, 0, 0, 0.75);
    --container-max: 1440px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease-in-out;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

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

.svg-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* SCREEN READER ONLY */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* CONTAINER */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
}

.site-main {
    flex: 1;
    padding: 24px 0 48px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
/* ==========================================================================
   HEADER (Tier 1: Logo & Search Bar)
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-branding {
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    white-space: nowrap;
}

.brand-logo .logo-icon {
    color: var(--accent);
    display: flex;
    align-items: center;
}

.custom-logo-img {
    display: block;
    object-fit: contain;
    height: auto;
}

/* Search bar */
.header-search {
    flex: 1;
    max-width: 640px;
    margin: 0 auto;
}

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

.search-field {
    width: 100%;
    padding: 10px 48px 10px 18px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.search-field:focus {
    border-color: var(--accent);
    background-color: var(--bg-surface-hover);
    box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.15);
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.search-submit:hover {
    color: var(--accent);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background-color: var(--bg-surface);
}

/* ==========================================================================
   NAVIGATION BAR (Tier 2: Separate Sub Menu Strip)
   ========================================================================== */
.site-navigation-bar {
    position: relative;
    z-index: 90;
    background-color: #10111a;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
}

.site-navigation-bar .nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 6px 0;
    margin: 0;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.site-navigation-bar .nav-menu::-webkit-scrollbar {
    display: none;
}

.site-navigation-bar .nav-menu li {
    flex-shrink: 0;
}

.site-navigation-bar .nav-menu li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}

.site-navigation-bar .nav-menu li a:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface);
}

.site-navigation-bar .nav-menu li.current-menu-item a {
    color: #fff;
    background-color: var(--bg-surface);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--accent);
}

/* ==========================================================================
   BREADCRUMB
   ========================================================================== */
.breadcrumb-container {
    margin-bottom: 20px;
    padding: 8px 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    font-size: 0.88rem;
    color: var(--text-secondary);
    gap: 6px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-item.active {
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

.breadcrumb-sep {
    color: var(--text-muted);
}

/* ==========================================================================
   PAGE / SECTION HEADINGS
   ========================================================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .section-icon {
    color: var(--accent);
}

.section-filter {
    display: flex;
    gap: 8px;
}

.filter-btn {
    font-size: 0.85rem;
    padding: 4px 12px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-secondary);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ==========================================================================
   VIDEO GRID & CARD (CLS=0, 16:9 Aspect Ratio)
   ========================================================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (min-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1360px) {
    .video-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
}

.video-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 59, 92, 0.3);
}

.video-thumb-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1e202e;
    overflow: hidden;
}

.video-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

.video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.video-card:hover .video-thumb-img {
    transform: scale(1.06);
}

.thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-card:hover .thumb-overlay {
    opacity: 1;
}

.play-btn-circle {
    width: 44px;
    height: 44px;
    background-color: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 59, 92, 0.5);
}

/* Badges */
.badge {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    background-color: var(--badge-bg);
    color: #fff;
    line-height: 1;
    z-index: 2;
}

.badge-quality {
    top: 8px;
    left: 8px;
    background-color: var(--accent);
}

.badge-duration {
    bottom: 8px;
    right: 8px;
}

/* Video Info */
.video-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.video-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.video-meta {
    display: flex;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-secondary);
    gap: 6px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-dot {
    color: var(--text-muted);
}

/* ==========================================================================
   SINGLE VIDEO PAGE (Cinema 1-Column Layout - No Sidebar)
   ========================================================================== */
.single-video-main-layout {
    display: block;
    width: 100%;
}

.single-video-primary {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    min-width: 0;
}

.player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    margin-bottom: 20px;
}

.video-player,
.player-wrapper iframe,
.player-wrapper .video-iframe-player {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    outline: none;
}

.single-video-header {
    margin-bottom: 16px;
}

.single-video-title {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 12px;
}

.single-video-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.actions-left {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.actions-right {
    display: flex;
    gap: 10px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-like.active {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

.btn-dislike.active {
    background-color: #e53e3e !important;
    border-color: #e53e3e !important;
    color: #fff !important;
}

.reaction-count {
    font-weight: 600;
    font-size: 0.82rem;
}

.video-tags-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tag-badge:hover {
    background-color: var(--bg-surface-hover);
    color: var(--accent);
    border-color: var(--accent);
}

.video-description-box {
    background-color: var(--bg-surface);
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    line-height: 1.7;
    color: #d1d5db;
    font-size: 0.92rem;
}

/* ==========================================================================
   SIDEBAR TOP 5 VIDEOS WIDGET
   ========================================================================== */
.single-video-sidebar {
    min-width: 0;
}

.top-videos-widget {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.top-videos-widget .widget-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.top-videos-widget .widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.top-videos-widget .widget-icon {
    color: var(--accent);
}

/* Top Tabs Nav */
.top-tabs-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background-color: var(--bg-main);
    padding: 3px;
    border-radius: 8px;
    margin-bottom: 14px;
    gap: 4px;
}

.top-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 4px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.top-tab-btn:hover {
    color: var(--text-primary);
}

.top-tab-btn.active {
    background-color: var(--accent);
    color: #fff;
    box-shadow: 0 2px 6px rgba(255, 59, 92, 0.4);
}

/* Top Tab Panels */
.top-tab-panel {
    display: none;
}

.top-tab-panel.active {
    display: block;
}

.top-video-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-video-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-video-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

/* Rank Numbers */
.rank-number {
    font-size: 1.1rem;
    font-weight: 800;
    width: 22px;
    text-align: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.top-video-item.rank-1 .rank-number {
    color: #f59e0b; /* Gold */
}

.top-video-item.rank-2 .rank-number {
    color: #94a3b8; /* Silver */
}

.top-video-item.rank-3 .rank-number {
    color: #f97316; /* Bronze / Orange */
}

/* Thumbnail */
.top-video-thumb {
    position: relative;
    width: 105px;
    aspect-ratio: 16 / 9;
    background-color: #1e202e;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.top-video-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.top-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.top-video-item:hover .top-thumb-img {
    transform: scale(1.08);
}

.top-badge-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 2px;
    line-height: 1;
}

/* Video Info */
.top-video-info {
    flex: 1;
    min-width: 0;
}

.top-video-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top-video-title a:hover {
    color: var(--accent);
}

.top-video-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.no-top-videos {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 16px 0;
}

/* Sidebar Ad Banner Widget */
.sidebar-ad-banner-widget {
    margin-top: 20px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px;
    position: relative;
    text-align: center;
}

.ad-badge-label {
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-muted);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.ad-banner-link {
    display: block;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.ad-banner-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-sm);
    transition: transform 0.25s ease;
}

.ad-banner-link:hover .ad-banner-img {
    transform: scale(1.02);
}

.custom-ad-code {
    overflow: hidden;
    max-width: 100%;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination-nav {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

.pagination-nav .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    margin: 0 4px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.pagination-nav .page-numbers.current {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination-nav .page-numbers:hover:not(.current) {
    background-color: var(--bg-surface-hover);
    border-color: var(--accent);
}

/* ==========================================================================
   STATIC PAGE / TEXT LAYOUT
   ========================================================================== */
.static-page-card {
    background-color: var(--bg-surface);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.page-main-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.static-page-card h2, .static-page-card h3 {
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.static-page-card p {
    margin-bottom: 16px;
    color: #d1d5db;
}

/* ==========================================================================
   FOOTER (100% Clean, No Ads)
   ========================================================================== */
.site-footer {
    width: 100%;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 36px 0 20px;
    margin-top: auto;
}

.footer-grid-4 {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1.15fr;
    gap: 28px;
    margin-bottom: 28px;
}

@media (max-width: 1023px) and (min-width: 640px) {
    .footer-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

@media (max-width: 639px) {
    .footer-grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.footer-logo .logo-icon {
    color: var(--accent);
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 4px;
}

.footer-heading {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-links li a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: inline-block;
}

.footer-links li a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px 14px;
    }
    
    .header-search {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 4px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .site-navigation-bar {
        position: relative;
        top: 0;
    }

    .site-navigation-bar .nav-container {
        padding: 0 12px;
    }

    .site-navigation-bar.is-open .nav-menu {
        flex-direction: column;
        align-items: stretch;
        white-space: normal;
        padding: 12px 0;
    }

    .site-navigation-bar.is-open .nav-menu li {
        width: 100%;
    }

    .site-navigation-bar.is-open .nav-menu li a {
        width: 100%;
        padding: 10px 14px;
    }

    /* Single Video Player - Mobile Edge-to-Edge & Height Boost */
    .player-wrapper,
    .wpx-player-wrapper {
        margin-left: -16px;
        margin-right: -16px;
        width: calc(100% + 32px);
        max-width: none;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .player-wrapper,
    .wpx-player-viewport {
        min-height: 245px;
    }
}
