html {
  scroll-behavior: smooth;
}

.main-container {
  padding: 8px;
  background-color: #ffffff;
  margin-top: 10px auto;
  margin: 10px auto;
  line-height: 1.5;
  max-width: 75%;
  border-radius: 8px;
  overflow: hidden;
}

main {
  background: #fff;
  padding: 8px;
  border-radius: 8px;
  max-width: 100%;
}

.section {
  margin-bottom: 20px;
}

h2 {
  margin: 8px auto;
  padding: 5px;
  overflow: hidden;
  border-radius: 5px;
  border-bottom: 2px solid red;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

p {
  margin: 5px 0;
  color: #333;
  overflow: hidden;
  line-height: 1.6;
  padding: 2px;
}

ul,
ol {
  margin: 10px 0;
  padding-left: 20px;
}

li {
  margin-bottom: 10px;
}

#span {
  font-weight: 400;
  width: 100%;
  text-align: center;
  margin: 0;
  color: #1d3aa2;
  float: left;
  margin-top: 10px;
  font-size: 18px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: center;
  padding: 10px;
  border: 1px solid #ddd;
  overflow: hidden;
}

.table th {
  background-color: #f2f2f2;
}

#resultSection {
  margin-top: 20px;
}

#results {
  white-space: pre-wrap;
}

.table thead tbody tr td {
  overflow: hidden;
}

.form-group-pre select {
  overflow: hidden;
}

.form-group-pre label {
  margin: 0 auto;
  padding: 2px;
  font-weight: bolder;
  font-size: 18px;
}

.custom-alert {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #081466;
  color: #ffffff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  display: none;
  background: #1d3aa2;
}

.custom-alert.show {
  display: block;
  animation: slideIn 0.5s forwards, glow 1s infinite alternate;
}

.alert-content {
  position: relative;
  text-align: justify;
}

.close-btn {
  position: absolute;
  top: 0px;
  right: 5px;
  cursor: pointer;
  font-size: 25px;
  font-weight: bold;
  color: #ff5733;
}

.alert-message {
  align-items: center;
  padding: 10px;
  font-size: 18px;
  margin: 20px 0;
  animation: fadeIn 1s ease-in-out;
}

.button-pre button {
  margin: 20px auto;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  transition: background-color 0.3s;
}

#submitBtn {
  background-color: #28a745;
}

#submitBtn:hover {
  background-color: #218838;
}

#restartBtn {
  background-color: #e5001d;
}

#restartBtn:hover {
  background-color: #c82333;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: none;
}

.overlay-content {
  background-color: white;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  text-align: center;
}

#download-data button {
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
}

.modal-overlay {
  display: none;
  /* Initially hidden */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  /* Semi-transparent background */
  z-index: 1000;
  /* Ensure it covers the entire page */
}

@keyframes slideIn {
  0% {
    transform: translate(-50%, -100%);
  }

  100% {
    transform: translate(-50%, -50%);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

#pdf {
  background-color: #081466;
}

/* Medium devices (tablets) */
@media (min-width: 601px) and (max-width: 992px) {
  .form-group-pre label {
    overflow: hidden;
  }

  .table {
    overflow-y: auto;
    overflow-x: auto;
  }

  .table th,
  .table td {
    font-size: 14px;
    overflow: hidden;
  }

  .table td input {
    width: 100px;
    overflow: hidden;
  }

  .table td {
    width: 100px;
    overflow: hidden;
  }

  .table thead tbody tr td {
    overflow: hidden;
  }

  .custom-alert {
    top: 20%;
    left: 50%;
    /* min-width: 90%; */
  }

  option {
    font-size: 10px;
  }

  h2 {
    margin: 2px auto;
    padding: 4px;
  }
}

@media (min-width: 993px) {
  .form-group-pre label {
    overflow: hidden;
  }

  .table {
    overflow-y: auto;
    overflow-x: auto;
  }

  .table th,
  .table td {
    font-size: 16px;
    overflow: hidden;
  }

  .table thead tbody tr td {
    overflow: hidden;
  }

  option {
    font-size: 12px;
  }
}

@media (max-width: 601px) {
  .main-container {
    max-width: 95%;
  }

  h2 {
    font-size: 22px;
    margin: 2px auto;
    padding: 4px;
  }

  .form-group-pre label {
    overflow: hidden;
  }

  .table {
    overflow-y: auto;
    overflow-x: auto;
  }

  .table th,
  .table td {
    font-size: 16px;
    overflow: hidden;
  }

  .custom-alert {
    top: 50%;
    left: 50%;
    min-width: 90%;
    text-align: justify;
  }

  .table td input {
    width: 100px;
    overflow: hidden;
  }

  .table td {
    width: 100px;
    overflow: hidden;
  }

  option {
    font-size: 12px;
  }

  .button-pre {
    flex-direction: column;
    align-items: stretch;
  }

  .button-pre button {
    width: 100%;
    margin-bottom: 0px;
  }

  .button-pre button:last-child {
    margin-bottom: 0;
  }
}
