/* Global */
body {
  font-family: Arial, sans-serif;
  background: #0f1923;
  color: white;
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}

header {
  text-align: center;          /* centers text */
  padding: 1rem;
  background: #ff4655;
  font-size: 1.8rem;
  font-weight: bold;
  position: relative;          /* allows button to stay positioned */
}

#themeToggle {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}
nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  background: #1b2735;
  padding: 10px;
}

nav button {
  background: #ff4655;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

nav button:hover {
  background: #d13a47;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.search-box input {
  padding: 12px 16px;    
  width: 350px;          
  font-size: 1rem;       
  border-radius: 8px;    
  border: none;
}
/* Mobile responsive */
@media (max-width: 600px) {
  .search-box input {
    width: 200px;       /* smaller width for mobile */
    padding: 8px 10px;  /* slightly smaller height */
    font-size: 0.9rem;
  }
}




.filter-box select {
  padding: 8px;
  border-radius: 5px;
  border: none;
}

/* Content Grid */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.card {
  background: #1b2735;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s ease-in-out;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  border-radius: 10px;
}

.name {
  margin-top: 10px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #ff4655;
}

.role-badge {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 8px;
  background: #333;
  color: white;           /* <-- Always white text in dark mode */
  border-radius: 5px;
  font-size: 0.9rem;
}

/* Light mode badge override */
body.light .role-badge {
  background: #eee;       /* Light background */
  color: #222;            /* Dark text */
}


/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #1b2735;
  padding: 20px;
  border-radius: 10px;
  max-width: 600px;
  color: white;
}

.close {
  float: right;
  font-size: 1.5rem;
  cursor: pointer;
  color: #ff4655;
}

/* Spinner */
.spinner {
  display: none;
  text-align: center;
  margin: 20px;
  font-size: 1.2rem;
  color: #ff4655;
}

/* Light Theme */
body.light {
  background: #f4f4f4;
  color: #222;
}

body.light .card {
  background: white;
}

body.light nav {
  background: #ddd;
}

body.light header {
  background: #333;
  color: white;
}