/* General Styles */
body {
  font-family: "Arial", sans-serif;
  background-color: #f4f4f4;
  color: #333;
  margin: 0;
  padding: 0;
}

/* Header */
header {
  background-color: #007bff;
  color: white;
  padding: 15px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
}

/* Buttons */
button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 16px;
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
}
#search_panel_container{
  display: flex;
  justify-content: center;
}
button:hover {
  background-color: #0056b3;
}

/* Debug Toggle */
#toggle_debug_container {
  text-align: center;
  margin: 20px 0;
}

/* Panels */
.panel_all_div {
  display: none;
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}

/* Search Bars */
#search_bar_users,
#search_bar_subjects,
#search_bar_questions {
  width: 80%;
  padding: 8px;
  margin: 10px auto;
  display: block;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* User Cards */
.all_users_cards {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.user {
  background: #ffffff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in-out;
  width: 250px;
  text-align: center;
}

.user:hover {
  transform: scale(1.05);
}

/* User Roles */
.moderator {
  border-left: 5px solid #ffa500;
}

.admin {
  border-left: 5px solid #dc3545;
}

/* User Avatar */
.user_avatar img {
  border-radius: 50%;
  width: 80px;
  height: 80px;
  object-fit: cover;
}

/* Inputs & Textareas */
.input-field,
.textarea-field {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
}

.textarea-field {
  height: 80px;
  resize: none;
}

/* Show Buttons */
.show_button {
  display: block;
  margin: 10px auto;
  width: 200px;
  text-align: center;
}

/* Subjects & Questions */
.all_subjects_cards,
.all_questions_cards {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

/* Loader Container */
#loaderContainer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.85);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 9999;
}

#loaderContainer.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

.visible {
  display: block;
}
/* Loader Wrapper */
.loader {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

/* Dots */
.dot {
  width: 16px;
  height: 16px;
  background: #007bff;
  border-radius: 50%;
  animation: dotBounce 1.2s infinite ease-in-out;
}

.dot:nth-child(1) {
  animation-delay: 0s;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* Loading Text */
.loader-text {
  margin-top: 16px;
  color: #333;
  font-size: 1rem;
  font-family: sans-serif;
}

/* Sort container */
#sort_container {
  display: flex;
  justify-content: space-evenly;
  gap: 16px;
  margin: 16px 0;
  }

/* Dot Bounce Keyframes */
@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1.0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .user,
  .subject,
  .question {
    width: 100%;
  }
}

/* Fade Animations */
.fadeIn {
  animation: fadeIn 0.4s ease-in forwards;
}

.fadeOut {
  animation: fadeOut 0.4s ease-out forwards;
}

/* Bounce Effect for Upvotes */
.bounce {
  animation: bounce 0.3s ease-in-out;
}

/* Click Effect for Debug Button */
.clicked {
  animation: clickEffect 0.2s ease-in-out;
}

/* Keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-5px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes clickEffect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}
