/**
 * VidVelo Theme CSS: Minimalist & Mobile-First
 * Target: <10kb Production Bundle
 */

:root {
  --primary: #FF9900; /* VidVelo Signature Orange */
  --bg: #000000;      /* Enterprise Black */
  --text: #ffffff;
  --text-muted: #888888;
  --card-bg: #111111;
  --border: #222222;

  /* 🏙️ Ultra-Fidelity Tokens (Added for Granular Branding) */
  --nav-link: #a0a0a0;
  --nav-link-active: #ffffff;
  --section-title: #ffffff;
  --vid-title: #ffffff;
  --time-bg: var(--primary);
  --time-text: #000000;

  /* 🌬️ UI Precision Refinement */
  --nav-bg: var(--card-bg);
  --nav-shadow: none;

  /* 💎 Ultra-Fidelity Video Experience */
  --pagination-bg: var(--border);
  --pagination-text: var(--text);
  --watch-btn: #FF0000;
}

/* Reset & Base */
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  margin: 0;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

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

/* Layout */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header, .site-header, #masthead {
  background: var(--bg) !important;
  background-color: var(--bg) !important;
  padding: 0;
  position: relative;
  z-index: 99999 !important;
  border-bottom: 1px solid var(--border);
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
}

.header-container {
    max-width: 1400px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.site-branding {
    margin-right: 2rem;
}

.header-search {
    flex: 1;
    max-width: 600px;
}

.search-form {
    display: flex;
    gap: 0;
}

.search-field {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px 0 0 4px;
    min-width: 0;
    width: 100%;
    box-shadow: none !important;
}

.search-submit {
    background: var(--primary);
    color: var(--bg);
    border: none;
    padding: 0 1.25rem;
    font-weight: 800;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.nav-wrapper {
    background-color: var(--nav-bg);
    width: 100%;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--nav-shadow);
}

.nav-inner-container {
    padding-top: 0;
    padding-bottom: 0;
}

.main-navigation {
    width: 100%;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 3rem;
}

.nav-menu li a {
    color: var(--nav-link);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.75rem 0;
    display: block;
    border-bottom: 3px solid transparent;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.2s ease-in-out;
}

.nav-menu li.active a,
.nav-menu li a:hover {
    color: var(--nav-link-active);
    border-bottom-color: var(--primary) !important;
}

main {
  flex: 1;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.single-video-layout {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

#vidvelo-player, 
.video-js, 
.vjs-poster, 
.vidvelo-video-container {
    box-shadow: none !important;
    filter: none !important;
    border-radius: 4px;
    overflow: hidden;
}

.video-column {
    flex: 1;
    min-width: 0;
}

.sidebar-column {
    width: 300px;
    flex-shrink: 0;
}

.ad-sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ad-unit-300x250 {
    width: 300px;
    height: 250px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: none !important;
}

.ad-unit-728x90 {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: none !important;
}

.vidvelo-meta-hub {
    margin-top: 1.5rem;
    color: var(--text);
}

.meta-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 0.5rem;
}

.meta-row-1 .video-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--text) !important;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.meta-row-2 {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 📊 Rating Bar Replication */
.meta-row-3.rating-bar-hub {
    background: #e5e5e5; /* Professional Light Grey like mockup */
    padding: 0.4rem 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #333; /* Darker text for grey bar contrast */
}

.rating-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.rating-btn {
    background: transparent;
    border: none;
    color: #555;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.rating-btn:hover {
    color: var(--primary);
}

.rating-progress-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
}

.rating-numbers {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.rating-line-bg {
    width: 100%;
    height: 3px;
    background: #ccc;
    border-radius: 2px;
    overflow: hidden;
}

.rating-line-active {
    height: 100%;
    background: #ff3b30; /* Bright Red like mockup */
}

.share-btn-link {
    background: transparent;
    border: none;
    font-weight: 700;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* 🏷️ Tag Studio Refinement */
.meta-row-4.tag-studio {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag-label {
    background: #e0e0e0;
    color: #444;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.2s;
}

.tag-label:hover {
    background: #d4d4d4;
    color: #222;
}

.watch-complete-btn {
    background: var(--watch-btn);
    color: #fff !important;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    transition: opacity 0.3s;
    box-shadow: none !important;
}

.watch-complete-btn:hover {
    opacity: 0.9;
    color: #fff;
}

/* 🔄 Responsive Video Grid */
.site-main {
  width: 100%;
}

/* 🎥 High-Density Video Card */
.vidvelo-card {
  background: transparent;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  min-width: 0;
}

.vidvelo-thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--card-bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: none !important;
}

.vidvelo-thumbnail-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; 
}

.vidvelo-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--time-bg);
    color: var(--time-text);
    padding: 2px 4px;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.vidvelo-card .entry-header {
  background: none;
  padding-top: 0.25rem;
  border: none !important;
  border-bottom: none !important;
}

.vidvelo-card .entry-title {
  background: none;
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 0.25rem 0;
  color: var(--text);
  line-height: 1.3;
}

.single-video-layout .video-title,
.video-column .video-title {
    color: var(--text) !important;
}

.vidvelo-card .entry-meta {
  background: none;
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
}

.vidvelo-card .entry-meta i {
    margin-right: 4px;
}

.rating-score {
    color: #76b852; /* Vivid Mockup Green */
    display: flex;
    align-items: center;
}

.rating-score i {
    margin-right: 4px;
}

/* 🌟 Showcase Hero Section */
.vidvelo-hero {
    position: relative;
    width: 100%;
    min-height: 50vh;
    display: flex;
    align-items: center;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
    background: url('https://mango.blender.org/wp-content/themes/mango/images/poster_tears_of_steel_600.jpg') center/cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 15, 15, 1) 0%, rgba(15, 15, 15, 0.6) 50%, rgba(15, 15, 15, 0) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    padding: 3rem;
}

