/* Box-sizing: يخلي padding و border محسوبة مع حجم العنصر */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Body - إعدادات الخط والخلفية ومحاذاة المركز */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7f6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
}

/* Container للفورم */
.form-container {
  background: #fff;
  padding: 40px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  width: 100%;
  max-width: 450px;
  overflow: hidden; /* يمنع أي عنصر يخرج من الحدود */
}

/* عنوان الفورم */
h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

/* مجموعة كل input مع label و icon */
.input-group {
  position: relative;
  margin-bottom: 30px;
}

/* جميع الحقول */
.input-field {
  width: 100%;
  padding: 12px 35px 12px 0;
  font-size: 16px;
  line-height: 1.4;
  color: #333;
  border: none;
  border-bottom: 2px solid #ddd;
  background: transparent;
  outline: none;
  transition: all 0.3s ease;
  appearance: none;
}

/* عند المرور بالفأرة */
.input-field:hover {
  border-bottom-color: #a29bfe;
}

/* Label لكل input */
.input-label {
  position: absolute;
  top: 12px;
  left: 0;
  font-size: 16px;
  color: #999;
  pointer-events: none;
  transition: 0.3s ease all;
}

/* تحريك label عند التركيز على الحقل */
.input-group:focus-within .input-label {
  top: -22px;
  font-size: 12px;
  color: #6c5ce7;
  font-weight: bold;
}

/* شريط تدرج عند التركيز */
.input-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #6c5ce7, #a29bfe);
  transition: 0.4s ease;
}
.input-group:focus-within .input-bar {
  width: 100%;
}

/* Textarea */
textarea.input-field {
  resize: vertical;
  min-height: 100px;
  padding: 20px 35px 12px 0;
  line-height: 1.4;
}

/* Select */
select.input-field {
  cursor: pointer;
  padding-right: 35px;
  line-height: 1.4;
}

/* أيقونات على كل input */
.input-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c5ce7;
  font-size: 16px;
  pointer-events: none;
}

/* زر الإرسال */
.submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(to right, #6c5ce7, #a29bfe);
  border: none;
  border-radius: 50px;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.4);
}
.submit-btn:active {
  transform: translateY(0);
}

/* Responsive - شاشات صغيرة */
@media (max-width: 500px) {
  .form-container {
    padding: 30px 20px;
  }
}
