body {
  font-family: 'Cairo', sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
}

header {
  background-image: url('institute.jpg');
  background-size: cover;
  background-position: center;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-shadow: 2px 2px 4px #000;
  text-align: center;
}

header h1 {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 10px 25px;
  border-radius: 15px;
  font-size: 1.4rem;
}

main {
  max-width: 900px;
  margin: auto;
  padding: 30px 20px;
  text-align: center;
}

input, select, button {
  padding: 10px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin: 10px auto;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
}

button {
  background-color: #27ae60;
  color: white;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

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

#message {
  margin-top: 15px;
  font-weight: bold;
}

.error {
  color: #e74c3c;
}

.success {
  color: #27ae60;
}

#loading {
  font-weight: bold;
  color: #2980b9;
  display: none;
  margin-top: 10px;
}

.form-section {
  margin-top: 30px;
  background: #ecf0f1;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  display: none;
}

.student-card {
  margin-top: 40px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background-color: #ffffff;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  max-width: 700px;
  margin-inline: auto;
  flex-wrap: wrap;
}

.student-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
}

.student-info {
  text-align: right;
  flex: 1;
  min-width: 200px;
}

.student-info p {
  margin: 5px 0;
  font-size: 1.1rem;
}

footer {
  background: #2c3e50;
  color: white;
  padding: 15px;
  text-align: center;
  margin-top: 50px;
  font-size: 0.9rem;
}

.note {
  font-size: 0.9rem;
  color: #d35400;
  margin-top: -5px;
  margin-bottom: 15px;
}

/* ✅ تحسين العرض على الشاشات الصغيرة */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.1rem;
    padding: 8px 15px;
  }

  .student-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .student-info {
    text-align: center;
  }

  input, select, button {
    width: 100%;
    font-size: 1rem;
  }
}
