  #videoPlayer {
    height: auto;
    width: auto;
    max-height: 600px;   /* ← adjust to desired size */
    max-width: 100%;     /* optional */
    display: block;
  }
.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.thumb {
    width: 200px;
    /* fixed width */
    cursor: pointer;
    text-align: center;
}

.thumb img {
    width: 100%;
    height: 120px;
    /* fixed height */
    object-fit: cover;
    /* ensures image fills container */
    background-color: #ccc;
    /* placeholder background if image missing */
    border-radius: 5px;
    display: block;
}

.video-info {
    margin-top: 5px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-title {
    font-weight: bold;
    font-size: 20px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 510px;
    /* prevent long titles from breaking layout */
}

.thumbnail-title {
    font-weight: bold;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 380px;
    /* prevent long titles from breaking layout */
}

.length-badge {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

.video-wrapper {
    display: none;
    position: relative;
    width: 640px;
    margin-top: 20px;
    padding-bottom: 20px;
}

.close-btn {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #e91e63;
    color: white;
    border: none;
    padding: 7px 10px;
    font-size: 16px;
    border-radius: 50%;
    cursor: pointer;
}

.like-bar {
    margin-top: 10px;
    font-size: 18px;
}

/* Fade animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.video-description {
    margin: 8px 0 14px 0;
    font-size: 15px;
    line-height: 1.4;
    color: #444;
    white-space: pre-wrap;
    /* preserve line breaks */
}

.description-box {
    margin: 8px 0 14px 0;
    max-width: 650px;
}

.video-description {
    color: #444;
    white-space: pre-wrap;
    line-height: 1.4;
    font-size: 15px;

    /* collapsed mode */
    max-height: 70px;
    overflow: hidden;
    /* position: relative; */
}

/* Faded bottom gradient when collapsed */
.video-description.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(to bottom, transparent, white);
}

/* Show More button */
.toggle-description {
    display: inline-block;
    color: #0077ff;
    cursor: pointer;
    font-size: 14px;
}

.toggle-description:hover {
    text-decoration: underline;
}