.youtube-channel {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 0.0625rem solid var(--color-base-300, #e9ecef);
}

/* Header: YouTube logo + subscribe button. */
.youtube-channel__head {
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 0 20px;
}

.youtube-channel__logo {
  display: block;
  line-height: 0;
  color: var(--color-base-content, #282828);
}

.youtube-channel__logo svg {
  display: block;
  width: 126px;
  height: auto;
}

.youtube-channel__subscribe {
  position: absolute;
  right: 30px;
}

.youtube-channel__subscribe a {
  display: inline-block;
  z-index: 99;
  background: #ff0100;
  color: #fff;
  padding: 10px 25px;
  line-height: 18px;
  font-size: 14px;
  text-transform: uppercase;
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.youtube-channel__subscribe a:hover {
  background: var(--color-base-300, #ccc);
  color: var(--color-base-content, #555);
}

/* Desktop: player takes 2/3, video list 1/3 with vertical scroll. */
.youtube-channel__container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.youtube-channel__player {
  min-width: 0;
  aspect-ratio: 16 / 9;
  background-color: var(--color-base-200, #f2f2f2);
  background-position: center;
  background-size: cover;
  border-radius: 10px;
  overflow: hidden;
}

.youtube-channel__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* The list is absolutely positioned so it scrolls within the player height. */
.youtube-channel__grid {
  position: relative;
  min-width: 0;
}

.youtube-channel__grid ul {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.youtube-channel__grid li a {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.youtube-channel__grid li a:hover {
  background: var(--color-base-200, #f2f2f2);
}

.youtube-channel__thumb {
  flex: 0 0 42%;
  line-height: 0;
}

.youtube-channel__thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  display: block;
}

.youtube-channel__title {
  font-size: 13px;
  line-height: 1.3;
  color: var(--color-base-content, #282828);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.youtube-channel__grid ul::-webkit-scrollbar {
  width: 6px;
}

.youtube-channel__grid ul::-webkit-scrollbar-thumb {
  background: var(--color-base-300, #ccc);
  border-radius: 5px;
}

/* Mobile: stack, list becomes a horizontal scroller of cards. */
@media (max-width: 768px) {
  .youtube-channel__head {
    padding: 0 0 7px;
  }

  .youtube-channel__container {
    display: block;
  }

  .youtube-channel__player {
    width: 100%;
  }

  .youtube-channel__grid {
    position: static;
    margin-top: 12px;
  }

  .youtube-channel__grid ul {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 0 0 5px;
    gap: 12px;
  }

  .youtube-channel__grid li {
    flex: 0 0 160px;
  }

  .youtube-channel__grid li a {
    flex-direction: column;
    gap: 6px;
    padding: 0;
  }

  .youtube-channel__thumb {
    flex: none;
    width: 100%;
  }

  .youtube-channel__title {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .youtube-channel__grid ul::-webkit-scrollbar {
    height: 5px;
  }

  .youtube-channel__subscribe {
    bottom: 15px;
    right: 5px;
  }

  .youtube-channel__subscribe a {
    padding: 8px 18px;
    line-height: 22px;
    font-size: 14px;
  }
}
