.video-board {
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: var(--theme-box-radius, 16px);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
  padding: 1.15rem 1.2rem 1.25rem;
  overflow: hidden;
}

html[data-theme-mode="dark"] .video-board {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

@media (max-width: 640px) {
  .video-board {
    padding: 0.9rem 0.75rem 1rem;
  }
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 560px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--theme-box-radius, 16px);
  overflow: hidden;
  cursor: pointer;
  background: color-mix(in srgb, var(--color-text, #1a1a1a) 8%, transparent);
  text-align: left;
}

.video-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.25s ease;
}

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

.video-thumb__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.video-thumb:hover .video-thumb__play {
  background: var(--color-primary, #ff6b00);
  transform: translate(-50%, -50%) scale(1.08);
}

.video-thumb__title {
  display: block;
  padding: 0.65rem 0.75rem 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
}

.video-thumb__desc {
  display: -webkit-box;
  padding: 0.3rem 0.75rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.4;
  color: color-mix(in srgb, var(--color-text, #1a1a1a) 68%, transparent);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-lightbox[hidden] {
  display: none;
}

.video-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 10, 15, 0.9);
  cursor: pointer;
}

.video-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 960px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.video-lightbox__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.video-lightbox__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-lightbox__caption {
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  max-width: 100%;
}

.video-lightbox__caption[hidden] {
  display: none;
}

.video-lightbox__close {
  position: absolute;
  top: -2.6rem;
  right: 0;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.video-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.video-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.video-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.28);
}

.video-lightbox__nav--prev {
  left: -3.4rem;
}

.video-lightbox__nav--next {
  right: -3.4rem;
}

@media (max-width: 700px) {
  .video-lightbox__nav--prev {
    left: 0.4rem;
  }
  .video-lightbox__nav--next {
    right: 0.4rem;
  }
}

body.video-lightbox-open {
  overflow: hidden;
}

.video-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.75rem;
  margin: 1.35rem 0 0.4rem;
  padding-top: 1.1rem;
}

.video-pagination__pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.video-pagination a,
.video-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.12));
  color: var(--color-text, #1a1a1a) !important;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none !important;
}

.video-pagination a:hover,
.video-pagination a:focus {
  border-color: var(--color-primary, #ff6b00);
  color: var(--color-primary, #ff6b00) !important;
  text-decoration: none !important;
}

.video-pagination .is-current {
  background: var(--color-primary, #ff6b00);
  border-color: var(--color-primary, #ff6b00);
  color: #fff !important;
}

.video-pagination .is-disabled {
  opacity: 0.38;
  cursor: default;
}

.video-pagination__gap {
  min-width: 1rem;
  border: 0;
  opacity: 0.55;
}
