/* =============================
   BASE STYLES & RESET
============================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7fa;
  color: #333;
  text-align: center;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* =============================
   NAVBAR
============================= */
.navbar {
  width: 100%;
  max-width: 1200px;
  background: linear-gradient(135deg, #0077ff, #0055cc);
  padding: 18px 0;
  color: #fff;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  margin-bottom: 30px;
  animation: slideDown 0.8s ease forwards;
}

.navbar h1 {
  margin: 0;
  font-weight: 900;
  font-size: 28px;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* =============================
   MENU BAR
============================= */
.menu-bar {
  width: 100%;
  max-width: 1200px;
  background-color: #0055cc;
  padding: 15px 0;
  display: flex;
  justify-content: center;
  gap: 15px;
  border-radius: 8px;
  margin-bottom: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.menu-bar a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 28px;
  font-size: 18px;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
  user-select: none;
}

.menu-bar a:hover,
.menu-bar a:focus {
  background-color: #003d99;
  color: #ffd966;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background-color: #003d99;
  border: none;
  padding: 12px 20px;
  font-size: 18px;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .menu-bar {
    flex-direction: column;
    padding: 10px 0;
  }
  .menu-toggle {
    display: block;
  }
  .menu-links {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 10px;
  }
  .menu-links.show {
    display: flex;
  }
  .menu-links a {
    width: 100%;
    padding: 15px 0;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  .menu-links a:hover,
  .menu-links a:focus {
    background-color: #002966;
    color: #ffe082;
  }
}/* ==== FOOTER ==== */
footer {
  background: #003366;
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 14px;
}


/* =============================
   FORM CONTAINER
============================= */
.container {
  width: 100%;
  max-width: 1200px;
  background: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease forwards;
}

/* Input groups inside #aa */
#aa {
  background-color: #e8f0fe;
  border-radius: 10px;
  padding: 20px 30px;
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  margin-bottom: 40px;
}

#aa label {
  font-weight: 700;
  color: #003d99;
  font-size: 16px;
  min-width: 80px;
  text-align: left;
}

#aa select {
  padding: 10px 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1.8px solid #0055cc;
  outline-offset: 2px;
  transition: border-color 0.3s ease;
  min-width: 160px;
}

#aa select:hover,
#aa select:focus {
  border-color: #003d99;
}

@media (max-width: 768px) {
  #aa {
    flex-direction: column;
    padding: 20px;
    gap: 15px;
  }
  #aa label,
  #aa select {
    width: 100%;
    min-width: auto;
    text-align: center;
  }
}

/* =============================
   LABELS & INPUTS
============================= */
label {
  font-size: 18px;
  color: #222;
  font-weight: 600;
  display: inline-block;
  margin-right: 15px;
}

input[type="number"],
select,
input[type="text"] {
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 6px;
  border: 1.5px solid #ccc;
  transition: border-color 0.3s ease;
  width: 150px;
  max-width: 100%;
}

input[type="number"]:focus,
select:focus,
input[type="text"]:focus {
  border-color: #0077ff;
  outline: none;
}

/* =============================
   BUTTONS
============================= */
button {
  background-color: #0077ff;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.15s ease;
  box-shadow: 0 5px 15px rgba(0,119,255,0.3);
  user-select: none;
}

button:hover,
button:focus {
  background-color: #005acc;
  transform: scale(1.05);
  outline: none;
}

/* =============================
   TABLE STYLING
============================= */
table {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto 40px auto;
  border-collapse: collapse;
  background-color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  font-size: 16px;
  color: #222;
  user-select: none;
  animation: fadeIn 1s ease forwards;
}

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid #e4e4e4;
  text-align: center;
  transition: background-color 0.3s ease;
}

th {
  background-color: #0077ff;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background-color: #f8faff;
}

tbody tr:hover {
  background-color: #e1eaff;
  cursor: default;
}

.school-name-row th {
  background-color: #ff7043;
  font-size: 1.9em;
  padding: 22px;
}

/* =============================
   INFO DIV
============================= */
#info-div {
  max-width: 600px;
  width: 90%;
  margin: 20px auto 50px auto;
  padding: 25px 30px;
  border: 2px solid #0077ff;
  border-radius: 10px;
  background-color: #e6f0ff;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  color: #004080;
  font-weight: 600;
  visibility: hidden;
  user-select: none;
}

/* =============================
   POPUP MESSAGES
============================= */
#popup-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  padding: 28px 40px;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 700;
  color: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  min-width: 320px;
  max-width: 90vw;
  text-align: center;
  user-select: none;
  backdrop-filter: blur(6px);
}

#popup-message.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.popup-success {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  box-shadow: 0 8px 30px rgba(46, 125, 50, 0.8);
}

.popup-error {
  background: linear-gradient(135deg, #e53935, #b71c1c);
  box-shadow: 0 8px 30px rgba(183, 28, 28, 0.8);
}

/* =============================
   ANIMATIONS
============================= */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