.hero-badge {
    background: var(--primary);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    display: table;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* 🔄 Category Filter Bar (Hidden for High-Density Famous Design) */
.vidvelo-category-bar {
    display: none;
}

/* 🔄 High-Density Grid */
.vidvelo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 600px) {
    .vidvelo-grid { grid-template-columns: repeat(3, 1fr); }
}

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

.vidvelo-card {
    position: relative;
    transition: transform 0.3s ease;
}

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

.card-link {
    display: block;
    text-decoration: none;
}

.card-thumb-wrap img {
    transition: transform 0.5s ease;
}

.vidvelo-card:hover .card-thumb-wrap img {
    transform: scale(1.05);
}
/* 🏠 Sectional Homepage Architecture (Famous Style) */
.famous-section-top, .famous-section-mid, .famous-section-bottom {
    margin-bottom: 3.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}

.more-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* 💠 High-Density Index Headers (Series, Platforms, Models) */
.vidvelo-index-header {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.vidvelo-index-title {
    font-size: 1.1rem !important;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 !important;
    line-height: 1 !important;
}

@media (max-width: 768px) {
    .vidvelo-index-header {
        margin-top: 0.25rem !important;
        margin-bottom: 0.25rem !important;
    }
    .vidvelo-index-title {
        font-size: 0.85rem !important;
    }
}

/* 🏆 Top Section: Split 3-Wide + AD */
.top-layout-wrapper {
    display: grid;
    gap: 2rem;
}

.top-layout-wrapper.has-ad {
    grid-template-columns: 3fr 1fr;
}

.top-layout-wrapper.no-ad {
    grid-template-columns: 1fr;
}

.top-layout-wrapper.no-ad .top-video-grid {
    grid-template-columns: repeat(4, 1fr);
}

.top-video-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3, 1fr);
}

.home-ad-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    height: 100%;
    min-height: 400px;
}

.ad-placeholder {
    color: #444;
    font-weight: 800;
    font-size: 3rem;
    text-transform: uppercase;
}

/* 🎞️ Mid Section: 4-Wide */
.mid-video-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(4, 1fr);
}

/* 🆕 Bottom Section: 4-Wide */
.bottom-video-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(4, 1fr);
}

