body {
  font-family: "Poppins", Arial, sans-serif;
  background: linear-gradient(135deg, #7f7fd5 0%, #91eae4 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.welcome-banner {
  width: 100%;
  text-align: center;
  margin: 0 auto 40px auto;
  padding-top: 42px;
  padding-bottom: 14px;
}
.welcome-title {
  color: #ffd600;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 0.018em;
  text-shadow: 0 2px 18px rgba(60, 60, 60, 0.13);
  margin-bottom: 13px;
}
.welcome-description {
  color: #e8ecf7;
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 24px;
}
.link-buttons-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 11px;
}
.link-button {
  text-decoration: none;
  background: #ffd600;
  color: #2c2f36;
  padding: 19px 33px;
  font-size: 1.27rem;
  font-weight: 700;
  border: none;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(80, 80, 150, 0.15);
  cursor: pointer;
  transition: filter 0.12s, transform 0.13s;
  margin-bottom: 14px;
}
.link-button:hover {
  color: #0077ff;
  filter: brightness(0.94);
  transform: translateY(-2px) scale(1.04);
}
@media (max-width: 1100px) {
  .welcome-title {
    font-size: 2.2rem;
  }
  .welcome-description {
    font-size: 1.1rem;
  }
  .link-buttons-row {
    gap: 19px;
  }
  .link-button {
    font-size: 1.15rem;
    padding: 17px 24px;
  }
}
@media (max-width: 650px) {
  .welcome-banner {
    margin-bottom: 12px;
    padding-top: 28px;
  }
  .welcome-title {
    font-size: 1.15rem;
  }
  .welcome-description {
    font-size: 0.91rem;
  }
  .link-buttons-row {
    gap: 10px;
  }
  .link-button {
    font-size: 1rem;
    padding: 11px 8vw;
  }
}

.container {
  max-width: 650px;
  background: transparent;
  margin: 60px auto 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  box-shadow: 0 8px 36px rgba(40, 160, 200, 0.13), 0 2px 8px rgba(0, 0, 0, 0.03);
  padding: 32px 18px 22px 18px;
}
h2 {
  color: #ffd600;
  text-align: center;
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 22px;
  margin-top: 0;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(60, 60, 60, 0.1);
}
label {
  font-weight: 600;
  color: #2c2f36;
  margin-top: 13px;
  margin-bottom: 7px;
}
input[type="text"],
input[type="number"],
select {
  padding: 9px 10px;
  border: 1.5px solid #d6e6f6;
  border-radius: 8px;
  background: #f6faff;
  color: #323447;
  margin-bottom: 7px;
  max-width: 100%;
  font-size: 1rem;
  transition: border 0.22s;
  font-family: inherit;
  font-weight: 500;
}
input:focus,
select:focus {
  border: 1.5px solid #7f7fd5;
}
.small-input {
  width: 70px;
  display: inline-block;
}
.inputs-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
button,
.container button,
.container th button,
.container td button {
  align-itmes: center;
  justify-content: center;
  background: #ffd600;
  color: #2c2f36;
  padding: 11px 18px;
  border: none;
  cursor: pointer;
  max-width: 90%;
  font-size: 1.09rem;
  font-weight: 700;
  border-radius: 11px;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(80, 80, 150, 0.23);
  transition: filter 0.12s, transform 0.13s;
}
button:hover,
.container button:hover,
.container th button:hover,
.container td button:hover {
  filter: brightness(0.94);
  transform: translateY(-1px) scale(1.03);
}
#result {
  margin-top: 24px;
  font-size: 1.12rem;
  font-weight: bold;
  color: #272921;
  text-align: center;
  min-height: 32px;
}
.hidden {
  display: none;
}
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 13px;
  margin-top: 8px;
  border-radius: 9px;
  box-shadow: 0 1px 8px rgba(140, 160, 240, 0.08);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #f8f9fc;
  min-width: 350px;
}
th,
td {
  border: 1px solid #e3e7ff;
  text-align: center;
  padding: 8px 4px;
  color: #2c2f36;
  font-size: 1.04rem;
}
th {
  background: #f0f5fc;
  font-weight: 700;
}
/* Make the button column wider and more flexible */
#classFreqTable th:last-child,
#classFreqTable td:last-child {
  width: 80px;
  min-width: 60px;
  padding-left: 3px;
  padding-right: 3px;
}
/* Fix button sizing inside table cells */
#classFreqTable button {
  width: 90%;
  min-width: 38px;
  max-width: 74px;
  box-sizing: border-box;
  margin: 2px auto;
  display: block;
}
/* Responsive styles for calculator */
@media (max-width: 650px) {
  .container {
    margin: 24px 0;
    padding: 18px 6px 16px 6px;
    max-width: 100vw;
  }
  h2 {
    font-size: 1.4rem;
  }
  input[type="text"],
  input[type="number"],
  select {
    font-size: 0.99rem;
    padding: 8px 5px;
    width: 100%;
  }
  .inputs-row {
    gap: 8px;
  }
  button,
  .container button {
    font-size: 1rem;
    padding: 10px 12px;
    min-width: 80px;
  }
  th,
  td {
    font-size: 0.94rem;
    padding: 5px 1px;
  }
  #classFreqTable td:last-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    align-items: center;
    min-width: 70px;
  }
  #classFreqTable button {
    width: 98%;
    margin: 0.12rem 0;
    max-width: 78px;
  }
}
@media (max-width: 420px) {
  .container {
    padding: 8px 2.5vw 9px 2.5vw;
    border-radius: 5px;
    margin: 12px 0 0 0;
  }
  table {
    min-width: 270px;
  }
  h2 {
    font-size: 1rem;
  }
  th,
  td {
    font-size: 0.9rem;
  }
}
