/*
🎬 Video playlist UI Design like Skillshare With Vanilla JavaScript
👨🏻‍⚕️ By: Coding Design

You can do whatever you want with the code. However if you love my content, you can subscribed my YouTube Channel
🌎link: www.youtube.com/codingdesign
*/

:root {
  --primary: linear-gradient(to bottom right, #500057, #0053ee);
  --secondary: gold;
  --text: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background-image: var(--primary);
  color: var(--text);
  overflow-x: hidden; /* Remove horizontal scroll */
  overflow-y: scroll; /* Add vertical scroll */
  font-family: 'Montserrat', sans-serif; /* Apply a new font */
  display: flex;
  align-items: center;
}

.container {
  width: 100vw;

  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 1rem;

  padding: 5rem 1rem 0.5rem; /* Adjust the padding-top to push content down */
  text-transform: capitalize;
}

@media screen and (max-width: 990px) {
  .container {
    grid-template-columns: 1fr;
  }
}

.main-video,
.video-playlist {
  width: 100%;
  height: 30rem;
}

.main-video .title {
  margin-top: 1rem;
}

.video-playlist .title {
  padding-left: 1rem;
}

.video-playlist > p {
  padding: 1rem;
  color: var(--secondary);
}

.video-playlist .videos {
  height: 70%;
  overflow-y: auto;
}

.video-playlist .videos::-webkit-scrollbar {
  width: 0.4rem;
  border-radius: 0.4rem;
  background-color: #0005;
}

.video-playlist .videos::-webkit-scrollbar-thumb {
  border-radius: 0.4rem;
  background-color: #fff;
}

.video-playlist .videos .video {
  position: relative;
  width: 100%;
  height: 4rem;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 0 1rem;
  margin-top: 0.1rem;
  cursor: pointer;

  border-radius: 0.5rem;
}

.video-playlist .videos .video:hover {
  background-color: #0003;
}

.video-playlist .videos .video.active {
  background-color: #0003;
  color: var(--secondary);
}

.main-video video {
  width: 100%;
  border-radius: 0.5rem;
}

.video img {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);

  width: 1.5rem;
  height: 1.5rem;

  filter: invert(100%);
}

.video-playlist .videos .video.active img {
  filter: invert(100%) sepia(100%) saturate(2000%) hue-rotate(360deg);
}

.video p {
  margin-left: 2.5rem;
}

.video h3 {
  width: 23rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  font: 100 1rem sans-serif;
  padding: 0 0.5rem;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  list-style: none;
  text-decoration: none;
  scroll-behavior: smooth;
}

:root {
  --bg-color: #ffffff;
  --text-color: #22100d;
  --second-color: #685f78;
  --main-color: #5e2db9;
  --big-font: 3.8rem;
  --h2-font: 2.6rem;
  --p-font: 1.1rem;
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0; /* Change right: 0 to left: 0 */
  z-index: 1000;
  display: flex;
  justify-content: center; /* Add center alignment */
  background: rgba(255, 255, 255, 0.9); /* Apply glass morphism effect */
  backdrop-filter: blur(5px); /* Increase blur to 5px */
  padding: 1rem;
  transition: all 0.4s ease;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
}

header .logo {
  display: flex;
  align-items: center;
  justify-content: center; /* Add center alignment */
  flex: 1; /* Add flex: 1 to expand the logo */
}

header .logo img {
  height: auto;
  max-width: 100%;
}
