/* =======================================================
 * NEW MODERN DARK-CRIMSON UI DESIGN (Prefix: vdo-)
 * ======================================================= */

:root {
  --vdo-bg-main: #0b0d13;
  --vdo-bg-sec: #141824;
  --vdo-bg-card: #1a1f2e;
  --vdo-primary: #e11d48;
  --vdo-primary-hover: #be123c;
  --vdo-accent: #f59e0b;
  --vdo-text: #f1f5f9;
  --vdo-text-muted: #94a3b8;
  --vdo-border: #262d40;
  --vdo-radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--vdo-bg-main);
  color: var(--vdo-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.vdo-container {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 0 12px;
}

.vdo-not-found,
.vdo-empty-state {
  text-align: center;
  color: var(--vdo-text);
  padding: 40px 20px;
  background: var(--vdo-bg-sec);
  border-radius: var(--vdo-radius);
  margin: 20px 0;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==== HEADER & NAVIGATION ==== */
.vdo-header {
  background: var(--vdo-bg-sec);
  border-bottom: 1px solid var(--vdo-border);
  padding: 14px 20px;
  position: relative;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.vdo-header-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  position: relative;
}

.vdo-brand {
  flex: 0 0 auto;
}

.vdo-brand img {
  height: auto;
  max-height: 48px;
}

.vdo-brand-title {
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #fff, #fb7185);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.vdo-search-box {
  flex: 1;
  text-align: right;
  margin-right: 40px;
}

.vdo-search-box form {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.vdo-search-box input[type="text"] {
  padding: 9px 16px;
  background: var(--vdo-bg-main);
  color: var(--vdo-text);
  border: 1px solid var(--vdo-border);
  border-radius: 99px 0 0 99px;
  width: 240px;
  font-size: 15px;
  outline: none;
}

.vdo-search-box input[type="text"]:focus {
  border-color: var(--vdo-primary);
}

.vdo-search-box button {
  padding: 9px 18px;
  background: var(--vdo-primary);
  color: #fff;
  border: 1px solid var(--vdo-primary);
  font-size: 15px;
  font-weight: 600;
  border-radius: 0 99px 99px 0;
  cursor: pointer;
  transition: background 0.2s;
}

.vdo-search-box button:hover {
  background: var(--vdo-primary-hover);
}

.vdo-navbar {
  max-width: 1600px;
  margin: 14px auto 0;
  display: block;
}

.vdo-nav-list {
  list-style: none;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.vdo-nav-list li {
  position: relative;
}

.vdo-nav-list li a {
  color: var(--vdo-text);
  padding: 8px 16px;
  display: block;
  background: var(--vdo-bg-card);
  border: 1px solid var(--vdo-border);
  border-radius: 99px;
  font-size: 14px;
  font-weight: 600;
}

.vdo-nav-list li a:hover,
.vdo-nav-list li.current-menu-item > a {
  background: var(--vdo-primary);
  border-color: var(--vdo-primary);
  color: #fff;
  transform: translateY(-1px);
}

/* Submenu */
.vdo-nav-list li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--vdo-bg-sec);
  border: 1px solid var(--vdo-border);
  border-radius: var(--vdo-radius);
  padding: 8px;
  margin-top: 6px;
  list-style: none;
  z-index: 1000;
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.vdo-nav-list li ul::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

.vdo-nav-list li ul li {
  margin-bottom: 6px;
}

.vdo-nav-list li ul li:last-child {
  margin-bottom: 0;
}

.vdo-nav-list li ul li a {
  padding: 9px 14px;
  background: var(--vdo-bg-card);
  border: 1px solid var(--vdo-border);
  border-radius: 6px;
  white-space: nowrap;
}

.vdo-nav-list li ul li a:hover {
  background: var(--vdo-primary);
  border-color: var(--vdo-primary);
  transform: none;
}

@media (min-width: 640px) {
  .vdo-nav-list li:hover > ul {
    display: block;
  }
}

.vdo-nav-list li.open > ul {
  display: block;
}

.vdo-nav-list li.menu-item-has-children > a::after {
  content: " ▾";
  font-size: 13px;
  margin-left: 4px;
}

.vdo-nav-list li.menu-item-has-children.open > a::after {
  content: " ▴";
}

/* ==== HAMBURGER ==== */
.vdo-menu-toggle {
  display: none;
  flex-direction: column;
  background: transparent;
  padding: 4px;
  border: 0;
  gap: 5px;
  position: absolute;
  top: 18px;
  right: 18px;
  cursor: pointer;
  z-index: 100;
}

.vdo-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--vdo-text);
  border-radius: 3px;
  display: block;
  transition: 0.3s;
}

.vdo-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.vdo-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.vdo-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ==== INTRO & HEADINGS ==== */
.vdo-intro-box {
  margin: 15px 0;
  background: var(--vdo-bg-sec);
  border: 1px solid var(--vdo-border);
  border-radius: var(--vdo-radius);
  padding: 15px;
}

.vdo-intro-box h1,
.vdo-container h1.vdo-title {
  font-size: 19px;
  line-height: 1.4;
  margin: 12px 0 15px;
  color: #fff;
  background: linear-gradient(90deg, var(--vdo-primary), #9f1239);
  text-align: center;
  padding: 10px 15px;
  border-radius: var(--vdo-radius);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
}

.vdo-intro-box p,
.vdo-intro-body p {
  margin: 0 0 10px;
  line-height: 1.6;
  color: var(--vdo-text-muted);
}

.vdo-intro-box a,
.vdo-intro-body a {
  color: #38bdf8;
}

/* ==== VIDEO GRID & CARDS ==== */
.vdo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

@media screen and (min-width: 640px) {
  .vdo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media screen and (min-width: 1024px) {
  .vdo-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
  }
}

.vdo-card {
  background: var(--vdo-bg-card);
  border: 1px solid var(--vdo-border);
  border-radius: var(--vdo-radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.vdo-card:hover {
  transform: translateY(-4px);
  border-color: var(--vdo-primary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.vdo-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
}

.vdo-card .vdo-title {
  display: block;
  overflow: hidden;
  line-height: 1.5;
  height: 3em;
  margin: 8px 10px 10px;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--vdo-text);
  text-align: left;
  text-overflow: clip;
}

.vdo-card:hover .vdo-title {
  color: #fb7185;
}

/* ==== PAGINATION ==== */
.vdo-pagination {
  text-align: center;
  margin: 15px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.vdo-pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  background-color: var(--vdo-bg-card);
  border: 1px solid var(--vdo-border);
  color: var(--vdo-text);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: 0.2s;
}

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

.vdo-pagination .page-numbers.dots {
  background: transparent;
  border: none;
  color: var(--vdo-text-muted);
}

/* ==== BREADCRUMB ==== */
.vdo-breadcrumb {
    font-size: 14px;
    color: var(--vdo-text-muted);
    margin-bottom: 12px;
}

.vdo-breadcrumb a {
    color: var(--vdo-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.vdo-breadcrumb a:hover {
    color: var(--vdo-primary);
}

.vdo-breadcrumb .separator {
    margin: 0 8px;
    opacity: 0.5;
}

.vdo-breadcrumb .current {
    color: var(--vdo-text);
    font-weight: 600;
}

/* ==== SINGLE MOVIE PAGE ==== */
.vdo-single-wrap {
  padding: 0px;
  background-color: var(--vdo-bg-main);
}

/* ==========================================================================
   Video Specs Grid (ข้อมูลวิดีโอ)
   ========================================================================== */
.vdo-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    list-style: none;
    padding: 15px;
    margin: 20px 0;
    background: var(--vdo-bg-card); /* ดึงสีพื้นหลังการ์ดของธีม */
    border: 1px solid var(--vdo-border); /* เพิ่มขอบให้เข้ากับกล่องอื่นๆ */
    border-radius: var(--vdo-radius);
}

@media (min-width: 768px) {
    .vdo-specs-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        padding: 20px;
    }
}

.vdo-specs-grid li {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 1.1em;
    color: #97ff00;
    margin-bottom: 4px;
}

.spec-value {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--vdo-text); /* ดึงสีข้อความหลัก */
    line-height: 1.4;
}

.spec-value a {
    color: #f7ff00;
    text-decoration: none;
    transition: color 0.2s ease;
}

.spec-value a:hover {
    color: var(--vdo-primary-hover);
}

.vdo-player-stage {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  background: #000;
  border-radius: var(--vdo-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--vdo-border);
}

.vdo-player-stage iframe,
.vdo-player-stage video,
.vdo-player-stage embed,
.vdo-player-stage object {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vdo-details {
  background: var(--vdo-bg-sec);
  border: 1px solid var(--vdo-border);
  border-radius: var(--vdo-radius);
  padding: 20px;
  margin-top: 15px;
}

.vdo-body {
  font-size: 16px;
  line-height: 1.7;
}

.vdo-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 16px;
  padding: 10px 16px;
  background: var(--vdo-bg-card);
  border-radius: 8px;
  color: var(--vdo-accent);
  font-size: 17px;
  font-weight: 700;
}

.vdo-views {
  color: var(--vdo-accent);
}

.vdo-poster-box {
  text-align: center;
  margin: 15px 0;
}

.vdo-poster-box img {
  max-width: 100%;
  height: auto;
  border-radius: var(--vdo-radius);
  border: 1px solid var(--vdo-border);
}

.vdo-synopsis {
  background: rgba(245, 158, 11, 0.12);
  border-left: 4px solid var(--vdo-accent);
  padding: 12px 16px;
  margin: 15px 0;
  color: var(--vdo-text);
  border-radius: 0 8px 8px 0;
  font-weight: 500;
}

/* Tags & Taxonomies */
.vdo-tax-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 6px;
  margin-top: 15px;
  align-items: center;
}

.vdo-tax-links span.vdo-cat {
  display: contents;
}

.vdo-tax-links a {
  display: inline-block;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  background-color: #1e3a8a;
  padding: 5px 12px;
  margin: 2px;
  border-radius: 99px;
  font-weight: 600;
}

span.vdo-cat a { background: #991b1b; }

.vdo-tax-links a:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* Related Section */
.vdo-related-sec {
  max-width: 1600px;
  margin: 15px auto 0;
  padding: 0 12px;
}

.vdo-sec-heading {
  background: var(--vdo-bg-sec);
  border-left: 5px solid var(--vdo-primary);
  color: #fff;
  text-align: left;
  font-size: 19px;
  margin-bottom: 15px;
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
}

.vdo-more-wrap {
  text-align: center;
  margin: 25px 0 35px;
}

.vdo-btn-more {
  display: inline-block;
  background: var(--vdo-primary);
  color: #fff;
  padding: 12px 32px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.35);
}

.vdo-btn-more:hover {
  background: var(--vdo-primary-hover);
  transform: translateY(-2px);
}

/* Extra Elements */
.vdo-tag-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
}

span.vdo-tag-item a {
  font-size: 14px;
  background: var(--vdo-bg-card);
  border: 1px solid var(--vdo-border);
  color: var(--vdo-text);
  padding: 6px 12px;
  border-radius: 99px;
  font-weight: 600;
  display: inline-block;
}

span.vdo-tag-item a:hover {
  background: var(--vdo-primary);
  border-color: var(--vdo-primary);
}

.vdo-count-badge {
  width: 100%;
  font-size: 18px;
  font-weight: 700;
  background: var(--vdo-bg-sec);
  border: 1px solid var(--vdo-primary);
  text-align: center;
  padding: 8px;
  border-radius: var(--vdo-radius);
  color: #fff;
  margin-bottom: 12px;
}

.vdo-actor-card {
  background: var(--vdo-bg-card);
  border: 1px solid var(--vdo-border);
  padding: 8px;
  border-radius: var(--vdo-radius);
  text-align: center;
}

.vdo-share-btn.copy-link {
  background: #fff;
  border: 0px;
  font-size: 16px;
  border-radius: 10px;
  font-weight: 600;
}

/* ==== MOBILE STYLES ==== */
@media (max-width: 639px) {
  .vdo-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .vdo-brand,
  .vdo-search-box {
    width: 100%;
    text-align: center;
    margin-right: 0;
  }

  .vdo-search-box form {
    justify-content: center;
  }

  .vdo-search-box input[type="text"] {
    width: 100%;
  }

  .vdo-menu-toggle {
    display: flex;
  }

  .vdo-navbar {
    display: none;
    width: 100%;
  }

  .vdo-navbar.active {
    display: block !important;
    margin-top: 12px;
  }

  .vdo-nav-list {
    flex-direction: column;
    gap: 8px;
  }

  .vdo-nav-list li a {
    border-radius: 8px;
  }
}

/* ==== ADS SYSTEM ==== */
#ads-header, #ads-footer, #ads-single { text-align: center; margin: 10px 0; }
img.ads728x130 { max-width: 100%; height: auto; }
img.ads728 { max-width: 40%; height: auto; }
img.ads140s { width: 140px; height: 250px; }
img.ads300s { width: 300px; height: 100px; }

#slider-r, #slider-l {
  position: fixed;
  top: 160px;
  width: 140px;
  text-align: center;
  line-height: 0;
  z-index: 900;
}
#slider-r { right: 3px; }
#slider-l { left: 3px; }

