/* --- 🎥 Video Modal Main Container --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 15, 0.85); /* Premium Dark Glass Look */
    backdrop-filter: blur(15px);
    animation: fadeIn 0.4s ease;
}

/* Modal එක මැදට ගන්න wrapper එක */
.modal-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 20px;
}

/* --- 📦 Modal Content Box (PC Optimized) --- */
.modal-content {
    background: #ffffff;
    width: 95%; 
    max-width: 880px; /* PC එකේදී ඕනෑවට වඩා ලොකු වෙන්නෙ නැති වෙන්න limit කළා */
    border-radius: 30px;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

/* --- ❌ Close Button --- */
.close-circle {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    border: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    color: #ff608c;
    cursor: pointer;
    z-index: 100;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-circle:hover {
    background: #ff608c;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* --- 📺 Video Section (16:9 Ratio) --- */
.video-container {
    width: 100%;
    background: #000;
    position: relative;
    padding-top: 56.25%; /* YouTube Ratio එක හරියටම තියාගන්න */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --- 📝 Info Box Section --- */
.modal-info-box {
    padding: 30px 40px;
    background: #fff;
    border-top: 1px solid #f5f5f5;
}

#modalTitle {
    font-size: 22px;
    color: #1a1a1a;
    font-weight: 800;
    margin-bottom: 18px;
    line-height: 1.3;
}

/* Avatar & Channel Details */
.modal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff5f7;
    padding: 10px 20px;
    border-radius: 50px;
    width: fit-content;
    margin-bottom: 20px;
}

.modal-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffccd5;
}

.modal-channel-name {
    font-size: 15px;
    font-weight: 700;
    color: #444;
}

.modal-stats {
    font-size: 12px;
    color: #ff608c;
    font-weight: 600;
    margin-left: 5px;
}

/* Description area */
.modal-description {
    background: #fafafa;
    padding: 20px;
    border-radius: 15px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    border-left: 4px solid #ffccd5;
    max-height: 120px;
    overflow-y: auto;
}

/* --- ✨ Animations --- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { 
    from { transform: translateY(60px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}

/* --- 📱 Mobile Responsiveness --- */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-width: none;
    }
    .modal-wrapper {
        padding: 0;
    }
    .modal-info-box {
        padding: 25px 20px;
    }
    #modalTitle {
        font-size: 18px;
    }
    .close-circle {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}