body {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  background-size: 600% 600%;
  animation: bgAnimation 30s ease infinite;
  color: white;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@keyframes bgAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== Role Cards Grid ===== */
.role-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.role-card {
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.role-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.role-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: top center; /* Fokus pada bagian atas gambar */
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  filter: blur(5px); /* Menambahkan efek blur pada gambar */
  transition: filter 0.3s ease; /* Transisi halus untuk efek blur */
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.role-card-content {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-title-role {
  font-weight: 700;
  font-size: 1.4rem;
  text-align: center;
  color: #0d6efd;
  margin-bottom: 0.3rem;
}

.player-count {
  font-size: 1rem;
  text-align: center;
  color: #cbd5e1;
}

/* ===== Player Cards Grid inside Modal ===== */
.player-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.player-card {
  background-color: #1f1f2e;
  color: white;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
}

.player-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.player-card h5 {
  margin-bottom: 0.4rem;
  color: #0d6efd;
}

.player-card p {
  margin-bottom: 0.5rem;
  color: #ddd;
}

.badge {
  font-size: 0.85rem;
}

.d-flex.justify-content-between {
  margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .role-img {
    height: 120px;
  }
}
