/* =======================================================
 * 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: 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;
  margin: 0;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.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: contain;
  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);
}

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

/* =====================================================
 * SPECS GRID — CONSOLIDATED PROFESSIONAL LAYOUT
 * ===================================================== */

.vdo-specs-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 12px;
  margin: 20px 0;
  background: var(--vdo-bg-card);
  border: 1px solid var(--vdo-border);
  border-radius: var(--vdo-radius);
}

/* การ์ดของแต่ละรายการ */
.vdo-specs-grid > li {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  min-height: 82px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--vdo-border);
  border-radius: 8px;
  background: var(--vdo-bg-main);
}

/* รหัส: 25% */
.vdo-specs-grid > li:first-child {
  grid-column: span 3;
}

/* นักแสดง: 75% */
.vdo-specs-grid > li:nth-child(2),
.vdo-specs-grid > li.vdo-spec-item-wide {
  grid-column: span 9;
}

/* ค่าย / ความยาว / วันที่: แบ่งเท่ากัน */
.vdo-specs-grid > li:nth-child(n + 3) {
  grid-column: span 4;
}

/* Label */
.vdo-specs-grid .spec-label {
  margin: 0;
  color: var(--vdo-text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

/* Value */
.vdo-specs-grid .spec-value {
  min-width: 0;
  margin: 0;
  color: var(--vdo-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* ลิงก์ใน Specs */
.vdo-specs-grid .spec-value a {
  color: #7dd3fc;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.vdo-specs-grid .spec-value a:hover {
  color: #bae6fd;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* รายชื่อนักแสดง */
.vdo-specs-grid .spec-actors-value {
  line-height: 1.55;
}

/* ปุ่มนักแสดงเพิ่มเติมอยู่ข้างชื่อคนแรก */
.spec-actors-value .vdo-term-more {
  display: inline;
  margin: 0 0 0 6px;
}

.spec-actors-value .vdo-term-more summary {
  min-height: 28px;
  padding: 3px 7px;
}

.spec-actors-value .vdo-term-more-items {
  line-height: 1.7;
}

.spec-actors-value .vdo-term-more[open] .vdo-term-more-items {
  display: block;
  margin-top: 8px;
  margin-left: -6px;
}

/* Tablet */
@media (max-width: 767px) {
  .vdo-specs-grid > li:first-child {
    grid-column: span 4;
  }

  .vdo-specs-grid > li:nth-child(2),
  .vdo-specs-grid > li.vdo-spec-item-wide {
    grid-column: span 8;
  }

  .vdo-specs-grid > li:nth-child(n + 3) {
    grid-column: span 6;
  }
}

/* Mobile */
@media (max-width: 639px) {
  .vdo-specs-grid {
    gap: 10px;
    padding: 10px;
  }

  .vdo-specs-grid > li {
    min-height: 0;
    padding: 11px 12px;
  }

  .vdo-specs-grid .spec-label {
    font-size: 11.5px;
  }

  .vdo-specs-grid .spec-value {
    font-size: 14px;
  }
}

/* Fallback สำหรับ Spec นอก Grid */
.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);
}

/* ==== VIDEO PLAYER ==== */
.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;
}

/* ==== MOVIE DETAILS ==== */
.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: 12px;
  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 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--vdo-border);
  border-radius: 8px;
  background: var(--vdo-bg-main);
  color: var(--vdo-accent);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.vdo-views .view-count {
  display: inline-flex;
  align-items: center;
}

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

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

.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;
}

/* ==== CATEGORY & TAG GROUPS ==== */
.vdo-tax-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-top: 20px;
}

