<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Movies</title>
    <link rel="icon" href="fire.png" type="image/png">
    <style>
        body {
            margin: 0;
            padding: 0;
            background: url('background.jpg') no-repeat center center fixed;
            background-size: cover;
            font-family: Arial, sans-serif;
            color: white;
        }

        .search-container {
            position: fixed;
            top: 10px;
            right: 20px;
            z-index: 10;
        }

        .search-container input {
            padding: 10px;
            font-size: 16px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        .movies-container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 20px;
            padding: 20px;
            margin-top: 100px; /* move below search bar */
        }

        .movie {
            display: flex;
            align-items: center;
            background: rgba(255, 255, 255, 0.1);
            padding: 10px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            transition: transform 0.3s, box-shadow 0.3s;
            cursor: pointer;
            width: 200px; /* Adjusted size */
            text-align: center;
            position: relative; /* For positioning info box */
        }

        .movie:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
        }

        .movie img {
            width: 100px;
            height: 150px;
            border-radius: 10px;
            margin-bottom: 10px;
        }

        .movie span {
            font-size: 18px;
        }

        .movie-info {
            display: none;
        }

        /* Modal style */
        #videoModal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 9999;
            justify-content: center;
            align-items: center;
        }

        #videoModal div {
            position: relative;
            width: 80%;
            max-width: 800px;
            background: #000;
            border-radius: 10px;
            overflow: hidden;
        }

        #videoModal iframe {
            width: 100%;
            height: 450px;
            border: none;
        }

        #videoModal button {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #fff;
            color: #000;
            border: none;
            border-radius: 5px;
            padding: 5px 10px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <!-- Search bar -->
    <div class="search-container">
        <input type="text" id="search" placeholder="Search movies..." oninput="filterMovies()">
    </div>

    <div class="movies-container" id="movies">
        <div class="movie" onmouseover="showInfo(this, 'Terrifier 3', '6.5', '2024', 'საშინელება, კრიმინალური', 'რეჟისორი: Damien Leone', 'სერიის მესამე ნაწილი, რომელიც არტ კლოუნის ახალი სისხლიანი თავგადასავლებს გვიყვება.')"
            onmouseout="hideInfo(this)" onclick="showMovie('https://drive.google.com/file/d/1r1oGq0tE2tTOmlKXmDVSxAl--nI5Gnbn/preview')">
            <img src="terrifer3.jpg" alt="Terrifier 3">
            <span>Terrifier 3 ქართულად</span>
            <div class="movie-info"></div>
        </div>
        <div class="movie" onmouseover="showInfo(this, 'Mufasa: The Lion King', '6.7', '2024', 'ანიმაციური, სათავგადასავლო, საოჯახო', 'რეჟისორი: Barry Jenkins', 'ლეგენდარული მეფის, მუფასას წარმოშობის ამბავი.')"
            onmouseout="hideInfo(this)" onclick="showMovie('https://drive.google.com/file/d/1ECQ6dncykLv1tFg8ziaHaqz68qcCIpIP/preview')">
            <img src="mufasa.jpg" alt="Mufasa: The Lion King">
            <span>Mufasa ქართულად</span>
            <div class="movie-info"></div>
        </div>
        <div class="movie" onmouseover="showInfo(this, 'Venom 3', '6.2', '2024', 'სათავგადასავლო, ფანტასტიკა, მოქმედება', 'რეჟისორი: Kelly Marcel', 'ვინომის და ედი ბროკის ახალი ფანტასტიკური ბრძოლები.')"
            onmouseout="hideInfo(this)" onclick="showMovie('https://drive.google.com/file/d/1H5kodHbJoqgYTxeBtq5mPGm9Mr6XHQtm/preview')">
            <img src="venom.jpg" alt="Venom 3">
            <span>Venom 3 ქართულად</span>
            <div class="movie-info"></div>
        </div>
        <div class="movie" onmouseover="showInfo(this, 'Your Fault', '5.3', '2024', 'დრამა, მისტიკა', 'რეჟისორი: Domingo González', 'მარტოხელა კატა, რომელიც ნავზე სხვადასხვა ცხოველებთან ერთად ერთიანდება.')"
            onmouseout="hideInfo(this)" onclick="showMovie('https://drive.google.com/file/d/1tp4mLiMhr8KEIrm7loD9YmbTttP36INL/preview')">
            <img src="yourfault.jpg" alt="Your Fault">
            <span>Your Fault ქართულად</span>
            <div class="movie-info"></div>
        </div>
        <div class="movie" onmouseover="showInfo(this, 'RedOne', '6.5', '2024', 'კომედია, მოქმედება, საშობაო', 'რეჟისორი: Jake Kasdan', 'სათავგადასავლო და კომედიური ამბავი საშობაო სამყაროზე.')"
            onmouseout="hideInfo(this)" onclick="showMovie('https://drive.google.com/file/d/1sxqmkuGxwoWJAgcYbNKbA54QYUWkjj5x/preview')">
            <img src="redone.jpg" alt="RedOne">
            <span>RedOne ქართულად</span>
            <div class="movie-info"></div>
        </div>
    </div>

    <!-- Modal for movie -->
    <div id="videoModal">
        <div>
            <iframe id="videoFrame" src="" allow="autoplay" allowfullscreen></iframe>
            <button onclick="closeModal()">Close</button>
        </div>
    </div>

    <script>
        // Movie search functionality
        function filterMovies() {
            const searchValue = document.getElementById('search').value.toLowerCase();
            const movies = document.querySelectorAll('.movie');
            movies.forEach(movie => {
                const title = movie.querySelector('span').textContent.toLowerCase();
                movie.style.display = title.includes(searchValue) ? 'flex' : 'none';
            });
        }

        // Show movie in modal
        function showMovie(url) {
            const modal = document.getElementById('videoModal');
            const frame = document.getElementById('videoFrame');
            frame.src = url;
            modal.style.display = 'flex';
        }

        // Close the modal
        function closeModal() {
            const modal = document.getElementById('videoModal');
            const frame = document.getElementById('videoFrame');
            frame.src = ''; // Stop video
            modal.style.display = 'none';
        }

        // Show additional movie information on hover
        function showInfo(element, title, rating, year, category, director, description) {
            const infoBox = element.querySelector('.movie-info');
            infoBox.innerHTML = `
                <div style="background: rgba(0, 0, 0, 0.8); padding: 10px; border-radius: 5px; text-align: left;">
                    <strong>${title}</strong><br>
                    <strong>IMDb:</strong> ${rating}<br>
                    <strong>წელი:</strong> ${year}<br>
                    <strong>კატეგორია:</strong> ${category}<br>
                    <strong>${director}</strong><br>
                    <small>${description}</small>
                </div>
            `;
            infoBox.style.display = 'block';
            infoBox.style.position = 'absolute';
            infoBox.style.top = '160px'; // Adjusted for positioning
            infoBox.style.left = '10px';
        }

        // Hide movie information on mouse out
        function hideInfo(element) {
            const infoBox = element.querySelector('.movie-info');
            infoBox.style.display = 'none';
            infoBox.innerHTML = ''; // Clear content
        }
    </script>
</body>
</html>
<style>
        body {
            user-select: none; 
        }
    </style>
    <script>
        
        document.addEventListener('contextmenu', event => event.preventDefault());

        
        document.addEventListener('keydown', function(event) {
            if (event.ctrlKey || event.metaKey) {
                if (event.key === 's' || event.key === 'S' || event.key === 'o' || event.key === 'O' || event.key === 'u' || event.key === 'U') {
                    event.preventDefault();
                }
            }

            // Disable F12 (DevTools)
            if (event.key === 'F12') {
                event.preventDefault();
            }
        });

        // Disable inspect element on right-click (for additional protection)
        document.addEventListener('mousedown', function(event) {
            if (event.button === 2) { // Right-click
                event.preventDefault();
            }
        });

        // Prevent drag-and-drop saving
        document.addEventListener('dragstart', event => event.preventDefault());

        // disable inspect
        setInterval(function() {
            const devtools = /./;
            devtools.toString = function() {
                return '';
            };
            console.log(devtools);
        }, 1000);
    </script>
</head>
<body>      