/* 📱 Responsive Engineering (Famous-Style Refinement) */
@media (max-width: 1200px) {
    .top-layout-wrapper.has-ad { grid-template-columns: 1fr; }
    .top-video-grid, .mid-video-grid, .bottom-video-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
}

@media (max-width: 1024px) {
    .header-container { padding: 1rem; }
    .nav-menu { gap: 1.5rem; }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0.25rem 0.5rem;
        gap: 0.25rem;
    }
    .site-branding { 
        width: auto; 
        text-align: left;
        margin-right: 0.5rem;
    }
    .site-title { font-size: 1.25rem; }
    .header-search { 
        width: auto;
        flex: 1; 
        margin-top: 0;
        min-width: 0;
    }
    .search-form { 
        width: 100%; 
        display: flex;
    }
    .search-field { flex: 1; min-width: 0; padding: 0.4rem 0.75rem; font-size: 0.8rem; }
    .search-submit { padding: 0 0.5rem; font-size: 0.7rem; }
    .main-navigation { width: 100%; margin-top: 0.25rem; }
    .nav-menu { 
        gap: 1rem; 
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .nav-menu::-webkit-scrollbar { display: none; }
    .nav-menu li { flex-shrink: 0; }
    .nav-menu li a { font-size: 0.75rem; padding: 0.25rem 0; }
    .top-video-grid, .mid-video-grid, .bottom-video-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 1rem;
    }
    .section-header h2 { font-size: 1.25rem; color: var(--section-title); }
}

/* 🔄 Famous-Style Pagination */
.pagination {
    margin: 4rem 0;
    width: 100%;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* CRITICAL FIX: Allow pagination links to break onto new lines on mobile */
    gap: 0.5rem;
    width: 100%;
}

.pagination .page-numbers {
    background: #111;
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border: 1px solid #222;
    font-weight: 800;
    transition: all 0.3s;
    border-radius: 4px;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary) !important;
    color: #000 !important;
    border-color: var(--primary) !important;
}

.pagination .nav-links {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: #fff;
    color: #000;
}

.btn-outline {
    border: 1px solid #444;
    color: #fff;
    backdrop-filter: blur(5px);
}

.btn:hover {
    transform: scale(1.05);
}

/* Single View Refinement */
.vidvelo-video-single {
    grid-column: 1 / -1;
}

/* 📽️ Video.js Famous Orange Skin */
.video-js.vjs-default-skin {
    color: #fff;
}

.video-js .vjs-big-play-button {
    background-color: rgba(255, 153, 0, 0.8) !important;
    border: none !important;
    width: 80px !important;
    height: 80px !important;
    line-height: 80px !important;
    border-radius: 50% !important;
    font-size: 3.5em !important;
    top: 50% !important;
    left: 50% !important;
    margin-top: -40px !important;
    margin-left: -40px !important;
    transition: all 0.3s !important;
}

.video-js:hover .vjs-big-play-button {
    background-color: var(--primary) !important;
    transform: translate(-0, -0) scale(1.1);
}

.video-js .vjs-play-progress, 
.video-js .vjs-volume-level,
.video-js .vjs-slider-bar {
    background: var(--primary) !important;
}

.video-js .vjs-load-progress {
    background: rgba(255, 255, 255, 0.2) !important;
}

.vjs-quality-selector .vjs-menu-button {
    margin: 0 !important;
}

.vjs-menu-button-popup .vjs-menu .vjs-menu-content {
    background-color: #111 !important;
    border: 1px solid #333 !important;
}

.vjs-menu-item:hover {
    background-color: var(--primary) !important;
    color: #000 !important;
}

.vjs-menu-item.vjs-selected {
    background-color: var(--primary) !important;
    color: #000 !important;
}

/* Ensure container handles Fluid Player */
.vidvelo-video-container {
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

footer {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.825rem;
  color: var(--text-muted);
  border-top: 1px solid #222;
}

/* 🌟 Famous-Style Video Page Layout */
.single-video-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
}