.vdo-tax-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.vdo-tax-label {
  flex: 0 0 82px;
  padding-top: 10px;
  color: var(--vdo-text-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.vdo-tax-items {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.vdo-tax-items a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0;
  padding: 7px 11px;
  border: 1px solid var(--vdo-border);
  border-radius: 7px;
  background: var(--vdo-bg-card);
  color: var(--vdo-text);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.vdo-tax-categories .vdo-tax-items a {
  border-color: rgba(225, 29, 72, 0.3);
  background: rgba(225, 29, 72, 0.12);
  color: #fda4af;
}

.vdo-tax-categories .vdo-tax-items a:hover {
  border-color: rgba(251, 113, 133, 0.75);
  background: rgba(225, 29, 72, 0.24);
  color: #fff1f2;
}

.vdo-tax-tags .vdo-tax-items a {
  border-color: rgba(96, 165, 250, 0.25);
  background: rgba(30, 64, 175, 0.14);
  color: #bfdbfe;
}

.vdo-tax-tags .vdo-tax-items a:hover {
  border-color: rgba(96, 165, 250, 0.65);
  background: rgba(30, 64, 175, 0.28);
  color: #eff6ff;
}

.vdo-tax-empty {
  padding-top: 10px;
  color: var(--vdo-text-muted);
  font-size: 13px;
}

@media (max-width: 639px) {
  .vdo-tax-links {
    gap: 16px;
  }

  .vdo-tax-group {
    flex-direction: column;
    gap: 8px;
  }

  .vdo-tax-label {
    flex: none;
    padding-top: 0;
    font-size: 13px;
  }

  .vdo-tax-items {
    gap: 7px;
  }

  .vdo-tax-items a {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .vdo-tax-empty {
    padding-top: 0;
  }
}

/* ==== 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;
}

/* ==== 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: 0;
}

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, 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: 0;
  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 #fff;
}

@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;
  }
}

/* ==== BADGES บนโปสเตอร์ ==== */
.vdo-thumb-wrap {
  position: relative;
  display: block;
  overflow: hidden;
}

.vdo-card-link {
  position: relative;
}

.vdo-badges {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  max-width: calc(100% - 12px);
  pointer-events: none;
}

.vdo-badges--tl {
  top: 6px;
  left: 6px;
}

.vdo-badges--tr {
  top: 6px;
  right: 6px;
  justify-content: flex-end;
}

.vdo-badges--bl {
  bottom: 6px;
  left: 6px;
}

.vdo-badges--br {
  right: 6px;
  bottom: 6px;
  justify-content: flex-end;
}

.vdo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.vdo-badge--subthai {
  background: rgba(185, 28, 28, 0.88);
  border-color: rgba(254, 202, 202, 0.25);
  color: #fff;
}

.vdo-badge--uncen {
  background: rgba(29, 78, 216, 0.88);
  border-color: rgba(191, 219, 254, 0.25);
  color: #fff;
}

.vdo-badge--uncen-ai {
  background: rgba(109, 40, 217, 0.88);
  border-color: rgba(221, 214, 254, 0.25);
  color: #fff;
}

.vdo-badge--views {
  background: rgba(8, 47, 73, 0.84);
  border-color: rgba(253, 224, 71, 0.22);
  color: #fde047;
}

.vdo-badge--time {
  background: rgba(15, 23, 42, 0.84);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 639px) {
  .vdo-badges {
    gap: 2px;
    max-width: calc(100% - 8px);
  }

  .vdo-badges--tl {
    top: 4px;
    left: 4px;
  }

  .vdo-badges--tr {
    top: 4px;
    right: 4px;
  }

  .vdo-badges--bl {
    bottom: 4px;
    left: 4px;
  }

  .vdo-badges--br {
    right: 4px;
    bottom: 4px;
  }

  .vdo-badge {
    padding: 3px 5px;
    font-size: 10px;
    border-radius: 3px;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
}

/* ==== ปุ่ม LIKE / UNLIKE ==== */
.vdo-vote-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 14px;
  border: 1px solid var(--vdo-border);
  border-radius: 8px;
  background: var(--vdo-bg-main);
  color: var(--vdo-text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.vdo-vote-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.vdo-like-btn {
  color: #22c55e;
}

.vdo-unlike-btn {
  color: #ef4444;
}

.vdo-like-btn:hover,
.vdo-like-btn.is-voted {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.vdo-unlike-btn:hover,
.vdo-unlike-btn.is-voted {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ==== SHARE COMPONENT ==== */
.vdo-share-component {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.vdo-share-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--vdo-border);
  border-radius: 8px;
  background: var(--vdo-bg-main);
  color: var(--vdo-text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.vdo-share-toggle:hover,
.vdo-share-toggle[aria-expanded="true"] {
  border-color: var(--vdo-primary);
  background: rgba(225, 29, 72, 0.12);
  color: #fb7185;
}

.vdo-share-toggle-icon {
  flex: 0 0 auto;
  display: block;
}

body.vdo-share-open {
  overflow: hidden;
}

.vdo-share-modal[hidden] {
  display: none !important;
}

.vdo-share-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.vdo-share-modal.is-open {
  opacity: 1;
}

.vdo-share-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.vdo-share-modal.is-open .vdo-share-backdrop {
  opacity: 1;
}

.vdo-share-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  overflow-y: auto;
  border: 1px solid var(--vdo-border);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background: var(--vdo-bg-sec);
  color: var(--vdo-text);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  transition: transform 0.22s ease;
}

.vdo-share-modal.is-open .vdo-share-sheet {
  transform: translateY(0);
}

.vdo-share-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--vdo-border);
}

.vdo-share-sheet-title {
  color: var(--vdo-text);
  font-size: 18px;
  font-weight: 700;
}

.vdo-share-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--vdo-border);
  border-radius: 50%;
  background: var(--vdo-bg-card);
  color: var(--vdo-text-muted);
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.vdo-share-close:hover {
  border-color: var(--vdo-primary);
  color: #fff;
}

.vdo-share-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.vdo-share-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--vdo-border);
  border-radius: 10px;
  background: var(--vdo-bg-card);
  color: var(--vdo-text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.vdo-share-option:hover {
  border-color: var(--vdo-primary);
  background: var(--vdo-bg-main);
  transform: translateY(-1px);
}

.vdo-share-option img {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
}

.vdo-share-copy {
  grid-column: 1 / -1;
  width: 100%;
}

.vdo-share-line:hover {
  border-color: #06c755;
}

.vdo-share-telegram:hover {
  border-color: #229ed9;
}

.vdo-share-x:hover {
  border-color: #94a3b8;
}

.vdo-share-copy:hover {
  border-color: var(--vdo-accent);
}

.vdo-share-toggle:focus-visible,
.vdo-share-close:focus-visible,
.vdo-share-option:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .vdo-share-modal {
    align-items: center;
    padding: 20px;
  }

  .vdo-share-sheet {
    max-width: 430px;
    padding: 20px;
    border-bottom: 1px solid var(--vdo-border);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(16px) scale(0.98);
  }

  .vdo-share-modal.is-open .vdo-share-sheet {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 359px) {
  .vdo-share-options {
    grid-template-columns: 1fr;
  }

  .vdo-share-copy {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vdo-share-modal,
  .vdo-share-backdrop,
  .vdo-share-sheet,
  .vdo-share-option {
    transition: none;
  }
}

/* ==== META BAR: LIKE / SHARE / VIEWS ==== */
.vdo-meta-bar .vdo-share-component {
  flex: 0 0 auto;
}

@media (max-width: 639px) {
  .vdo-meta-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
  }

  .vdo-meta-bar .vdo-vote-btn,
  .vdo-meta-bar .vdo-share-component,
  .vdo-meta-bar .vdo-views {
    width: 100%;
    min-width: 0;
  }

  .vdo-meta-bar .vdo-vote-btn,
  .vdo-meta-bar .vdo-share-toggle,
  .vdo-meta-bar .vdo-views {
    width: 100%;
    min-width: 0;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 14px;
  }

  .vdo-meta-bar .vdo-share-toggle {
    display: inline-flex;
  }
}

@media (max-width: 359px) {
  .vdo-meta-bar {
    gap: 8px;
  }

  .vdo-meta-bar .vdo-vote-btn,
  .vdo-meta-bar .vdo-share-toggle,
  .vdo-meta-bar .vdo-views {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 13px;
  }
}

/* ==== ปุ่มเปิด/ปิดรายการเพิ่มเติม ==== */
.vdo-term-more {
  margin-top: 8px;
}

.vdo-term-more summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--vdo-border);
  border-radius: 6px;
  background: var(--vdo-bg-card);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.vdo-term-more summary::-webkit-details-marker {
  display: none;
}

.vdo-term-more summary::marker {
  content: "";
}

.vdo-term-more summary::after {
  content: "+";
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.vdo-term-more[open] summary::after {
  content: "−";
}

.vdo-term-more summary:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.vdo-term-more summary:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.vdo-term-more-close {
  display: none;
}

.vdo-term-more[open] .vdo-term-more-open {
  display: none;
}

.vdo-term-more[open] .vdo-term-more-close {
  display: inline;
}

.vdo-term-more-items {
  display: block;
  margin-top: 8px;
}

.vdo-tax-items .vdo-term-more-chips {
  width: 100%;
  margin-top: 0;
}

.vdo-tax-items .vdo-term-more-chips .vdo-term-more-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 639px) {
  .vdo-tax-items .vdo-term-more-chips .vdo-term-more-items {
    gap: 7px;
  }
}