/* ===== POPUP OVERLAY ===== */
#fanback {
    display: none;
    background: rgba(0, 0, 0, 0.75);
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* ===== POPUP BOX ===== */
#MorganAndMen {
    background: #fff;
    position: relative;
    margin: 5vh auto;
    width: 90%;
    max-width: 620px;
    min-height: 100px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: popupFadeIn 0.35s ease;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== NÚT ĐÓNG ===== */
#TheBlogWidgets {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.15);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
#TheBlogWidgets:hover {
    background: rgba(0,0,0,0.35);
}
#TheBlogWidgets::before,
#TheBlogWidgets::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}
#TheBlogWidgets::before { transform: rotate(45deg); }
#TheBlogWidgets::after  { transform: rotate(-45deg); }

#fan-exit {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

.remove-borda { display: none; }

/* ===== NỘI DUNG POPUP ===== */
.popup_content {
    padding: 20px;
    overflow: hidden;
}
.popup_content img {
    max-width: 100%;
    height: auto;
    display: block;
}
.popup_content iframe,
.popup_content video {
    max-width: 100%;
}

/* ===== RESPONSIVE ===== */
/* Tablet */
@media (max-width: 768px) {
    #MorganAndMen {
        width: 94%;
        margin: 3vh auto;
    }
    .popup_content {
        padding: 15px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    #MorganAndMen {
        width: 96%;
        margin: 2vh auto;
        border-radius: 6px;
    }
    .popup_content {
        padding: 12px;
    }
    #TheBlogWidgets {
        width: 28px;
        height: 28px;
    }
}

/* Màn hình rất nhỏ */
@media (max-width: 320px) {
    #MorganAndMen {
        width: 98%;
        margin: 1vh auto;
    }
}
