/* Overall container for the YouTube card */
.card-youtube-card {
  border-radius: 12px;
  padding: 0;
  max-width: 400px;
  background-color: #ffffff;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Hover state for the card with a subtle lift */
.card-youtube-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Thumbnail wrapper with the dividing line */
.card-youtube-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  height: 0;
  background-color: #000;
  border-bottom: 1px solid #e9e9e9; /* The line is subtle by default */
  transition: border-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Add a transition for the border color */
}

/* Make the border line darker on hover, in sync with the card's animation */
.card-youtube-card:hover .card-youtube-thumbnail {
  border-bottom-color: #d0d0d0;
}

/* Thumbnail image styling */
.card-youtube-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Play button centered over the thumbnail */
.card-youtube-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

/* Hover state for the play button */
.card-youtube-thumbnail:hover .card-youtube-play-button {
  background: rgba(255, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.08);
}

/* Duration label */
.card-youtube-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 13px;
  padding: 3px 7px;
  border-radius: 4px;
  font-weight: 500;
}

/* Information section below the thumbnail */
.card-youtube-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
}

/* Title styling */
.card-youtube-title {
  font-size: 17px;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Author name styling */
.card-youtube-author {
  font-size: 14px;
  color: #7f8c8d;
  font-weight: 500;
}