كخبير ي مجال البرمجة اريد  تقوم بتطوير هذ الموقع و تستخدم كذلك react js حت يكون هناك تفاعلية في الموقع <!DOCTYPE html>
<html>

<head>
<title>تقليص الروابط</title>
<link rel="icon" type="image/png" href="favicon.png">
<meta charset="UTF-8">
<meta name="description" content="تقليص الروابط بسهولة وبسرعة.">
<meta name="keywords" content="تقليص, الروابط, إختصار, URL">
<meta name="author" content="مخلوف عبد العزيز">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Tajawal', sans-serif;
margin: 0;
padding: 0;
background-color: #f2f2f2;
}
.logo img {
        width: 50px;
        height: 50px;
        background-image: url(logo.png);
        background-repeat: no-repeat;
        background-size: contain;
        background-color: rgba(255, 255, 255, 0.8);
        border-radius: 50%;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
      }

nav {
  background-color: #4B0082;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

nav a {
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 50px 20px;
  text-align: center;
}

h1 {
  font-size: 50px;
  margin-bottom: 30px;
  color: #333333;
  font-weight: bold;
  letter-spacing: 1px;
  background: linear-gradient(to right, #4B0082, #9400D3, #FFFF00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient 5s ease-in-out infinite alternate;
   
}

@keyframes gradient {
  from {
    background-position: left top;
  }
  to {
    background-position: right bottom;
  }
}

h1 {
  font-size: 50px;
  margin-bottom: 30px;
  color: #333333;
  font-weight: bold;
  letter-spacing: 1px;
}

form {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

input[type="text"] {
  padding: 10px 15px;
  width: 60%;
  margin-right: 10px;
  font-size: 18px;
  border-radius: 5px;
  border: solid 2px #4B0082;
  font-family: 'Tajawal', sans-serif;
}

input[type="text"]:focus {
  outline: none;
  border: solid 2px #9400D3;
  box-shadow: 0px 0px 5px #9400D3;
}

button {
  background-color: #9400D3;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease-in-out;
  font-family: 'Tajawal', sans-serif;
  border: solid 2px #9400D3;
}

button:hover {
  background-color: #4B0082;
}

button:focus {
  outline: none;
  box-shadow: 0px 0px 5px #9400D3;
}

#result {
  margin-top: 50px;
}

hr {
  margin-top: 20px;
}

p {
  font-size: 24px;
  margin-bottom: 10px;
  font-weight: bold;
  letter-spacing: 1px;
}

#shortened-url {
  width:-moz-fit-content;
  width:80%;
  padding: 10px 15px;
  margin-right:10px;
  font-size: 18px;
  border-radius: 5px;
  border: solid 2px #4B0082;
  font-family: 'Tajawal', sans-serif;
}

#shortened-url:focus {
  outline: none;
  border: solid 2px #9400D3;
  box-shadow: 0px 0px 5px #9400D3;
}

.footer {
  background-color: #333333;
  color: white;
  text-align: center;
  padding: 20px;
  position: absolute;
  bottom: 0;
  width: 100%;
}

</style>
</head>

<body>
<nav>
<div class="logo">
 <a href="https://t-3alamtech.blogspot.com/"><span class="sr-only"><img src='logo.png' ></span></a>
</div>
<div>
<a href="https://t-3alamtech.blogspot.com/p/blog-page.html">من نحن</a>
<a href="zizouvitchtech@gmail.com">اتصل بنا</a>
</div>
</nav>

<div class="container">
<h1>تقليص الروابط</h1>
<form>
<input type="text" name="url" placeholder="ضع الرابط هنا">
<button type="submit" onclick="event.preventDefault(); shortenUrl()">تقليص</button>
</form>

<div id="result" style="display: none;">
  <hr>
  <p>الرابط المختصر:</p>
  <div style="display: flex;">
    <input type="text" id="shortened-url" readonly style="flex-grow: 1;">
    <button onclick="copyUrl()">نسخ</button>
  </div>
  <p id="copy-successful" style="display: none;">تم نسخ الرابط</p>
</div>
</div>

<div class="footer">
<a href="#">أسئلة شائعة</a>
<a href="#">Privacy Policy</a>
<span> (Tech جميع الحقوق محفوظة © (تعلم </a>
</div>

<script>
function shortenUrl() {
const urlInput = document.querySelector('input[type="text"]');
const shortenedUrlInput = document.getElementById('shortened-url');
const resultDiv = document.getElementById('result');
const copySuccessfulMsg = document.getElementById('copy-successful');

  fetch(`https://tinyurl.com/api-create.php?url=${encodeURIComponent(urlInput.value)}`)
    .then(response => response.text())
    .then(data => {
      shortenedUrlInput.value = data;
      resultDiv.style.display = 'block';
      copySuccessfulMsg.style.display = 'none';
    })
    .catch(() => {
      alert("لا يوجد اتصال بالإنترنت");
    });
}

function copyUrl() {
  const shortenedUrlInput = document.getElementById('shortened-url');
  shortenedUrlInput.select();
  document.execCommand('copy');
  const copySuccessfulMsg = document.getElementById('copy-successful');
  copySuccessfulMsg.style.display = 'block';
}
</script>
</body>

</html>