/* Thiết lập cho popup */
.ylm-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Màu nền mờ */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Đảm bảo popup luôn hiển thị trên các phần tử khác */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Hiệu ứng mở */
}

/* Thiết lập cho nội dung popup */
.ylm-popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 80%;
    width: 560px; /* Chiều rộng cố định của popup */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Hiệu ứng cho button close */
.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-popup:hover {
    background-color: #c0392b;
}

/* Khi popup hiện lên */
.ylm-popup.show {
    opacity: 1;
    visibility: visible;
}

/* Thiết kế cho iframe video */
.ylm-popup iframe {
    width: 100%;
    height: 315px;
    border: none;
    border-radius: 10px;
}

/* Style cho các link YouTube */
.ylm-media-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-color: #f5f5f5;
    margin: 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ylm-media-player:hover {
    transform: scale(1.05); /* Phóng to khi hover */
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
}

/* Style cho thumbnail */
.ylm-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Style cho tên video */
.ylm-media-player p {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}
/* Thiết lập cho popup */
.ylm-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Màu nền mờ */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Đảm bảo popup luôn hiển thị trên các phần tử khác */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Hiệu ứng mở */
}

/* Thiết lập cho nội dung popup */
.ylm-popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 80%;
    width: 560px; /* Chiều rộng cố định của popup */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Hiệu ứng cho button close */
.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-popup:hover {
    background-color: #c0392b;
}

/* Khi popup hiện lên */
.ylm-popup.show {
    opacity: 1;
    visibility: visible;
}

/* Thiết kế cho iframe video */
.ylm-popup iframe {
    width: 100%;
    height: 315px;
    border: none;
    border-radius: 10px;
}

/* Style cho các link YouTube */
.ylm-media-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-color: #f5f5f5;
    margin: 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ylm-media-player:hover {
    transform: scale(1.05); /* Phóng to khi hover */
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
}

/* Style cho thumbnail */
.ylm-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Style cho tên video */
.ylm-media-player p {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Layout cho các video thumbnail */
.ylm-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Hiển thị 4 item trên mỗi hàng */
    gap: 20px; /* Khoảng cách giữa các item */
    padding: 20px;
    justify-items: center; /* Căn giữa các item */
}

/* Style cho các link YouTube */
.ylm-media-player {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Đảm bảo ảnh không bị tràn */
}

/* Hiệu ứng khi hover */
.ylm-media-player:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
}

/* Style cho thumbnail */
.ylm-thumbnail {
    width: 100%; /* Làm thumbnail vừa với card */
    height: 160px; /* Đặt chiều cao cho thumbnail */
    object-fit: cover; /* Cắt ảnh để không bị méo */
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Style cho tên video */
.ylm-media-player p {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin: 0;
}


.ylm-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.ylm-media-player {
    cursor: pointer;
    max-width: 200px;
}

.ylm-thumbnail {
    width: 100%;
    height: auto;
}

#ylm-video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
}

.ylm-popup-content {
    position: relative;
    margin: 5% auto;
    width: 80%;
    max-width: 600px;
    background: #fff;
    padding: 20px;
}

#ylm-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
}

#ylm-video-player iframe {
    width: 100%;
    height: 400px;
}