.video-page {
  padding-top: 20px;
}

.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
  margin-bottom: 30px;
}

.video-player video,
.video-fallback {
  width: 100%;
  display: block;
  background: #000;
  border: 1px solid #2f2f2f;
}

.video-title {
  margin: 14px 0 12px;
  font-size: 24px;
  color: #fff;
  line-height: 1.3;
}

.video-info-box {
  margin-top: 18px;
  padding: 18px;
  background: #20242a;
  border: 1px solid #2e333b;
  border-radius: 10px;
}

.video-meta-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #aab2bb;
}

.video-description {
  font-size: 15px;
  line-height: 1.7;
  color: #e5e7eb;
  margin-bottom: 18px;
}

.info-row {
  margin-bottom: 14px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-label {
  display: inline-block;
  min-width: 95px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 8px;
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #2f3640;
  color: #e6eaf0;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.2;
  transition: 0.2s ease;
}

.badge:hover {
  background: #3a424d;
  color: #fff;
}

.badge-studio {
  background: #d39c1a;
  color: #111;
  font-weight: bold;
}

.badge-studio:hover {
  background: #e5ad22;
  color: #111;
}

.badge-small {
  font-size: 12px;
  padding: 5px 9px;
}

.sidebar {
  background: #1c1f24;
  border: 1px solid #2a2e35;
  border-radius: 12px;
  padding: 16px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2a2e35;
}

.sidebar-header .sidebar-icon {
  width: 17px;
  height: 17px;
  color: #f0b400;
  flex-shrink: 0;
}

.sidebar-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: bold;
  color: #d9dde2;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.side-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px;
  margin: 0 -8px 2px;
  border-radius: 8px;
  transition: background .15s ease;
}

.side-card:hover {
  background: #262a31;
}

.side-thumb {
  position: relative;
  width: 128px;
  min-width: 128px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.side-thumb img {
  width: 128px;
  height: 72px;
  object-fit: cover;
  background: #000;
  display: block;
  transition: transform .25s ease;
}

.side-card:hover .side-thumb img {
  transform: scale(1.06);
}

.side-duration {
  position: absolute;
  right: 5px;
  bottom: 5px;
  background: rgba(0, 0, 0, .8);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 4px;
}

.side-card-body {
  min-width: 0;
  padding-top: 2px;
}

.side-card h4 {
  font-size: 13.5px;
  line-height: 1.4;
  color: #dcdfe3;
  margin: 0;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-card:hover h4 {
  color: #f0b400;
}

/* Заготовка под рекламный баннер — используется в сайдбаре и
   при желании в других местах через templates/ad-slot.php */
.ad-slot {
  margin-bottom: 14px;
  border-radius: 8px;
  overflow: hidden;
}

.ad-slot-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: repeating-linear-gradient(
    135deg,
    #21252b,
    #21252b 10px,
    #1c1f24 10px,
    #1c1f24 20px
  );
  border: 1px dashed #3a4048;
  border-radius: 8px;
  color: #6b7280;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.video-recommended .grid {
  grid-template-columns: repeat(4, 1fr);
}

.embed-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid #2f2f2f;
}

.embed-player iframe,
.embed-player video,
.embed-player embed,
.embed-player object {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.video-screens {
  margin-top: 24px;
}

.video-screens h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.screens-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.screen-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
  border: 1px solid #333;
}

.screen-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: 0.3s ease;
}

.screen-item:hover img {
  transform: scale(1.05);
}

/* screens */
.video-screens {
  margin-top: 24px;
}

.video-screens h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.screens-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.screen-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
  border: 1px solid #333;
  padding: 0;
  cursor: pointer;
}

.screen-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.screen-item:hover img {
  transform: scale(1.05);
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 40px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-inner {
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 88vh;
  display: block;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.16);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.16);
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

@media (max-width: 900px) {
  .screens-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {
  .screens-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox {
    padding: 20px 10px;
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
  }
}

/* адаптив */
@media (max-width: 900px) {
  .screens-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {
  .screens-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1280px) {
  .video-layout {
    grid-template-columns: 1fr 290px;
  }

  .video-recommended .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .video-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    margin-top: 10px;
  }

  .video-recommended .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .video-title {
    font-size: 20px;
  }

  .video-info-box {
    padding: 14px;
  }

  .info-label {
    min-width: auto;
    display: block;
  }

  .side-thumb {
    width: 110px;
    min-width: 110px;
  }

  .side-thumb img {
    width: 110px;
    height: 62px;
  }

  .video-recommended .grid {
    grid-template-columns: 1fr;
  }
}

/* Промо-блок подписки на Telegram под плеером */
.tg-promo {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #1c2b38, #16232e);
  border: 1px solid #24435a;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 18px;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}

.tg-promo:hover {
  border-color: #2ea6de;
  transform: translateY(-1px);
}

.tg-promo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: #2ea6de;
}

.tg-promo-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: #9fb0bd;
}

.tg-promo-text strong {
  font-size: 15px;
  color: #fff;
}

.tg-promo-cta {
  flex-shrink: 0;
  background: #2ea6de;
  color: #08202c;
  font-weight: bold;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .tg-promo {
    flex-wrap: wrap;
  }

  .tg-promo-cta {
    width: 100%;
    text-align: center;
  }
}

/* Лайк/дизлайк на странице видео */
.video-vote {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.vote-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #222;
  border: 1px solid #333;
  color: #ccc;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.vote-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.vote-btn:hover {
  background: #2a2a2a;
  border-color: #444;
}

.vote-like.is-active {
  background: rgba(58, 168, 90, .18);
  border-color: #3aa85a;
  color: #6fd98a;
}

.vote-dislike.is-active {
  background: rgba(224, 85, 85, .18);
  border-color: #e05555;
  color: #f29b9b;
}

.vote-btn:disabled {
  opacity: .6;
  cursor: default;
}

@media (max-width: 576px) {
  .video-vote {
    margin-left: 0;
    width: 100%;
  }

  .vote-btn {
    flex: 1;
    justify-content: center;
  }
}