/* استيراد خط Cairo */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap');

/* إعدادات عامة */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cairo', sans-serif; /* تطبيق خط Cairo هنا */
  background-image: url('light.jpg');
  background-size: cover;
  background-position: center;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 0 15px; /* لتجنب تداخل المحتوى مع حواف الشاشة على الهواتف */
}

/* الهيدر وقائمة التنقل */
header {
  position: absolute;
  top: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: baseline;
  list-style: none;
  padding: 10px;
  flex-wrap: wrap; /* السماح بتوزيع العناصر على عدة أسطر في الشاشات الصغيرة */
}

nav ul li {
  margin: 5px 15px; /* مسافات أقل لدعم الشاشات الصغيرة */
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 16px;
}

nav ul li a:hover {
  color: #007BFF;
}

/* العنوان الرئيسي */
h1 {
  font-size: 36px;
  margin-bottom: 10px;
  text-align: center;
}

p {
  font-size: 16px;
  margin-bottom: 20px;
  text-align: center;
}

/* صندوق التحويل */
.converter {
  display: flex;
  flex-direction: column;
  align-items: center;
}

input {
  width: 90%; /* استخدام نسبة مئوية لتكون متجاوبة على جميع الأجهزة */
  max-width: 400px; /* أقصى عرض على الشاشات الكبيرة */
  padding: 10px;
  border: none;
  border-radius: 5px;
  margin-bottom: 15px;
  font-size: 16px;
  text-align: center;
  font-family: 'Cairo', sans-serif; /* تطبيق خط Cairo هنا */
}

button {
  width: 60%; /* نفس الفكرة هنا */
  max-width: 200px;
  padding: 10px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
  font-family: 'Cairo', sans-serif; /* تطبيق خط Cairo هنا */
}

button:hover {
  background-color: #218838;
}

/* إعدادات الصور */
nav ul li a img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

/* إعداد Flexbox للحاوية الرئيسية */
.result-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 20px;
  height: 100px;
}

#result {
  text-align: center;
  font-size: 20px;
  margin: 20px 0;
}

/* إعدادات خاصة بالهاتف */
@media (max-width: 600px) {
  h1 {
    font-size: 28px;
  }

  p {
    font-size: 14px;
  }

  input {
    font-size: 14px;
  }

  button {
    font-size: 16px;
    padding: 8px;
  }

  nav ul li a img {
    width: 20px;
    height: 20px;
  }
}

/* إعدادات الفوتر */
footer {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 14px;
}

/* الوضع المظلم */
body.dark-mode {
  background-image: url('dark.jpg');
  background-color: #121212;
  color: #ddd;
}

body.dark-mode input {
  background-color: #333;
  color: #ddd;
}

body.dark-mode button {
  background-color: #555;
  color: white;
}

body.dark-mode nav ul li a {
  color: #ddd;
}

body.dark-mode nav ul li a:hover {
  color: #FFD700;
}
