/* General table container styling */
body {
  background-color: #1a2b4c; 
  margin: 0;
  font-family: Arial, sans-serif;
  color: white;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1 {
  text-align: center;
  font-size: 1.5rem;
  margin: 10px 0;
  color: white;
  background: linear-gradient(to right, #7b68ee, #00bcd4); 
  padding: 10px;
  border-radius: 10px;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  animation: glow 1.5s infinite alternate;
  transition: background-color 0.3s ease, color 0.3s ease;
}

@keyframes glow {
  from {
      text-shadow: 0 0 5px #7b68ee, 0 0 10px #00bcd4;
  }
  to {
      text-shadow: 0 0 15px #7b68ee, 0 0 20px #00bcd4;
  }
}

.table-container {
  max-width: 95%;
  margin: 20px auto;
  overflow-x: auto;
  text-align: center;
  background-color: #2e3a59; 
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease;
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  background-color: #2e3a59; 
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, color 0.3s ease;
}

thead {
  background: linear-gradient(to right, #7b68ee, #00bcd4); 
  color: white;
  animation: glow 1.5s infinite alternate;
  transition: background-color 0.3s ease, color 0.3s ease;
}

th, td {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: center;
  word-wrap: break-word;
  transition: background-color 0.3s ease, color 0.3s ease;
}

tbody tr:nth-child(even) {
  background-color: #34495e; 
}

tbody tr:hover {
  background-color: #7b68ee; 
  color: white;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Search bar styling */
#search-bar {
  margin: 10px 0;
  padding: 12px 16px;
  width: 100%;
  max-width: 350px;
  font-size: 1rem;
  border-radius: 25px;
  border: 2px solid #7b68ee; 
  background: linear-gradient(to right, #7b68ee, #00bcd4); 
  color: white;
  outline: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#search-bar::placeholder {
  font-weight: bold;
  color: white; 
}

/*label */
label[for="search-bar"] {
  font-weight: bold;
  color: white; 
}

/* Responsive scrolling for table */
.table-container::-webkit-scrollbar {
  height: 8px;
  background-color: #34495e;
}

.table-container::-webkit-scrollbar-thumb {
  background: linear-gradient(to right, #7b68ee, #00bcd4);
  border-radius: 10px;
}

/* Pagination buttons */
.pagination {
  margin-top: 10px;
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.pagination button {
  background: linear-gradient(to right, #7b68ee, #00bcd4); 
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
  margin: 5px;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.pagination button:hover {
  transform: scale(1.1);
  background-color: #1e90ff;
}

.pagination button:disabled {
  background-color: #ddd;
  color: #999;
  cursor: not-allowed;
}

.pagination button.active {
  font-weight: bold;
  border: 2px solid #00bcd4;
  background: white;
  color: #1a2b4c;
}

/* Loading Bar */
#loading-bar-container {
  display: none;
  position: relative;
  width: 50%;
  margin: 20px auto;
  height: 20px;
  background-color: #2c2a2a;
  border-radius: 15px;
  overflow: hidden;
  border: 2px solid var(--color-1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#loading-bar {
  position: absolute;
  width: 0%; /* Start at 0% */
  height: 100%;
  background: linear-gradient(90deg, #7b68ee, #92d5e8);
  border-radius: 15px;
  transition: width 0.3s ease-in-out;
}

#loading-message {
  font-size: 16px;
  margin-top: 10px;
  color: #e1dada;
  font-weight: bold;
  text-align: center;
}

#loading-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
  z-index: 1;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  h1 {
      font-size: 1.25rem;
      padding: 8px;
  }

  table {
      font-size: 0.9rem;
  }

  th, td {
      padding: 8px;
  }

  #search-bar {
      max-width: 300px;
  }
}

@media (max-width: 480px) {
  h1 {
      font-size: 1rem;
      padding: 6px;
  }

  table {
      font-size: 0.8rem;
  }

  th, td {
      padding: 6px;
  }

  #search-bar {
      max-width: 250px;
  }

  .pagination button {
      font-size: 0.9rem;
      padding: 8px 12px;
  }
}
