/* ================= MAIN VIDEO ================= */
.main-video iframe {
  width: 100%;
  height: 500px;
  border-radius: 12px;
}

/* ================= VIDEO LIST / PLAYLIST ================= */
.video-list {
  max-height: 180vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: sticky;
  top: 20px;
  padding-right: 5px;
}

/* Scrollbar */
.video-list::-webkit-scrollbar {
  width: 6px;
}
.video-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

/* Video item */
.video-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}

.video-item img {
  width: 150px;
  height: 85px;
  border-radius: 6px;
}

.video-item:hover {
  background: #eee;
}

.video-item.active {
  background: #e6e6e6;
}

/* ================= TITLES & META ================= */
.main-video-title {
  color: #0f0f0f;
  font-size: 1.4rem;
  font-weight: 700;
}

.video-title {
  font-size: 20px;
  font-weight: 600;
  color: #0f0f0f;
  margin-top: 5px;
}

.inner_content h2 {
  font-size: 1.3rem;
}

/* ================= CHANNEL META ================= */
.top-video .yt-channel img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.top-video .yt-meta h1 {
  font-size: 1.4rem;
}

.top-video .yt-meta p {
  margin-top: 3px;
  font-size: 14px;
  color: #666;
}

/* ================= TAGS ================= */
.video-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tag {
  background: #f1f1f1;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  color: #0f0f0f;
  text-transform: capitalize;
}

.tag:hover {
  background: #cacaca;
  color: #000;
  cursor: pointer;
}

/* ================= MOBILE SHORTS ================= */
.youtube-short-mobile {
  display: none;
}

.youtube-short-mobile .gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 10px;
}

.youtube-short-mobile .card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
}

.youtube-short-mobile .card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.youtube-short-mobile .short-title {
  font-size: 13px;
  padding: 6px;
  line-height: 1.3;
  color: #000;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= LONG VIDEO (MOBILE STYLE) ================= */
.long-video-item {
  display: block;
  background: #f7f7f7;
  border-radius: 6px;
}

.long-video-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.long-video-item p {
  margin: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= SHORT VIDEO BLOCK ================= */
.video-block {
  display: flex;
  flex-direction: column;
}

.short-video-wrapper {
  width: 100%;
  aspect-ratio: 9 / 16;
}

.short-video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.short-title-name {
  margin: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: #0f0f0f;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================= BUTTON ================= */
#readMoreBtn {
  margin: 10px;
}

/* ================= MOBILE ================= */
@media (max-width: 767px) {

  .video-list,
  .youtube-short {
    display: none;
  }

  .youtube-short-mobile {
    display: block;
  }

  .inner_content {
    padding: 10px;
  }

  .top-video .yt-channel img {
    margin-left: 7px;
  }

  .tag {
    padding: 5px 7px;
  }

  /* Main video ratio */
  .main-video.is-short iframe {
    aspect-ratio: 9 / 16;
    height: 580px !important;
  }

  .main-video.is-long iframe {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .main-video iframe {
    border-radius: 6px;
  }

  /* Limit shorts */
  .youtube-short .gallery .card:nth-child(n+5) {
    display: none;
  }
}

/* ================= TABLET ================= */
@media (min-width: 768px) and (max-width: 1024px) {

  .video-item {
    display: block;
    padding: 0;
    margin-bottom: 15px;
    background: #f7f7f7;
    border-radius: 6px;
    overflow: hidden;
  }

  .video-item img {
    width: 100% !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 0;
  }

  .video-item p {
    margin: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }

  .main-video.is-short iframe {
    aspect-ratio: 9 / 16;
    height: 610px !important;
  }

  .main-video.is-long iframe {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .video-list {
    max-height: 95vh;
  }
}