<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Terabox Player by Morsalin</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        #video-container {
            display: none;
            margin-top: 20px;
            background: white;
            padding: 5px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 800px;
        }
        iframe {
            width: 100%; 
            height: 210px; 
            border: none;
            border-radius: 8px;
        }
        input[type="text"] {
            padding: 10px;
            width: 100%;
            max-width: 800px;
            border: 1px solid #ccc;
            border-radius: 4px;
            margin-bottom: 10px;
        }
        button {
            padding: 10px 15px;
            background-color: #007BFF;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        button:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
    <h1>Terabox Video Player</h1>
    <input type="text" id="videoUrl" placeholder="Enter Terabox Video URL Here..." />
    <button id="embedButton">Play Video</button>

    <div id="video-container">
        <iframe id="video-frame" src="" allowfullscreen></iframe>
    </div>
    
    <footer>
        <h2>&copy;Morsalin</h2>
    </footer>

    <script>
        document.getElementById('embedButton').addEventListener('click', function() {
            const videoUrl = document.getElementById('videoUrl').value;
            const videoContainer = document.getElementById('video-container');
            const videoFrame = document.getElementById('video-frame');

            if (videoUrl) {
                const fullUrl = `https://www.terabox.tech/play.html?url=${encodeURIComponent(videoUrl)}`;
                
                videoFrame.src = fullUrl; 
                videoContainer.style.display = 'block'; 
            } else {
                alert('Please enter a valid video URL.');
            }
        });
    </script>
</body>
</html>