.playlist-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 0;
  background: linear-gradient(to bottom, rgba(41, 23, 114, 0.800) 0%, rgba(41, 23, 114, 0.298) 33.000001%, rgba(41, 23, 114, 0.800) 100%);
  padding: 4%;
  margin: 3% 3% 3% 0;
  height: -webkit-fill-available;
  border-radius: 16px;
}

.content-wrapper {
  display: flex;
  flex-direction: row;
  padding: 0 !important;
}

.content-wrapper .left-side {
  width: 40%;
  display: flex;
  align-items: center;
  padding-left: 16px;
}

.content-wrapper .right-side {
  padding-right: 16px;
  overflow: scroll;
  width: calc(100% - 500px);
}

.playlist-thumbnail {
  flex-shrink: 0;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.playlist-thumbnail .thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.playlist-title-container {
  margin-bottom: 12px;
}

.playlist-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--black-color);
  margin-bottom: 4px;
}

.playlist-language {
  font-size: 14px;
  color: var(--secondary-color);
}

.playlist-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--black-color);
  margin-bottom: 8px;
}

.playlist-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--secondary-color);
  margin-bottom: 16px;
}

.playlist-stats .separator {
  color: var(--border-color);
}

.section-separator {
  height: 1px;
  margin: 10px 0;
  background: var(--light-gray-color);
}

.playlist-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.playlist-actions .video-options {
  position: relative;
}

.playlist-button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 18px;
  background: var(--light-gray-color);
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.playlist-button:hover {
  background: var(--border-color);
}

.playlist-button.play-all {
  background: var(--black-color);
  color: var(--light-white-color);
}

.playlist-button.play-all:hover {
  color: var(--light-white-color);
  background: #333;
}

.playlist-description {
  color: var(--black-color);
  line-height: 1.5;
  max-width: 800px;
}

.playlist-description p {
  margin-bottom: 12px;
  font-size: 14px;
}

.playlist-videos .video-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px 0;
}

.video-details div {
  display: flex;
  align-items: center;
  gap: 0.5%;
}

.playlist-video {
  display: flex;
  flex-direction: row !important;
  gap: 16px;
  padding: 4px 16px;
  border-radius: 8px;
}

.playlist-video:hover {
  background-color: var(--light-white-color);

}

.playlist-video .thumbnail-container {
  max-width: 200px;
  width: 100%;
  flex-shrink: 0;
}

.playlist-video .video-info {
  flex: 1;
}

.recommended-playlists {
  margin-top: 30px;
  padding: 4px 16px;
}

.recommended-playlists .section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--black-color);
}

.playlists-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.playlist-card {
  position: relative;
  background-color: var(--white-color);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);

}

.playlist-card .playlist-thumbnail-container {
  width: 120px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

.playlist-thumbnail {
  position: relative;
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--light-gray-color);
}

.playlist-card .thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.playlist-card .playlist-info {
  flex: 1;
  padding: 0;
}

.info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.text-info {
  flex: 1;
}

.video-options {
  position: relative;
}

.view-playlist {
  font-size: 0.75rem;
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
}

.playlist-card .playlist-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--black-color);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card .title {
  line-height: 1.5rem;
}

.playlist-card .playlist-meta {
  font-size: 12px;
  color: var(--secondary-color);
  margin-bottom: 8px;
}

.playlist-card .view-course {
  font-size: 12px;
  color: var(--primary-color);
  text-decoration: none;
}

.playlist-card .course-progress {
  font-size: 12px;
  color: var(--secondary-color);
}

/* Modal Backdrop */
.backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  z-index: 999;
}

/* Modal */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  display: none;
  width: 90%;
  max-width: 560px;
  max-height: 665px;
  height: auto;
  background-color: var(--white-color);
  color: var(--black-color);
  border-radius: 10px;
  padding: 20px;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  transition: all 0.3s ease-in-out;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.modal h2 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
}

.modal p {
  font-size: 14px;
  color: var(--secondary-color);
  margin-top: 4px;
  line-height: 20px;
}

.modal-content {
  max-height: 511px;
  height: 100%;
  overflow-y: scroll;

}

.close-btn {
  font-size: 22px;
  color: var(--secondary-color);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
}

.close-btn:hover {
  color: var(--black-color);
}

.modal-section {
  margin-top: 20px;
}

.modal-section h3 {
  margin-bottom: 8px;
}

.modal-section a {
  color: var(--primary-color);
  text-decoration: none;
}

.modal-section a:hover {
  text-decoration: underline;
}

.stats-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  margin-top: 10px;
}

.stats-list li {
  margin-bottom: 8px;
  font-size: 14px;
}

.modal-buttons {
  display: flex;
  gap: 14px;
  margin-top: 20px;
}


.modal-buttons .share-btn,
.modal-buttons .report-btn {
  margin-top: 20px;
  width: 100%;
  padding: 10px;
  border: none;
  background-color: var(--light-gray-color);
  color: var(--black-color);
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.modal-buttons .share-btn:hover,
.modal-buttons .report-btn:hover {
  background-color: var(--border-color);
}

/* Dark Mode Overrides */
.dark-mode .modal {
  background-color: #212121;
  color: #d4d4d4;
}

.dark-mode .modal p,
.dark-mode .close-btn {
  color: #aaa;
}

.dark-mode .close-btn:hover {
  color: white;
}

.dark-mode .share-btn {
  background-color: #383838;
  color: white;
}

.dark-mode .share-btn:hover {
  background-color: #505050;
}

/* Responsive styles */
@media (max-width: 1200px) {

  .content-wrapper .left-side,
  .content-wrapper .right-side {
    width: 100%;
    padding: 0;
  }

  .playlist-header {
    margin: 2%;
  }

  .playlists-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 1050px) {
  .video-details div {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .content-wrapper .right-side {
    overflow: visible;
  }

  .content-wrapper {
    flex-direction: column;
  }

  .video-list {
    grid-template-columns: repeat(3, 1fr);
    padding: 0 !important;
  }

  .playlist-header {
    flex-direction: row;
    height: auto;
  }

  .playlists-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-details div {
    display: flex;
    align-items: center;
    flex-direction: row;
  }

  .playlist-video {
    flex-direction: column;
    padding: 4px 2%;
    gap: 8px;
  }

  .playlist-thumbnail {
    flex-shrink: inherit !important;
    width: 100%;
    background: transparent !important;
    margin-bottom: 8px;
  }

  .playlist-thumbnail .thumbnail {
    height: 100%;
  }

  .playlist-description p:not(:first-child) {
    display: none;
  }
}

@media (max-width: 700px) {
  .playlist-header {
    flex-direction: column;
  }

  .playlist-thumbnail {
    width: 100%;
  }
}

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

  .playlists-grid {
    grid-template-columns: 1fr;
  }

  .playlist-header {
    padding: 16px;
    gap: 16px;
  }

  .playlist-title {
    font-size: 20px;
  }

  .playlist-subtitle {
    font-size: 16px;
  }

  .playlist-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 500px) {
  .playlist-video .thumbnail-container {
    max-width: 160px;
  }

  .content-wrapper .video-list .video-card .channel-name,
  .content-wrapper .video-list .video-card .views {
    font-size: 12px !important;
  }

  .content-wrapper .video-list .video-card .title {
    font-size: 14px !important;
  }
}

@media (max-width: 460px) {
  .content-wrapper .video-list .video-card .channel-name {
    display: none;
  }
}

@media (max-width: 400px) {
  .video-list {
    grid-template-columns: 1fr;
  }

  .navbar {
    gap: 8px;
    padding: 8px;
  }

  .nav-section {
    gap: 8px;
  }
}