body {
  font-family: Arial, sans-serif;
  background: linear-gradient(to right, #74ebd5, #acb6e5);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column; /* Allow vertical alignment of title and content */
  align-items: center;
  height: 100vh;
}

nav {
  position: absolute; /* Navbar stays at the top */
  top: 0;
  width: 100%;
  background-color: #007BFF;
  color: white;
  padding: 10px;
  text-align: center;
}

nav a {
  color: white;
  text-decoration: none;
  margin: 0 15px;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* Title Section */
.title-container {
  margin-top: 20px;
  text-align: center;
}

.title-container h1 {
  font-size: 2.5rem;
  color: #0056b3;
  margin-bottom: 10px;
}

.title-container p {
  font-size: 1.2rem;
  color: #333;
}

/* Main Container */
.container {
  display: flex;
  max-width: 1200px; /* Limit the total width */
  gap: 20px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  margin-top: 20px;
}

/* Form Container */
.form-container {
  flex: 1; 
  max-width: 300px; 
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-container h2 {
  text-align: center;
  color: #333;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

label {
  font-weight: bold;
  color: #555;
}

input {
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

button {
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  background: linear-gradient(to right, #007BFF, #0056b3);
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}

button:hover {
  background: linear-gradient(to right, #0056b3, #003f7f);
  transform: scale(1.05);
}

/* List Container */
.list-container {
  flex: 2; /* Wider than the form container */
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.list-container h3 {
  text-align: center;
  color: #333;
}

.student-list {
  flex: 1;
  max-height: 400px; 
  overflow-y: auto; 
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
  background: #f9f9f9;
}

.student-list table {
  width: 100%;
  border-collapse: collapse;
}

.student-list th, .student-list td {
  text-align: left;
  padding: 8px;
  border: 1px solid #ddd;
}

.student-list th {
  background: #007BFF;
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    flex-direction: column; 
  }

  .form-container, .list-container {
    flex: 1;
    max-width: 100%;
  }

  .student-list {
    max-height: 300px; 
  }
}