* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.video-container {
    position: relative;
    background-color: #000;
    margin: 20px auto;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.ad-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out;
}

.ad-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.ad-content {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 90%;
}

.close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-color: #ff4444;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.close-btn:hover {
    background-color: #cc0000;
}

#jads-container {
    text-align: center;
}

@media (max-width: 900px) {
    .video-container {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4/3;
    }

    .ad-content {
        padding: 15px;
    }

    .close-btn {
        width: 35px;
        height: 35px;
        font-size: 24px;
        top: -12px;
        right: -12px;
    }
}
