.single-reel-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.single-reel-container::-webkit-scrollbar {
  display: none;
}

.video-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  max-width: 100%;
  margin: 20px auto;
  /* position: relative; */
}

.video-item {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 2;
  width: 100vw;
  max-width: 313px;
  height: calc(100vh - 66px);
  scroll-snap-align: start;
  margin-bottom: 5px;
  transform: translateX(0);
  will-change: transform;
}

.video-item video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
  border-radius: 5px;
}

.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-weight: bold;
}

.video-description-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  padding-bottom: 60px;
  color: white;
  z-index: 2;
  box-sizing: border-box;
  pointer-events: none;
}

.author-info-reels-overlay {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.author-image-reels-overlay {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 10px;
}

.author-handle-overlay {
  font-size: 13px;
  margin: 0;
  font-weight: bold;
  color: #fff !important;
}

.video-title-overlay {
  font-size: 15px;
  margin: 5px 0 10px;
}

.video-title-overlay {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
}

.video-title-reels {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
}

.video-description-text-overlay {
  margin-top: 10px;
  font-size: 14px;
  color: blue;
  text-decoration: underline;
  margin-bottom: 10px;
  pointer-events: all;
  cursor: pointer;
}

.video-description-card {
  flex: 1;
  max-width: calc(100% - 500px);
  height: calc(100vh - 140px);
  padding: 15px;
  background: #fff;
  border-radius: 8px;
  border: 0.1px solid rgba(0, 0, 0, 0.103);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 5px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  opacity: 0; /* Start invisible */
  transform: scale(1); /* Initial scale */
  will-change: opacity, transform; /* Optimizes animations */
}

.description-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.close-description-icon {
  cursor: pointer;
  font-size: 24px;
  padding: 5px 10px;
  transition: transform 0.2s;
}

.close-description-icon:hover {
  transform: scale(1.1);
}

.video-title-reels {
  margin-top: 0;
}

/* Scrollable Content Area */
.scrollable-content-wrapper {
  flex: 1;
  padding-right: 8px;
  padding: 10px;
  background-color: #eeeeee;
  margin-top: 15px;
  min-height: 0;
  flex-direction: column;
  border-radius: 10px;
  overflow-y: auto;
}

/* Styling Scrollbar */
.scrollable-content-wrapper::-webkit-scrollbar {
  width: 6px;
}

.scrollable-content-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.scrollable-content-wrapper::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.scrollable-content-wrapper::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.related-container {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.related-content,
.related-course {
  width: 48%;
  background-color: #f8f8f8;
  padding: 10px;
  border-radius: 5px;
}

.related-container h4 {
  margin-top: 0;
}

.course-card-plugin {
  display: block;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  width: 100%;
  background-color: #fff;
}

.course-thumbnail-plugin {
  width: auto;
  height: 230px;
}
.course-thumbnail-plugin img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
}

.course-details-plugin {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 20px;
  width: 80%;
  height: 45%;
}

.course-group-plugin {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #666;
}

.course-title-plugin {
  font-size: 18px;
  font-weight: bold;
  margin: 0 !important;
  line-height: 1.5;
  min-height: calc(1.5em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.course-title-plugin a {
  color: #000000;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.course-meta-plugin,
.course-time-plugin,
.course-group-plugin {
  font-size: 12px;
  color: #0011ff;
}

.course-meta-plugin {
  display: flex;
  align-items: center;
  gap: 3px;
}

.course-meta-plugin .course-author-plugin {
  font-weight: bold;
}

/* CONTENT CARD  */
.content-card-plugin {
  display: flex;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  width: 100%;
  margin-bottom: 5px;
  background-color: #fff;
}

.content-thumbnail-plugin {
  width: 150px;
  height: auto;
}
.content-thumbnail-plugin img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
}

.content-details-plugin {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 20px;
  width: 80%;
  justify-content: space-between;
}

.content-group-plugin {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #666;
}

.content-title-plugin {
  font-size: 14px;
  font-weight: bold;
  margin: 0 !important;
}

.content-title-plugin a {
  color: #000000;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.content-meta-plugin,
.content-time-plugin {
  font-size: 12px;
  color: #888;
}

.content-meta-plugin {
  display: flex;
  align-items: center;
  gap: 3px;
}

.content-meta-plugin .content-author-plugin {
  font-weight: bold;
}

.author-thumbnail {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 5px;
}

.author-info-reels {
  display: flex;
  align-items: center;
  margin-top: 0px;
}

.author-image-reels {
  margin-right: 10px;
  border-radius: 50%;
  width: 30px;
  height: 30px;
}

.author-reels-name {
  color: #888888 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}
.author-info-reels p {
  margin: 0;
  font-size: 11px;
  color: #888;
}

.video-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
}

.fab-container {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  z-index: 1000;
}

.fab-scroll {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #2c3e50, #4a6491);
  border-radius: 50%;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.fab-scroll:hover {
  background: linear-gradient(135deg, #19232e, #324463);
}

.fab-up {
  display: none;
  margin-bottom: 10px;
}

.fab-down {
  margin-top: 10px;
}

.reels-grid {
  display: flex;
  gap: 15px;
}

.reel-item {
  position: relative;
  width: 20%;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.reel-item:hover {
  transform: scale(1.05);
}

.reel-thumbnail {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.reel-video {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.title-clamp {
  margin: 10px 0 0;
  font-size: 15px !important; /* Bisa ubah ke 12px jika terlalu kecil */
  font-weight: bold;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Video Description Text */
.video-description-reels {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.read-more,
.read-less {
  color: #00f;
  cursor: pointer;
  text-decoration: underline;
}

#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  padding: 10px 20px;
  margin-top: 10px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  transform: translateY(20px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .single-reel-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 97vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #000;
    margin: 0;
    z-index: 9999;
  }

  .video-description-card {
    display: none;
  }

  .video-item {
    width: 100vw;
    height: 100vh;
    background-color: #333;
    overflow: hidden;
  }

  .video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .fab-container {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 10000;
  }

  .reels-grid {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    padding: 10px;
    scroll-snap-type: x mandatory;
  }

  .reel-item {
    flex: 0 0 auto;
    width: 40%;
    scroll-snap-align: center;
  }

  .reel-thumbnail {
    height: 200px;
  }

  .reel-title {
    font-size: 14px;
  }

  .fab-scroll {
    display: none;
  }
}
