:root {
  /* emulate YouTube brand */
  --page-background: #0f0f0f;
  --footer-background: #212121;
  --icon-button-color: #909090;
  --icon-button-background: rgba(33, 33, 33, 0.98);
  --icon-button-active-background: #444;
  --primary-text: white;
  --secondary-text: #aaa;
}

body {
  margin: 0;
  background-color: var(--page-background);
  color: var(--primary-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans",
    "Helvetica Neue", sans-serif;
}

ul {
  list-style: none;
  padding: 0;
}

.no-scrollbar {
  scrollbar-width: none; /* Firefox */
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.channel-list-layout {
  display: grid;
}

.channel-layout {
  display: grid;
  grid-template:
    "title" auto
    "video-list" auto / 1fr;
  padding: 0 1.5rem;
}
.channel-layout__video-list {
  grid-area: video-list;
}

.channel-name-link {
  font-size: 16px;
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.channel-name-link:hover {
  text-decoration: underline;
}

.scroll-btn {
  color: var(--icon-button-color);
  width: 40px;
  height: 40px;
  border-radius: 20px;
  border: none;
  background: var(--icon-button-background);
  box-shadow: 0 4px 4px rgb(0 0 0 / 30%), 0 0 4px rgb(0 0 0 / 20%);
}
.scroll-btn:active {
  background-color: var(--icon-button-active-background);
}
.channel-layout__scroll-left {
  z-index: 1;
  grid-area: video-list;
  align-self: center;
  justify-self: start;
  transform: translateX(-50%);
  opacity: 0;
}

.js-horizontal-scroll.has-backward .channel-layout__scroll-left {
  opacity: 1;
  cursor: pointer;
}

.channel-layout__scroll-right {
  z-index: 1;
  grid-area: video-list;
  align-self: center;
  justify-self: end;
  opacity: 0;
  transform: translateX(50%);
}

.js-horizontal-scroll.has-forward .channel-layout__scroll-right {
  opacity: 1;
  cursor: pointer;
}

.video-list-layout {
  display: grid;
  gap: 1rem;
  overflow-x: auto;
  grid-auto-flow: column;
  justify-content: start;
  scroll-snap-type: x mandatory;
}

.video-list-layout__item {
  scroll-snap-align: start;
}

.video-item-layout {
  width: clamp(200px, 30vw, 320px);
}

.video-title {
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 2px;
  font-size: 14px;
  text-decoration: none;
  color: inherit;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-title:hover {
  text-decoration: underline;
}

.video-publish-date {
  font-size: 12px;
  color: var(--secondary-text);
}

footer {
  color: var(--secondary-text);
  background-color: var(--footer-background);
  font-size: 14px;
  display: flex;
  padding: 0.5rem 1rem;
  justify-content: space-between;
}

.footer-link {
  color: var(--primary-text);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}