.video-column {
    flex: 1;
    min-width: 300px;
}

.related-column {
    width: 350px;
}

@media (max-width: 1024px) {
    .related-column { width: 100%; }
}

/* 📱 Mobile Landscape Layout Fixes */
@media (max-width: 992px) and (orientation: landscape) {
    .single-video-layout {
        flex-direction: column !important;
    }
    .video-column, .sidebar-column {
        width: 100% !important;
        flex: none !important;
        max-width: 100% !important;
    }
    .sidebar-column {
        margin-top: 2rem;
    }
    main {
        padding: 0 !important; /* Maximize width in landscape */
    }
}

/* Metadata Bar */
.vidvelo-meta-bar {
    background: #0b0b0b;
    border: 1px solid #1a1a1a;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.video-title {
    font-size: 1.75rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    color: #fff;
    line-height: 1.2;
}

/* 🔢 OTT Episode Bar */
.vidvelo-episode-bar {
    background: #111;
    border: 1px solid #222;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ep-label {
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

.ep-list {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.ep-list::-webkit-scrollbar {
    height: 3px;
}

.ep-item {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #fff;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #222;
}

.ep-item:hover {
    background: #333;
    transform: translateY(-2px);
    border-color: #444;
}

.ep-item.active {
    background: var(--primary) !important;
    color: #000 !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

/* ⏭️ Next Episode Button */
.vidvelo-video-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.next-ep-btn {
    position: absolute;
    bottom: 60px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #ff6600 100%);
    color: #000 !important;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 800;
    text-decoration: none;
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    transition: all 0.3s;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.next-ep-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 153, 0, 0.4);
}

/* 🏷️ OTT Badges */
.ott-badges {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.platform {
    background: rgba(255, 153, 0, 0.1);
    color: var(--primary);
    border: 1px solid rgba(255, 153, 0, 0.2);
}

.badge.cast {
    background: #1a1a1a;
    color: #aaa;
    border: 1px solid #333;
}



.meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.meta-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
}

.meta-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #222;
    margin-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

/* 📺 Single Video Layout (Grid) */
.single-video-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 1024px) {
    .single-video-layout {
        grid-template-columns: 1fr;
    }
}

.video-column {
    min-width: 0;
}

/* 🔢 Episode Sidebar Styling */
.sidebar-episodes {
    background: #0f0f0f;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1f1f1f;
}

.episodes-header {
    padding: 16px;
    background: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
}

.series-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.ep-count {
    background: #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #aaa;
}

.episodes-list {
    max-height: 600px;
    overflow-y: auto;
}

.episode-item {
    display: flex;
    padding: 10px;
    gap: 12px;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}

.episode-item:hover {
    background: #1a1a1a;
}

.episode-item.active {
    background: #1a1a1a;
    border-left-color: #FF9900;
}

.ep-thumb {
    position: relative;
    width: 120px;
    aspect-ratio: 16/9;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.ep-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playing-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 153, 0, 0.9);
    color: #000;
    font-size: 10px;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 4px;
}

.ep-info {
    flex: 1;
    min-width: 0;
}

.ep-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-meta {
    font-size: 0.8rem;
    color: #888;
}

