body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(-45deg, #ff9a9e, #fad0c4, #a1c4fd, #c2e9fb);
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  backdrop-filter: blur(8px);
}

.student-logo {
  height: 45px;
  vertical-align: middle;
  margin-right: 10px;
}

h1 {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
  font-size: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

h2 {
  text-align: center;
  color: #444;
  margin-top: 20px;
  margin-bottom: 10px;
}

/* Form Section */
.form-section {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.form-section input {
  flex: 1 1 45%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  transition: all 0.3s;
}

.form-section input:focus {
  border-color: #007bff;
  box-shadow: 0 0 8px rgba(0,123,255,0.4);
  outline: none;
}

/* Button Group (side by side) */
.button-group {
  display: flex;
  gap: 10px;
  flex: 1 1 100%;
  flex-wrap: wrap;
}

.button-group button {
  flex: 1;
  padding: 12px;
  background: linear-gradient(90deg, #007bff, #00d4ff);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.2s ease;
}

.button-group button:hover {
  transform: scale(1.05);
}

/* Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  word-wrap: break-word;
}

th, td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
  font-size: 14px;
}

th {
  background: linear-gradient(90deg, #007bff, #00c6ff);
  color: white;
  font-weight: bold;
}

tr:nth-child(even) {
  background: #f9f9f9;
}

.btn {
  padding: 5px 10px;
  background: red;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.btn:hover {
  background: darkred;
}

/* 🔹 Grade Colors */
.grade-F { color: #fff; background: #e74c3c; padding: 3px 8px; border-radius: 5px; }
.grade-C { color: #fff; background: #e67e22; padding: 3px 8px; border-radius: 5px; }
.grade-B { color: #fff; background: #3498db; padding: 3px 8px; border-radius: 5px; }
.grade-A { color: #fff; background: #2ecc71; padding: 3px 8px; border-radius: 5px; }
.grade-AB { color: #000; background: #bdc3c7; padding: 3px 8px; border-radius: 5px; }

/* 🔹 Responsive Styles for Mobile */
@media (max-width: 768px) {
  .form-section input {
    flex: 1 1 100%;
  }

  .button-group button {
    flex: 1 1 100%;
  }

  table th, table td {
    font-size: 12px;
    padding: 8px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
    margin: 20px auto;
  }

  .student-logo {
    height: 35px;
  }

  table th, table td {
    font-size: 10px;
    padding: 6px;
  }

  .button-group {
    gap: 5px;
  }

  .form-section {
    gap: 5px;
  }
}