#slider-f {
  width: 300px;
  right: 30px;
  left: 0;
  bottom: 5px;
  margin: 0 auto;
  position: fixed;
  text-align: center;
  line-height: 0;
  z-index: 900;
}

.xcc { width: 30px; height: 100px; position: absolute; left: 100%; top: 0px; }
img.close { height: auto; }

.vdo-iframe-box { position: relative; width: 100%; background: #000; }
.vdo-iframe-box iframe { width: 100%; height: 100%; }

.vdo-player-stage .vdo-ad-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(0,0,0,.65);
  text-align: center;
  align-items: center;
  justify-content: center;
  display: flex;
}

.vdo-ad-inner { position: relative; max-width: 95%; top: -20px; }
.vdo-ad-inner img { max-width: 400px; height: 150px; }

.vdo-ad-dismiss {
  position: absolute;
  top: 0px;
  left: 100%;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e53935;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  font-weight: bold;
  justify-content: center;
  align-items: center;
  display: flex;
  border: 2px solid white;
}

@media (min-width: 768px) and (max-width: 959px) {
  img.ads140s { width: 120px; max-height: 200px; }
  #slider-r, #slider-l { width: 120px; top: 130px; }
}

@media (min-width: 640px) and (max-width: 767px) {
  img.ads140s { width: 100px; max-height: 200px; }
  #slider-r, #slider-l { width: 100px; top: 120px; }
}

