body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.video-scroller {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px;
    overflow: hidden;
    width: 100%;
}

.scroll-btn {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
}

.video-container {
    display: flex;
    overflow-x: hidden; /* Hide scrollbar */
    width: calc(100% - 100px); /* Adjusting for button width */
}

.video-item {
    position: relative;
    flex: 0 0 auto; /* Prevent flex items from shrinking */
    width: 33.33%; /* Display three videos per row */
    margin-right: 20px; /* Space between videos */
    overflow: hidden;
}

.video-item img {
    width: 100%;
    height: auto;
    cursor: pointer;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: red;
    cursor: pointer;
    opacity: 100px; /* Start with opacity 0 */
    transition: opacity 0.3s ease; /* Smooth transition for opacity */
}

.video-item:hover .play-button {
    opacity: 1; /* Show play button on hover */
}

.video-player {
    display: none;
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    z-index: 1000;
    width: 700px; /* Set width to 500px */
    max-width: 100%; /* Ensure it doesn't exceed screen width */
    height: 500px; /* Set height to 400px */
    max-height: 100%; /* Ensure it doesn't exceed screen height */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Box shadow for depth */
}

#player {
    width: 100%; /* Ensure iframe takes full width */
    height: 100%; /* Ensure iframe takes full height */
}

#close-player {
    background-color: #000;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    margin-top: 10px;
}

@media (max-width: 1200px) {
    .video-item {
        width: 50%; /* Display two videos per row on smaller screens */
    }
}

@media (max-width: 768px) {
    .video-item {
        width: 100%; /* Display one video per row on mobile */
    }
}
