/* Modal Overlay - über allem anderen */
#modalOverlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 99999 !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

#modalOverlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Profile Card */
#modalOverlay .profile-card {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  padding: 32px;
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  margin: auto;
  box-sizing: border-box;
}

#modalOverlay.active .profile-card {
  transform: scale(1);
}

/* Glowing Effects */
#modalOverlay .profile-card::before,
#modalOverlay .profile-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

#modalOverlay .profile-card::before {
  width: 128px;
  height: 128px;
  background: #2563eb;
  right: 12px;
  top: 0;
}

#modalOverlay .profile-card::after {
  width: 128px;
  height: 128px;
  background: #5eead4;
  left: 16px;
  bottom: 0;
}

/* Profile Image */
#modalOverlay .profile-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.7);
  opacity: 0.9;
  transition: opacity 0.3s;
  margin: 0 auto;
  display: block;
  object-fit: cover;
}

#modalOverlay .profile-card:hover .profile-img {
  opacity: 1;
}

/* Profile Info */
#modalOverlay .profile-name {
  font-weight: bold;
  font-size: 1.5rem;
  margin-top: 20px;
  color: #101232;
}

#modalOverlay .profile-description {
  margin-top: 20px;
  font-size: 15px;
  color: #101232;
  line-height: 1.6;
  text-align: left;
}

#modalOverlay .profile-role {
  margin-top: 16px;
  font-size: 14px;
  color: #101232;
  font-weight: 500;
}

/* Action Buttons */
#modalOverlay .action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

#modalOverlay .action-btn {
  background: #101232;
  color: white !important;
  text-decoration: none;
  padding: 14px 24px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s;
  text-align: center;
  display: block;
  cursor: pointer;
}

#modalOverlay .action-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(16, 18, 50, 0.3);
  background: #1a1d3e;
}

/* Close Button */
#modalOverlay .close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  padding: 0;
  line-height: 1;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#modalOverlay .close-btn:hover {
  transform: scale(1.2);
  color: #101232;
  background: rgba(255, 255, 255, 1);
}

#modalOverlay .close-btn .material-symbols-outlined {
  font-size: 24px;
}

/* Responsive Design */
@media (max-width: 640px) {
  #modalOverlay {
    padding: 16px;
  }
  
  #modalOverlay .profile-card {
    max-width: 100%;
    padding: 24px;
  }
  
  #modalOverlay .profile-img {
    width: 80px;
    height: 80px;
  }
  
  #modalOverlay .profile-name {
    font-size: 1.25rem;
    margin-top: 16px;
  }
  
  #modalOverlay .profile-description {
    font-size: 14px;
    margin-top: 16px;
  }
  
  #modalOverlay .action-buttons {
    margin-top: 20px;
    gap: 10px;
  }
  
  #modalOverlay .action-btn {
    padding: 12px 20px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  #modalOverlay .profile-card {
    padding: 20px;
  }
  
  #modalOverlay .close-btn {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
}