.tab-btn:hover { color: #fff; }
/* 🏷️ Famous-Style Tags */
.vidvelo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag-link {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s;
    box-shadow: none !important;
}

.tag-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 🎥 Compact Video Card (Sidebar) */
.related-list-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.video-compact-card {
    display: flex;
    gap: 0.75rem;
}

.compact-thumb {
    position: relative;
    width: 120px;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
    background: var(--card-bg);
    overflow: hidden;
    border-radius: 4px;
    box-shadow: none !important;
}

.compact-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-duration {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 0.65rem;
    padding: 1px 3px;
    font-weight: 800;
    border-radius: 2px;
}

.compact-info {
    flex: 1;
}

.compact-title {
    font-size: 0.85rem;
    font-weight: 400; /* Normalized Typography */
    line-height: 1.2;
    margin: 0 0 0.15rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Compatibility Fallback */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content-wrapper {
    min-height: 100px;
}

.tab-content {
    display: none;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.tab-content.active {
    display: block;
}

/* Sidebar Styling */
.related-column h3 {
    font-size: 1rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary);
    display: table;
    margin-bottom: 1rem;
}

/* 🧭 Dynamic Section Header & Sorting Filter */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.section-header h2 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 800;
}

select.recently-filter {
    background-color: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    box-shadow: none !important;
}

select.recently-filter:hover {
    border-color: var(--primary);
}

/* 📱 Mobile Layout CTR & Breakpoint Fixes */
@media (max-width: 768px) {
    /* Fix header wrapping drop break */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .section-header .header-tools, 
    select.recently-filter {
        width: 100%;
    }

    /* Maximize Thumbnails for High CTR */
    .header-container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    main {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Compress grid spacing to enlarge actual image size */
    .top-video-grid, 
    .mid-video-grid,
    .bottom-video-grid,
    .vidvelo-grid {
        gap: 0.5rem !important;
        grid-template-columns: 1fr 1fr !important; /* Force 2-columns if needed, but flex gap matters */
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Compress pagination blocks horizontally but ENLARGE tap targets for Google PageSpeed */
    .pagination .nav-links {
        gap: 0.4rem;
        flex-wrap: nowrap !important; /* CRITICAL FIX: Physically destroy the second line completely */
        overflow-x: auto; /* Allow users to elegantly swipe the pagination if it exceeds the screen edge */
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px; /* Prevent tap bounding overlap */
        justify-content: center; /* keep centered on larger phones */
    }

    .pagination .nav-links::-webkit-scrollbar {
        display: none; /* Hide scrollbar for native app feel */
    }

    .pagination .page-numbers {
        padding: 0 0.25rem; /* Shave absolute maximum horizontal padding */
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
        flex-shrink: 0; /* Guarantee Google gets its 44px regardless of row compression */
    }
}

/* 🎬 OTT TRANSFORMATION STYLES */
.vidvelo-episode-bar {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #333;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.ep-label {
    display: block;
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

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

.ep-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #222;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid #333;
}

/* Hover & Active States */
.ep-item:hover {
    background: #444;
    border-color: #ff0000;
}

.ep-item.active {
    background: #ff0000;
    border-color: #ff0000;
}

/* Metadata Badges */
.platform-badge {
    background: #fbbf24 !important; /* Gold for premium platforms */
    color: #000 !important;
    font-weight: 900 !important;
}

.cast-badge {
    background: #3b82f6 !important; /* Blue for cast */
    color: #fff !important;
}

.next-ep-btn {
    display: inline-block;
    background: #ff0000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 15px;
    transition: transform 0.2s;
}

.next-ep-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .vidvelo-episode-bar {
        margin: 10px 0;
        padding: 12px;
    }
    
    .ep-item {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* 💎 XMAAL SIGNATURE BRANDING (Logo-Text Engine) */
.site-title {
    margin: 0;
    line-height: 1;
}

.site-title a {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.brand-x {
    color: var(--primary);
    margin-right: 1px;
}

.brand-maal {
    color: #ffffff;
}

/* Subtle Brand Glow on Hover */
.site-title a:hover .brand-x {
    text-shadow: 0 0 15px var(--primary);
    transition: all 0.3s ease;
}

/* ?? SITE FOOTER ARCHITECTURE */
.site-footer {
    padding: 40px 20px;
    background-color: var(--nav-bg, #111111);
    border-top: 1px solid var(--border, #222222);
    text-align: center;
    color: var(--text-muted, #888888);
}
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}
.footer-navigation {
    margin-bottom: 15px;
}
.footer-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}
.footer-menu-items a {
    color: var(--text-muted, #888888);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}
.footer-menu-items a:hover {
    color: var(--primary, #FF9900);
}
.site-info {
    font-size: 13px;
    letter-spacing: 0.2px;
}
.site-info a {
    color: var(--text, #ffffff);
    text-decoration: none;
    font-weight: 600;
}
