Hello study this html sript and after understanding everything tell me <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Video Popup with Ad</title>
    <style>
        /* General styling for dark theme */
        body, html {
            margin: 0;
            padding: 0;
            height: 100%;
            width: 100%;
            font-family: Arial, sans-serif;
            background-color: #121212;
            color: #ffffff;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            flex-direction: column;
        }

        /* Sticky ad container styling */
        .ad-container {
            position: -webkit-sticky;
            position: sticky;
            top: 0;
            width: 100%;
            text-align: center;
            background-color: #222;
            padding: 10px 0;
            z-index: 100;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        /* Close button for the ad and image */
        .ad-close-btn {
            position: absolute;
            top: 5px;
            right: 10px;
            color: white;
            background-color: red;
            padding: 5px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 20px;
            z-index: 101;
        }

        /* Image below the ad */
        .ad-image {
            width: 468px;
            height: auto;
            border-radius: 10px;
            margin-top: 10px;
        }

        /* Hide ad and image on close */
        .hidden {
            display: none;
        }

        /* Video thumbnails */
        .video-grid {
            display: flex;
            gap: 20px;
            margin-top: 50px;
            justify-content: center;
            flex-wrap: wrap;
            max-width: 100%;
        }

        .video-thumbnail {
            width: 350px;
            height: 200px;
            background-color: #333;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            border-radius: 10px;
            overflow: hidden;
        }

        .video-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 10px;
        }

        /* Popup styles */
        .popup {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            justify-content: center;
            align-items: center;
            z-index: 999;
        }

        .popup-content {
            background-color: #222;
            padding: 20px;
            width: 80%;
            max-width: 800px;
            text-align: center;
            position: relative;
            border-radius: 20px;
        }

        .popup-content video {
            width: 100%;
            height: auto;
            border-radius: 20px;
        }

        /* Close button for popup */
        .close-btn {
            position: absolute;
            top: -5px; /* Adjusted to move the button higher */
            right: 20px;
            color: white;
            font-size: 30px;
            cursor: pointer;
            border-radius: 50%;
            background: rgba(255, 0, 0, 0.8);
            padding: 10px;
            border: 2px solid white;
        }

        /* Ensure the ad stays on top */
        .ad-container, .ad-close-btn {
            z-index: 100;
        }

        /* Adjust for normal PC screen */
        .video-grid {
            max-width: 90%;
            margin: 50px auto;
        }

        .video-thumbnail {
            width: 350px;
            height: 200px;
        }
    </style>
</head>
<body>

    <!-- Ad Container with Close Button and Image -->
    <div class="ad-container" id="adContainer">
        <!-- Close Button -->
        <span class="ad-close-btn" onclick="closeAd()">✖</span>
        <!-- Ad -->
        <script type="text/javascript">
            atOptions = {
                'key': '39e3314bfd8b94e947a4e79f561a7818',
                'format': 'iframe',
                'height': 60,
                'width': 468,
                'params': {}
            };
        </script>
        <script type="text/javascript" src="//www.topcreativeformat.com/39e3314bfd8b94e947a4e79f561a7818/invoke.js"></script>
        <!-- Image -->
        <img src="https://media.discordapp.net/attachments/1017031795235098725/1290690511996325930/Untitled.png?ex=66feb235&is=66fd60b5&hm=9578b2220b3b91080b303ba8455ebb54a6a3b82171c3811aad4c589c887b0062&=&format=webp&quality=lossless&width=1440&height=316" alt="Ad Image" class="ad-image" id="adImage">
    </div>

    <!-- Video Thumbnails -->
    <div class="video-grid">
        <div class="video-thumbnail" onclick="openPopup('https://www.youtube.com/watch?v=Ny1tqGLktcM')">
            <img src="https://via.placeholder.com/350x200?text=Video+1" alt="Video 1">
        </div>
        <div class="video-thumbnail" onclick="openPopup('https://www.youtube.com/watch?v=Ny1tqGLktcM')">
            <img src="https://via.placeholder.com/350x200?text=Video+2" alt="Video 2">
        </div>
        <div class="video-thumbnail" onclick="openPopup('https://www.youtube.com/watch?v=Ny1tqGLktcM')">
            <img src="https://via.placeholder.com/350x200?text=Video+3" alt="Video 3">
        </div>
        <div class="video-thumbnail" onclick="openPopup('https://www.youtube.com/watch?v=Ny1tqGLktcM')">
            <img src="https://via.placeholder.com/350x200?text=Video+4" alt="Video 4">
        </div>
        <div class="video-thumbnail" onclick="openPopup('https://www.youtube.com/watch?v=Ny1tqGLktcM')">
            <img src="https://via.placeholder.com/350x200?text=Video+5" alt="Video 5">
        </div>
        <div class="video-thumbnail" onclick="openPopup('https://www.youtube.com/watch?v=Ny1tqGLktcM')">
            <img src="https://via.placeholder.com/350x200?text=Video+6" alt="Video 6">
        </div>
        <div class="video-thumbnail" onclick="openPopup('https://www.youtube.com/watch?v=Ny1tqGLktcM')">
            <img src="https://via.placeholder.com/350x200?text=Video+7" alt="Video 7">
        </div>
        <div class="video-thumbnail" onclick="openPopup('https://www.youtube.com/watch?v=Ny1tqGLktcM')">
            <img src="https://via.placeholder.com/350x200?text=Video+8" alt="Video 8">
        </div>
        <div class="video-thumbnail" onclick="openPopup('https://www.youtube.com/watch?v=Ny1tqGLktcM')">
            <img src="https://via.placeholder.com/350x200?text=Video+9" alt="Video 9">
        </div>
        <div class="video-thumbnail" onclick="openPopup('https://www.youtube.com/watch?v=Ny1tqGLktcM')">
            <img src="https://via.placeholder.com/350x200?text=Video+10" alt="Video 10">
        </div>
    </div>

    <!-- Popup Video Player -->
    <div class="popup" id="videoPopup">
        <div class="popup-content">
            <span class="close-btn" onclick="closePopup()">&times;</span>
            <video id="popupVideo" controls></video>
        </div>
    </div>

    <script>
        // Open popup and play the selected video
        function openPopup(videoSrc) {
            var popup = document.getElementById("videoPopup");
            var video = document.getElementById("popupVideo");

            popup.style.display = "flex";
            video.src = videoSrc;
            video.play();
        }

        // Close the popup
        function closePopup() {
            var popup = document.getElementById("videoPopup");
            var video = document.getElementById("popupVideo");

            popup.style.display = "none";
            video.pause();
            video.src = "";
        }

        // Close the ad and image
        function closeAd() {
            var adContainer = document.getElementById("adContainer");
            adContainer.classList.add("hidden");
        }
    </script>

</body>
</html>