@media (min-width: 319px) and (max-width: 639px) {
  img.ads728 { max-width: 95%; }
  img.ads728x130 { max-width: 98%; }
  img.ads140s { width: 90px; max-height: 150px; }
  #slider-r, #slider-l { width: 90px; top: 95px; }
  img.ads300s { width: 250px; max-height: 80px; }
  #slider-f { width: 250px; }
  .xcc { width: 25px; height: 80px; }
  .vdo-ad-inner img { max-width: 75%; height: auto; }
  .vdo-ad-dismiss { left: 88%; }
}

@media (max-width: 318px) {
  img.ads728, img.ads728x130, img.ads140s, img.ads300s,
  #slider-r, #slider-l, #slider-f, #videoAd, .xcc {
    display: none;
  }
}

/* ---------- ป้ายบนโปสเตอร์ ---------- */
.vdo-thumb-wrap { position: relative; display: block; overflow: hidden; }
.vdo-card-link  { position: relative; }

.vdo-badges {
  position: absolute; z-index: 4;
  display: flex;
}
.vdo-badges--tl { top: 0px;    left: 0px; }
.vdo-badges--tr { top: 0px;    right: 0px; }
.vdo-badges--bl { bottom: 0px; left: 0px; }
.vdo-badges--br { bottom: 0px; right: 0px; }

.vdo-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700; line-height: 1;
padding: 3px 3px; border-radius: 5px; 
letter-spacing: .02em;
}

.vdo-badge--subthai  { background: #dc2626; color: #fff; }
.vdo-badge--uncen    { background: #0051ff; color: #fff; }
.vdo-badge--uncen-ai { background: #7c3aed; color: #fff; }
.vdo-badge--default  { background: #374151; color: #fff; }

.vdo-badge--time {
  background: #007171; color: #fff;
  font-weight: 700;