.youtube-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  cursor: pointer;
  margin: 1em 0;
}

.youtube-embed img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.youtube-embed:hover img {
  opacity: 0.8;
}

.youtube-embed .play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 68px;
  height: 48px;
  background-color: rgba(255, 0, 0, 0.8);
  border-radius: 14px;
  transition: background-color 0.3s;
  pointer-events: none;
}

.youtube-embed:hover .play-button {
  background-color: rgba(255, 0, 0, 1);
}

.youtube-embed .play-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 11px 0 11px 19px;
  border-color: transparent transparent transparent #fff;
}

.youtube-embed .yt-notice {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 30px);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 4px;
  text-align: center;
  pointer-events: auto;
  max-width: 90%;
}

.youtube-embed .yt-notice a {
  color: #8ab4f8;
  text-decoration: underline;
}

.youtube-embed .yt-notice a:hover {
  color: #fff;
}

.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}