.video-list-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.video-card {
  background: #11111100;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.video-card a {
  color: white;
  text-decoration: none;
  display: block;
}

.thumbnail {
    width: 100%;              /* full container width */
    aspect-ratio: 4 / 3;      /* width:height = 4:3 → height = 3 units */
    overflow: hidden;          /* clip overflow from object-fit */
    border-radius: 8px;        /* optional rounded corners */
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* fill container while keeping ratio, crop if needed */
    display: block;
}

.thumbnail .duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
}

.video-info {
    display: flex;
    align-items: flex-start;
    gap: 10px; /* space between profile pic and text */
    padding: 10px;
}

.channel-profile .profile-pic {
    width: 30px;           /* small like YouTube */
    height: 30px;
    border-radius: 50%;    /* circular */
    object-fit: cover;     /* maintain aspect ratio */
}

.video-text {
    flex: 1;               /* take remaining space */
    overflow: hidden;
}

.video-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;    /* truncate if too long */
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    font-size: 13px;
    color: #aaa;
    margin-top: 4px;
    margin-bottom: 4px;
}

.channel-name {
    font-size: 13px;
    color: #aaa;
    margin: 2px 0 0 0;      /* small gap under title */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile / phone styles */
@media (max-width: 768px) {
  .video-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0px;
    padding: 0px;
  }
  .thumbnail {
    border-radius: 0px;        /* optional rounded corners */
  }
  .video-card {
    border-radius: 0px;
  }
}