/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 380px;
  background: linear-gradient(90deg, #0052bf, #00b0ff);
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.main-layout::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(91, 155, 213, 0.1) 0%,
    rgba(68, 114, 196, 0.2) 50%,
    rgba(31, 56, 100, 0.1) 100%
  );
}

/* Left Side - Video List */
.video-list-side {
  color: white;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 380px;
  overflow: hidden;
}

.video-menu {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding-right: 15px;
  margin-top: 20px;
  padding-left: 10px;
}

.video-menu::-webkit-scrollbar {
  width: 8px;
}

.video-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.video-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.video-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.video-menu li {
  margin-bottom: 20px;
  cursor: pointer;
  padding: 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
}

.video-menu li:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
  border-color: rgba(255, 255, 255, 0.3);
}

.video-menu li.active {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: white;
  font-weight: 600;
  transform: translateX(10px);
}

.video-thumbnail {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
}

.video-menu li:hover .play-icon {
  background: rgba(255, 255, 255, 0.9);
  color: #4472c4;
  transform: translate(-50%, -50%) scale(1.1);
}

.video-details {
  flex: 1;
  min-width: 0;
}

.video-details h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: white;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-details p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Right Side - Video Player */
.video-player-side {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.video-player-container {
  width: 100%;
  padding: 20px;
  position: relative;
}

.video-player {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  border-radius: 12px;
  overflow: hidden;
}

.video-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.video-info {
  margin-top: 20px;
  text-align: center;
}

.video-info h3 {
  color: #4472c4;
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.video-info p {
  color: #666;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Decorative Elements */
.video-player-container::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 25px;
  z-index: -1;
}

/* Responsive Design */
@media (max-width: 1024px) {
  body {
    overflow: auto;
  }

  .main-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 50vh 50vh;
    height: 100vh;
  }

  .video-list-side {
    padding: 30px;
    height: 50vh;
  }

  .video-menu {
    margin-top: 10px;
  }

  .video-menu li {
    margin-bottom: 15px;
    padding: 12px;
  }

  .video-player-side {
    padding: 30px;
    height: 50vh;
  }
}

@media (max-width: 768px) {
  .section-video {
    display: none;
  }

  .main-layout {
    grid-template-rows: 40vh 60vh;
  }

  .video-list-side {
    padding: 20px;
    height: 40vh;
  }

  .video-player-side {
    padding: 20px;
    height: 60vh;
  }

  .video-menu li {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 15px;
  }

  .video-thumbnail {
    width: 100%;
    height: 80px;
  }

  .video-details h4,
  .video-details p {
    white-space: normal;
    text-align: center;
  }

  .video-player-container {
    max-width: 100%;
    padding: 15px;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}
